Linux From where does Kodi get the scan-codes from a remote control??
#1
I ask this question because I am totally confused by now.

My setup is briefly this: Kodi/Kodibuntu 15.1 running on a Zotac MAG. My IR receiver is the one embedded in a Hauppauge WinTV NOVA-TD USB-dongle and the remote is a Logitech Harmony 650 emulating the DSR-112 remote that came with the Hauppauge dongle.

The remote did not work out of the box, so I spent some time getting Lirc to accept the remote. This work was successful in that I would get the correct key codes from the remote with 'irw' (link to LIRC site). But Kodi did still not respond to the remote.

By chance I stumbled on LB06's excellent post on the Kodi forum so I followed the advise given there. I ditched Lirc and got a keytable that corresponds to the remote – dib0700_rc5. This table gives the correct key codes when I run 'ir-keytable -t' Still no dice with Kodi.

The funny thing – and what puzzles me – is that Kodi does not use Lirc and apparently not the loaded keytable either. I discovered that Kodi did respond to a few (Up, Down, Left, Right, Exit/Back) keys on the remote whether or not lircd was started or not. Turning on debug in Kodi I have seen the following:

Code:
20:45:28 T:140573523589056   DEBUG: Keyboard: scancode: 0x6f, sym: 0x0111, unicode: 0x0000, modifier: 0x0
20:45:28 T:140573523589056   DEBUG: OnKey: up (0xf080) pressed, action is Up
20:45:30 T:140573523589056   DEBUG: Keyboard: scancode: 0x74, sym: 0x0112, unicode: 0x0000, modifier: 0x0
20:45:30 T:140573523589056   DEBUG: OnKey: down (0xf081) pressed, action is Down
20:45:32 T:140573523589056   DEBUG: Keyboard: scancode: 0x72, sym: 0x0113, unicode: 0x0000, modifier: 0x0
20:45:32 T:140573523589056   DEBUG: OnKey: right (0xf083) pressed, action is Right
20:45:34 T:140573523589056   DEBUG: Keyboard: scancode: 0x71, sym: 0x0114, unicode: 0x0000, modifier: 0x0
20:45:34 T:140573523589056   DEBUG: OnKey: left (0xf082) pressed, action is Left
20:45:36 T:140573523589056   DEBUG: Keyboard: scancode: 0xa6, sym: 0x00a6, unicode: 0x0000, modifier: 0x0
20:45:36 T:140573523589056   DEBUG: OnKey: browser_back (0xf0b0) pressed, action is Back

The codes listed here are nowhere to be found in the key table for the remote, where the corresponding keys are these: (found by grepping the output from 'ir-keytable -t')

Code:
scancode 0x1d14 = KEY_UP (0x67)
scancode 0x1e14 = KEY_UP (0x67)
scancode 0xeb10 = KEY_UP (0x67)
scancode 0x1d15 = KEY_DOWN (0x6c)
scancode 0x1e15 = KEY_DOWN (0x6c)
scancode 0xeb14 = KEY_DOWN (0x6c)
scancode 0x1d16 = KEY_LEFT (0x69)
scancode 0x1e16 = KEY_LEFT (0x69)
scancode 0xeb11 = KEY_LEFT (0x69)
scancode 0x1d17 = KEY_RIGHT (0x6a)
scancode 0x1e17 = KEY_RIGHT (0x6a)
scancode 0xeb13 = KEY_RIGHT (0x6a)
scancode 0x1d1f = KEY_BACK (0x9e)
scancode 0x1e1f = KEY_BACK (0x9e)
scancode 0xeb4d = KEY_BACK (0x9e)

So that leaves me with this question: From where does Kodi get the scancodes listed in the debug output??

I have tried to be as brief and concise as possible in the above. I know there is a lot of information (or is it just data?) available, but I have no idea what might be relevant in this connection.

So what tree should I bark up?
Reply


Messages In This Thread
From where does Kodi get the scan-codes from a remote control?? - by bentb - 2015-08-27, 20:56
Logout Mark Read Team Forum Stats Members Help
From where does Kodi get the scan-codes from a remote control??0