I have a sort of bug report/investigation going on:
CIR header on Intel DH77DF, Nuvoton driver. Win 8.1, newest Eventghost version.
Logitech Harmony 650 remote.
The remote by itself works fine (through the eHome driver), i.e. direction keys, play/pause work in applications.
I want to intercept the key presses in Eventghost, though. If I add the MCE_Vista plugin and install the service, it shows up as running and *seems*
to intercept all IR key presses, i.e. the standard behavior of the MCE remote as handled by Windows stops (cursor keys on directional buttons, etc.).
The problem is that I do not get any events in Eventghost, even though the log says it connected to the pipe. The service is running, restarting it gets the disconnect/reconnect messages in
EG.
My investigation: I traced through the Python code in __init__.py and found that the WaitForMultipleObjects in line 588 never returns, i.e. a PrintNotice placed before
Code: Select all
588: rc = win32event.WaitForMultipleObjects(handles, False, self.timeout)
works, none that are placed after it. I believe this means that the readOvlap event that is started above:
Code: Select all
583: (hr,data) = win32file.ReadFile(self.file,nMax,self.readOvlap)
never finishes, which leads me to believe there is a bug in the service.
I managed to compile the service myself with VS2012 following the instructions from the earlier post (thanks!!), and could verify I get the same behavior in Release mode. If, on the other hand, I compile in Debug mode and run DebugView (from
https://technet.microsoft.com/en-us/sys ... 96647.aspx), I see the following output:
00000003 218.38343811 [3564] Device Thread, starting IR device I/O thread
00000004 218.38426208 [3564] Attempting to open \\?\root#system#0002#{7951772d-cd50-49b7-b103-2baac494fc57}\port1
00000005 218.38540649 [3564] ***************** OutputConnectionsThreadProc() before wait
00000006 218.38577271 [3564] OpenUsb = TRUE
00000007 218.38586426 [3564] Device Thread, connected to IR device
00000008 218.38587952 [3564] VistaGetDeviceCapabilities() ENTER
00000009 218.38591003 [3564] IoControl ENTER
00000010 218.38595581 [3564] IoControl: hReadPipe is valid
00000011 218.38597107 [3564] IoControl: Event created successfully
00000012 218.38633728 [3564] IoControl: about to wait for the event...
00000013 218.38638306 [3564] IoControl: bytesReturned=40
00000014 218.38641357 [3564] IoControl EXIT
00000015 218.38642883 [3564] Device Capabilities:
00000016 218.38645935 [3564] NumTxPorts: 2
00000017 218.38647461 [3564] NumRxPorts: 2
00000018 218.38650513 [3564] LearnPortMask: 0x1
00000019 218.38652039 [3564] ReceivePort: 1
00000020 218.38656616 [3564] LearnPort: 0
00000021 218.38658142 [3564] DetailsFlags: 0x4
00000022 218.38661194 [3564] Device Thread, before StartReceive
00000023 218.38662720 [3564] VistaStartReceive() ENTER
00000024 218.38665771 [3564] IoControl ENTER
00000025 218.38667297 [3564] IoControl: hReadPipe is valid
00000026 218.38670349 [3564] IoControl: Event created successfully
00000027 218.38706970 [3564] IoControl: about to wait for the event...
00000028 218.38708496 [3564] IoControl: bytesReturned=0
00000029 218.38711548 [3564] IoControl EXIT
00000030 218.38713074 [3564] Device Thread, after StartReceive
00000031 218.38717651 [3564] Device Thread, mode set to normal receive port
00000032 218.38720703 [3564] Device Thread, before IoControl
00000033 218.38722229 [3564] IoControl ENTER
00000034 218.38723755 [3564] IoControl: hReadPipe is valid
00000035 218.38726807 [3564] IoControl: Event created successfully
00000036 218.38758850 [3564] IoControl: about to wait for the event...
00000037 219.16162109 [3564] ***************** OutputConnectionsThreadProc() after wait, Stop = 0
00000038 219.16171265 [3564] ***************** OutputConnectionsThreadProc() starting LOOP?
No more messages come through after the last line, which leads me to believe that the service enters some sort of deadlock at this point. Restarting it manually through Windows reproduces the exact same log.
This is where I'm stuck and trying to investigate further. My suspicion is that something changed in the IR drivers and handling on Win 8.1, but that's about it.
Please, if anybody with more experience in this has some pointers on where to start looking or more data I can provide, I'd be pretty happy!