Menu

#43 failed to initialize error

v1.0 (example)
open
nobody
None
5
2019-01-02
2018-12-28
Dale
No

I am trying my first WinLIRC use case. I have an irdroid USB IR receiver/transmitter which uses the IRTOY driver. The device is recognized and I was able to record all of the buttons for one of my remotes using IRRecord that was installed with winlirc.

When I start winlirc, though, I still get an error that winlirc failed to initialize. There's no error details and I can't find any log or other place to find details. Attached is a screen capture of my configuration. Of course you can't see the entire path to the config file but the file path is legit and was selected by browse.

I'm also attaching the config file created by irrecord. I did some editing because I needed to fix the file name and remote/device info.

Any ideas what I might be doing wrong?

Discussion

  • Dale

    Dale - 2018-12-28

    Trying to add attachments.

     
  • Dale

    Dale - 2018-12-28

    Adding config file attachment.

     
  • Ian

    Ian - 2018-12-29

    Does it init without the config file?

     
  • Dale

    Dale - 2018-12-30

    I deleted the config file and it still doesn't init. I deleted the .ini file and still won't init. I ran irrecord again and created a new config file from a different remote and tried configuring that config file and still won't init.

     
  • Ian

    Ian - 2018-12-30

    I'm puzzled why init would fail but irrecord would work because I am pretty sure irrecord also calls init .. What settings are you using in the irtoy plugin? Been sometime since I looked at this thing but I seem to recall you have to set a serial port for it?

     
  • Dale

    Dale - 2018-12-31

    It's set to com3, which is the same identified in device manager.

    I've downloaded the source to try to add some debugging and logging info to see if I can find out what's happening but the trunk does not build; there are a lot of errors.

    Many instances lf: invalid literal suffix 'L'; literal operator or literal operator template 'operator ""L' not found.

    A few instances of unresolved external symbols, and a couple of symbols defined more than once.

    Most of those, but not all, are in plugins I don't need so I might delete those from my local copy but any help in fixing the build would be appreciated.

    Thanks,

    Dale

     
  • Ian

    Ian - 2019-01-01

    What are you building it with? Should build with visual studio, but you need MFC

     
  • Dale

    Dale - 2019-01-02

    Ian,

    I removed the breaking plugins from the solution and got it to build. I'm using Visual Studio 2015.

    The offending line is in the IRToy project, serial.cpp line 358:

    if (!::SetCommState(m_hFile,&dcb))

    SetCommState is setting error 31 - for which I have not been able to find any documentation. But the error is coming from the Win32 API call and probably based on a hardware issue in my IR adapter from irdroid.

    Since I am using an IRToy clone, I'm kind of stuck. I ordered a real IRToy but that won't be here for 3 or 4 weeks. In the mean time, I'll work with the folks at irdroid to see if they can help.

    I'm also going to debug in the irrecord app to see if it's calling the same code in IRToy.dll.

    Ok, I forgot to send the above but I've spent a couple more hours working on this today. irrecord calls SetCommState several times successfully but winLIRC fails on the same call. Doesn't sound like hardware now.

    Next, I'm going to compare the DCB object between the irrecord and winLIRC calls to SetCommState.

    I don't believe it's a bug and I don't believe it's a hardware problem with the irdroid device. Both, I assume, are being used successfully by others. I imagine it's environmental but, hopefully, I can identify a code fix.

    I just wish I could find out more about this error 31.

    Dale

     
  • Dale

    Dale - 2019-01-02

    Well, I can't explain it but it's working now. I haven't changed anything but I have removed and reconnected the irdroid device a few times in troubleshooting.

    I found clues in some forum posts that error 31 is "A device attached to the system is not functioning" but I haven't found documentation to back that up. In any case, it seems that removing and reconnecting may have helped - back to hardware or firmware issues.

    Thanks for your time in working to help me and in maintaining the package.

    Dale

     
  • Ian

    Ian - 2019-01-02

    The issue could be something like the hw can't suspend with the PC, and then come back to a working state. I seem to recall some of the devices had issues like that before.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.