diff mbox

ir-keytable: infinite loops, segfaults

Message ID 20161124121253.GA17639@shambles.local (mailing list archive)
State New, archived
Headers show

Commit Message

Vincent McIntyre Nov. 24, 2016, 12:12 p.m. UTC
On Wed, Nov 23, 2016 at 10:34:19PM +0000, Sean Young wrote:
> > Not sure why Driver is (null), dvb_usb_cxusb is loaded.
> 
> That's a mistake, I've fixed that now.

Ah. I see the added module_name struct members.

> > I tried -t and it generated events constantly, before I could press
> > any keys.
> > # ir-keytable -s rc1 -t
> > Testing events. Please, press CTRL-C to abort.
> > 1479903007.535509: event type EV_MSC(0x04): scancode = 0x00
> > 1479903007.535509: event type EV_SYN(0x00).
> > 1479903007.635521: event type EV_MSC(0x04): scancode = 0x00
> 
> That's also been fixed.
> 

yep, works nicely.

Things are looking much better!
As shown below I am able to clear a keytable and put in a fresh one.
Having a bit of trouble with key remapping.
I guess we still have to work out the protocol in use.

Test details:
# ir-keytable -v
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc0/input8/
Event sysfs node is /sys/class/rc/rc0/input8/event5/
Parsing uevent /sys/class/rc/rc0/input8/event5/uevent
/sys/class/rc/rc0/input8/event5/uevent uevent MAJOR=13
/sys/class/rc/rc0/input8/event5/uevent uevent MINOR=69
/sys/class/rc/rc0/input8/event5/uevent uevent DEVNAME=input/event5
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-imon-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=imon
input device is /dev/input/event5
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
	Driver imon, table rc-imon-mce
	Supported protocols: rc-6 
	Enabled protocols: rc-6 
	Name: iMON Remote (15c2:ffdc)
	bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Found /sys/class/rc/rc1/ (/dev/input/event15) with:
	Driver dvb_usb_cxusb, table rc-dvico-mce
	Supported protocols: unknown 
	Enabled protocols: 
	Name: IR-receiver inside an USB DVB re
	bus: 3, vendor/product: 0fe9:db78, version: 0x827b
Input sysfs node is /sys/class/rc/rc2/input19/
Event sysfs node is /sys/class/rc/rc2/input19/event16/
Parsing uevent /sys/class/rc/rc2/input19/event16/uevent
/sys/class/rc/rc2/input19/event16/uevent uevent MAJOR=13
/sys/class/rc/rc2/input19/event16/uevent uevent MINOR=80
/sys/class/rc/rc2/input19/event16/uevent uevent DEVNAME=input/event16
Parsing uevent /sys/class/rc/rc2/uevent
/sys/class/rc/rc2/uevent uevent NAME=rc-empty
/sys/class/rc/rc2/uevent uevent DRV_NAME=dvb_usb_af9035
input device is /dev/input/event16
/sys/class/rc/rc2/protocols protocol nec (disabled)
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
	Driver dvb_usb_af9035, table rc-empty
	Supported protocols: nec 
	Enabled protocols: 
	Name: Leadtek WinFast DTV Dongle Dual
	bus: 3, vendor/product: 0413:6a05, version: 0x0200
	Repeat delay = 500 ms, repeat period = 125 ms
	Repeat delay = 500 ms, repeat period = 125 ms
	Repeat delay = 500 ms, repeat period = 125 ms

# ir-keytable -r -v -s rc1
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Opening /dev/input/event15
Input Protocol version: 0x00010001
Enabled protocols: 
scancode 0xfe01 = KEY_RECORD (0xa7)
scancode 0xfe02 = KEY_TV (0x179)
scancode 0xfe03 = KEY_0 (0x0b)
scancode 0xfe05 = KEY_VOLUMEDOWN (0x72)
scancode 0xfe07 = KEY_4 (0x05)
scancode 0xfe09 = KEY_CHANNELDOWN (0x193)
scancode 0xfe0a = KEY_EPG (0x16d)
scancode 0xfe0b = KEY_1 (0x02)
scancode 0xfe0d = KEY_STOP (0x80)
scancode 0xfe0e = KEY_MP3 (0x187)
scancode 0xfe0f = KEY_PREVIOUSSONG (0xa5)
scancode 0xfe11 = KEY_CHANNELUP (0x192)
scancode 0xfe12 = KEY_NEXTSONG (0xa3)
scancode 0xfe13 = KEY_ANGLE (0x173)
scancode 0xfe15 = KEY_VOLUMEUP (0x73)
scancode 0xfe16 = KEY_SETUP (0x8d)
scancode 0xfe17 = KEY_2 (0x03)
scancode 0xfe19 = KEY_OPEN (0x86)
scancode 0xfe1a = KEY_DVD (0x185)
scancode 0xfe1b = KEY_3 (0x04)
scancode 0xfe1e = KEY_FAVORITES (0x16c)
scancode 0xfe1f = KEY_ZOOM (0x174)
scancode 0xfe42 = KEY_ENTER (0x1c)
scancode 0xfe43 = KEY_REWIND (0xa8)
scancode 0xfe46 = KEY_POWER2 (0x164)
scancode 0xfe47 = KEY_PLAYPAUSE (0xa4)
scancode 0xfe48 = KEY_7 (0x08)
scancode 0xfe49 = KEY_BACK (0x9e)
scancode 0xfe4c = KEY_8 (0x09)
scancode 0xfe4d = KEY_MENU (0x8b)
scancode 0xfe4e = KEY_POWER (0x74)
scancode 0xfe4f = KEY_FASTFORWARD (0xd0)
scancode 0xfe50 = KEY_5 (0x06)
scancode 0xfe51 = KEY_UP (0x67)
scancode 0xfe52 = KEY_CAMERA (0xd4)
scancode 0xfe53 = KEY_DOWN (0x6c)
scancode 0xfe54 = KEY_6 (0x07)
scancode 0xfe55 = KEY_TAB (0x0f)
scancode 0xfe57 = KEY_MUTE (0x71)
scancode 0xfe58 = KEY_9 (0x0a)
scancode 0xfe59 = KEY_INFO (0x166)
scancode 0xfe5a = KEY_TUNER (0x182)
scancode 0xfe5b = KEY_LEFT (0x69)
scancode 0xfe5e = KEY_OK (0x160)
scancode 0xfe5f = KEY_RIGHT (0x6a)

# ir-keytable -s rc1 -t
Testing events. Please, press CTRL-C to abort.
1479985656.760267: event type EV_MSC(0x04): scancode = 0xfe47
1479985656.760267: event type EV_KEY(0x01) key_down: KEY_PLAYPAUSE(0x00a4)
1479985656.760267: event type EV_SYN(0x00).
1479985657.011045: event type EV_KEY(0x01) key_up: KEY_PLAYPAUSE(0x00a4)
1479985657.011045: event type EV_SYN(0x00).
1479985671.812267: event type EV_MSC(0x04): scancode = 0xfe53
1479985671.812267: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c)
1479985671.812267: event type EV_SYN(0x00).
1479985672.063048: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c)
1479985672.063048: event type EV_SYN(0x00).
1479985674.520279: event type EV_MSC(0x04): scancode = 0xfe52
1479985674.520279: event type EV_KEY(0x01) key_down: KEY_CAMERA(0x00d4)
1479985674.520279: event type EV_SYN(0x00).
1479985674.771044: event type EV_KEY(0x01) key_up: KEY_CAMERA(0x00d4)
1479985674.771044: event type EV_SYN(0x00).
1479985675.628312: event type EV_MSC(0x04): scancode = 0xfe4d
1479985675.628312: event type EV_KEY(0x01) key_down: KEY_MENU(0x008b)
1479985675.628312: event type EV_SYN(0x00).
1479985675.879045: event type EV_KEY(0x01) key_up: KEY_MENU(0x008b)
1479985675.879045: event type EV_SYN(0x00).
1479985677.732236: event type EV_MSC(0x04): scancode = 0xfe49
1479985677.732236: event type EV_KEY(0x01) key_down: KEY_BACK(0x009e)
1479985677.732236: event type EV_SYN(0x00).
1479985677.983043: event type EV_KEY(0x01) key_up: KEY_BACK(0x009e)
1479985677.983043: event type EV_SYN(0x00).
1479985687.464239: event type EV_MSC(0x04): scancode = 0xfe5e
1479985687.464239: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
1479985687.464239: event type EV_SYN(0x00).
1479985687.715043: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
1479985687.715043: event type EV_SYN(0x00).
1479985696.396382: event type EV_MSC(0x04): scancode = 0xfe42
1479985696.396382: event type EV_KEY(0x01) key_down: KEY_ENTER(0x001c)
1479985696.396382: event type EV_SYN(0x00).
1479985696.647049: event type EV_KEY(0x01) key_up: KEY_ENTER(0x001c)
1479985696.647049: event type EV_SYN(0x00).
1479985701.220194: event type EV_MSC(0x04): scancode = 0xfe0d
1479985701.220194: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
1479985701.220194: event type EV_SYN(0x00).
1479985701.471047: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
1479985701.471047: event type EV_SYN(0x00).
^C

# diff  dvice_mce dvico_mce_new

# ir-keyable -v -s rc1 -c
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Opening /dev/input/event15
Input Protocol version: 0x00010001
Deleting entry 1
Deleting entry 2
Deleting entry 3
Deleting entry 4
Deleting entry 5
Deleting entry 6
Deleting entry 7
Deleting entry 8
Deleting entry 9
Deleting entry 10
Deleting entry 11
Deleting entry 12
Deleting entry 13
Deleting entry 14
Deleting entry 15
Deleting entry 16
Deleting entry 17
Deleting entry 18
Deleting entry 19
Deleting entry 20
Deleting entry 21
Deleting entry 22
Deleting entry 23
Deleting entry 24
Deleting entry 25
Deleting entry 26
Deleting entry 27
Deleting entry 28
Deleting entry 29
Deleting entry 30
Deleting entry 31
Deleting entry 32
Deleting entry 33
Deleting entry 34
Deleting entry 35
Deleting entry 36
Deleting entry 37
Deleting entry 38
Deleting entry 39
Deleting entry 40
Deleting entry 41
Deleting entry 42
Deleting entry 43
Deleting entry 44
Deleting entry 45
Deleting entry 46
Old keytable cleared

# ir-keyable -v -s rc1 -w dvico-mce-new
Parsing ./dvico_mce_new keycode file
parsing 0xfe02=KEY_TV:	value=377
parsing 0xfe0e=KEY_MP3:	value=391
parsing 0xfe1a=KEY_DVD:	value=389
parsing 0xfe1e=KEY_FAVORITES:	value=364
parsing 0xfe16=KEY_SETUP:	value=141
parsing 0xfe46=KEY_POWER2:	value=356
parsing 0xfe0a=KEY_EPG:	value=365
parsing 0xfe49=KEY_BACK:	value=158
parsing 0xfe4d=KEY_MENU:	value=139
parsing 0xfe51=KEY_UP:	value=103
parsing 0xfe5b=KEY_LEFT:	value=105
parsing 0xfe5f=KEY_RIGHT:	value=106
parsing 0xfe53=KEY_DOWN:	value=108
parsing 0xfe5e=KEY_ENTER:	value=28
parsing 0xfe59=KEY_INFO:	value=358
parsing 0xfe55=KEY_TAB:	value=15
parsing 0xfe0f=KEY_PREVIOUSSONG:	value=165
parsing 0xfe12=KEY_NEXTSONG:	value=163
parsing 0xfe42=KEY_ENTER:	value=28
parsing 0xfe15=KEY_VOLUMEUP:	value=115
parsing 0xfe05=KEY_VOLUMEDOWN:	value=114
parsing 0xfe11=KEY_CHANNELUP:	value=402
parsing 0xfe09=KEY_CHANNELDOWN:	value=403
parsing 0xfe52=KEY_CAMERA:	value=212
parsing 0xfe5a=KEY_TUNER:	value=386
parsing 0xfe19=KEY_OPEN:	value=134
parsing 0xfe0b=KEY_1:	value=2
parsing 0xfe17=KEY_2:	value=3
parsing 0xfe1b=KEY_3:	value=4
parsing 0xfe07=KEY_4:	value=5
parsing 0xfe50=KEY_5:	value=6
parsing 0xfe54=KEY_6:	value=7
parsing 0xfe48=KEY_7:	value=8
parsing 0xfe4c=KEY_8:	value=9
parsing 0xfe58=KEY_9:	value=10
parsing 0xfe13=KEY_ANGLE:	value=371
parsing 0xfe03=KEY_0:	value=11
parsing 0xfe1f=KEY_ZOOM:	value=372
parsing 0xfe43=KEY_REWIND:	value=168
parsing 0xfe47=KEY_PLAYPAUSE:	value=164
parsing 0xfe4f=KEY_FASTFORWARD:	value=208
parsing 0xfe57=KEY_MUTE:	value=113
parsing 0xfe0d=KEY_STOP:	value=128
parsing 0xfe01=KEY_RECORD:	value=167
parsing 0xfe4e=KEY_POWER:	value=116
Read dvico_mce table
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Opening /dev/input/event15
Input Protocol version: 0x00010001
	fe4e=0074
	fe01=00a7
	fe0d=0080
	fe57=0071
	fe4f=00d0
	fe47=00a4
	fe43=00a8
	fe1f=0174
	fe03=000b
	fe13=0173
	fe58=000a
	fe4c=0009
	fe48=0008
	fe54=0007
	fe50=0006
	fe07=0005
	fe1b=0004
	fe17=0003
	fe0b=0002
	fe19=0086
	fe5a=0182
	fe52=00d4
	fe09=0193
	fe11=0192
	fe05=0072
	fe15=0073
	fe42=001c
	fe12=00a3
	fe0f=00a5
	fe55=000f
	fe59=0166
	fe5e=001c
	fe53=006c
	fe5f=006a
	fe5b=0069
	fe51=0067
	fe4d=008b
	fe49=009e
	fe0a=016d
	fe46=0164
	fe16=008d
	fe1e=016c
	fe1a=0185
	fe0e=0187
	fe02=0179
Wrote 45 keycode(s) to driver
/sys/class/rc/rc1//protocols: Invalid argument
Couldn't change the IR protocols

# ir-keyable -v -s rc1 -r
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Opening /dev/input/event15
Input Protocol version: 0x00010001
Enabled protocols: 
scancode 0xfe01 = KEY_RECORD (0xa7)
scancode 0xfe02 = KEY_TV (0x179)
scancode 0xfe03 = KEY_0 (0x0b)
scancode 0xfe05 = KEY_VOLUMEDOWN (0x72)
scancode 0xfe07 = KEY_4 (0x05)
scancode 0xfe09 = KEY_CHANNELDOWN (0x193)
scancode 0xfe0a = KEY_EPG (0x16d)
scancode 0xfe0b = KEY_1 (0x02)
scancode 0xfe0d = KEY_STOP (0x80)
scancode 0xfe0e = KEY_MP3 (0x187)
scancode 0xfe0f = KEY_PREVIOUSSONG (0xa5)
scancode 0xfe11 = KEY_CHANNELUP (0x192)
scancode 0xfe12 = KEY_NEXTSONG (0xa3)
scancode 0xfe13 = KEY_ANGLE (0x173)
scancode 0xfe15 = KEY_VOLUMEUP (0x73)
scancode 0xfe16 = KEY_SETUP (0x8d)
scancode 0xfe17 = KEY_2 (0x03)
scancode 0xfe19 = KEY_OPEN (0x86)
scancode 0xfe1a = KEY_DVD (0x185)
scancode 0xfe1b = KEY_3 (0x04)
scancode 0xfe1e = KEY_FAVORITES (0x16c)
scancode 0xfe1f = KEY_ZOOM (0x174)
scancode 0xfe42 = KEY_ENTER (0x1c)
scancode 0xfe43 = KEY_REWIND (0xa8)
scancode 0xfe46 = KEY_POWER2 (0x164)
scancode 0xfe47 = KEY_PLAYPAUSE (0xa4)
scancode 0xfe48 = KEY_7 (0x08)
scancode 0xfe49 = KEY_BACK (0x9e)
scancode 0xfe4c = KEY_8 (0x09)
scancode 0xfe4d = KEY_MENU (0x8b)
scancode 0xfe4e = KEY_POWER (0x74)
scancode 0xfe4f = KEY_FASTFORWARD (0xd0)
scancode 0xfe50 = KEY_5 (0x06)
scancode 0xfe51 = KEY_UP (0x67)
scancode 0xfe52 = KEY_CAMERA (0xd4)
scancode 0xfe53 = KEY_DOWN (0x6c)
scancode 0xfe54 = KEY_6 (0x07)
scancode 0xfe55 = KEY_TAB (0x0f)
scancode 0xfe57 = KEY_MUTE (0x71)
scancode 0xfe58 = KEY_9 (0x0a)
scancode 0xfe59 = KEY_INFO (0x166)
scancode 0xfe5a = KEY_TUNER (0x182)
scancode 0xfe5b = KEY_LEFT (0x69)
scancode 0xfe5e = KEY_ENTER (0x1c)    ##NB
scancode 0xfe5f = KEY_RIGHT (0x6a)

# cat /sys/class/rc/rc1/protocols
unknown

Mapping KEY_OK to KEY_ENTER worked (ie the behaviour when the
OK key was pressed changed), but others did not. For example
I mapped KEY_BACK (0x9e, decimal 158) to KEY_ESC (001)
and KEY_PLAYPAUSE (0xa4, 164) to KEY_PAUSE (119).
But I did not observe any change in behaviour for these two.
ir-keytable -t did show the correct KEY_foo and descimal code, eg.
# ir-keytable -s rc1 -t
Testing events. Please, press CTRL-C to abort.
1479989250.528206: event type EV_MSC(0x04): scancode = 0xfe47
1479989250.528206: event type EV_KEY(0x01) key_down: KEY_PAUSE(0x0077)
1479989250.528206: event type EV_SYN(0x00).
1479989250.779044: event type EV_KEY(0x01) key_up: KEY_PAUSE(0x0077)
1479989250.779044: event type EV_SYN(0x00).
^C

I notice that KEY_ENTER existed in the original keymap but _PAUSE
and _ESC don't, but I don't understand the significance of that.

Vince

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sean Young Nov. 24, 2016, 1:34 p.m. UTC | #1
On Thu, Nov 24, 2016 at 11:12:57PM +1100, Vincent McIntyre wrote:
> On Wed, Nov 23, 2016 at 10:34:19PM +0000, Sean Young wrote:
> > > Not sure why Driver is (null), dvb_usb_cxusb is loaded.
> > 
> > That's a mistake, I've fixed that now.
> 
> Ah. I see the added module_name struct members.
> 
> > > I tried -t and it generated events constantly, before I could press
> > > any keys.
> > > # ir-keytable -s rc1 -t
> > > Testing events. Please, press CTRL-C to abort.
> > > 1479903007.535509: event type EV_MSC(0x04): scancode = 0x00
> > > 1479903007.535509: event type EV_SYN(0x00).
> > > 1479903007.635521: event type EV_MSC(0x04): scancode = 0x00
> > 
> > That's also been fixed.
> > 
> 
> yep, works nicely.
> 
> Things are looking much better!
> As shown below I am able to clear a keytable and put in a fresh one.
> Having a bit of trouble with key remapping.
> I guess we still have to work out the protocol in use.
> 
> Test details:
> # ir-keytable -v
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc0/input8/
> Event sysfs node is /sys/class/rc/rc0/input8/event5/
> Parsing uevent /sys/class/rc/rc0/input8/event5/uevent
> /sys/class/rc/rc0/input8/event5/uevent uevent MAJOR=13
> /sys/class/rc/rc0/input8/event5/uevent uevent MINOR=69
> /sys/class/rc/rc0/input8/event5/uevent uevent DEVNAME=input/event5
> Parsing uevent /sys/class/rc/rc0/uevent
> /sys/class/rc/rc0/uevent uevent NAME=rc-imon-mce
> /sys/class/rc/rc0/uevent uevent DRV_NAME=imon
> input device is /dev/input/event5
> /sys/class/rc/rc0/protocols protocol rc-6 (enabled)
> Found /sys/class/rc/rc0/ (/dev/input/event5) with:
> 	Driver imon, table rc-imon-mce
> 	Supported protocols: rc-6 
> 	Enabled protocols: rc-6 
> 	Name: iMON Remote (15c2:ffdc)
> 	bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
> Input sysfs node is /sys/class/rc/rc1/input18/
> Event sysfs node is /sys/class/rc/rc1/input18/event15/
> Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
> /sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
> /sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event15
> /sys/class/rc/rc1/protocols protocol unknown (disabled)
> Found /sys/class/rc/rc1/ (/dev/input/event15) with:
> 	Driver dvb_usb_cxusb, table rc-dvico-mce
> 	Supported protocols: unknown 
> 	Enabled protocols: 
> 	Name: IR-receiver inside an USB DVB re
> 	bus: 3, vendor/product: 0fe9:db78, version: 0x827b
> Input sysfs node is /sys/class/rc/rc2/input19/
> Event sysfs node is /sys/class/rc/rc2/input19/event16/
> Parsing uevent /sys/class/rc/rc2/input19/event16/uevent
> /sys/class/rc/rc2/input19/event16/uevent uevent MAJOR=13
> /sys/class/rc/rc2/input19/event16/uevent uevent MINOR=80
> /sys/class/rc/rc2/input19/event16/uevent uevent DEVNAME=input/event16
> Parsing uevent /sys/class/rc/rc2/uevent
> /sys/class/rc/rc2/uevent uevent NAME=rc-empty
> /sys/class/rc/rc2/uevent uevent DRV_NAME=dvb_usb_af9035
> input device is /dev/input/event16
> /sys/class/rc/rc2/protocols protocol nec (disabled)
> Found /sys/class/rc/rc2/ (/dev/input/event16) with:
> 	Driver dvb_usb_af9035, table rc-empty
> 	Supported protocols: nec 
> 	Enabled protocols: 
> 	Name: Leadtek WinFast DTV Dongle Dual
> 	bus: 3, vendor/product: 0413:6a05, version: 0x0200
> 	Repeat delay = 500 ms, repeat period = 125 ms
> 	Repeat delay = 500 ms, repeat period = 125 ms
> 	Repeat delay = 500 ms, repeat period = 125 ms
> 
> # ir-keytable -r -v -s rc1
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc1/input18/
> Event sysfs node is /sys/class/rc/rc1/input18/event15/
> Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
> /sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
> /sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event15
> /sys/class/rc/rc1/protocols protocol unknown (disabled)
> Opening /dev/input/event15
> Input Protocol version: 0x00010001
> Enabled protocols: 
> scancode 0xfe01 = KEY_RECORD (0xa7)
> scancode 0xfe02 = KEY_TV (0x179)
> scancode 0xfe03 = KEY_0 (0x0b)
> scancode 0xfe05 = KEY_VOLUMEDOWN (0x72)
> scancode 0xfe07 = KEY_4 (0x05)
> scancode 0xfe09 = KEY_CHANNELDOWN (0x193)
> scancode 0xfe0a = KEY_EPG (0x16d)
> scancode 0xfe0b = KEY_1 (0x02)
> scancode 0xfe0d = KEY_STOP (0x80)
> scancode 0xfe0e = KEY_MP3 (0x187)
> scancode 0xfe0f = KEY_PREVIOUSSONG (0xa5)
> scancode 0xfe11 = KEY_CHANNELUP (0x192)
> scancode 0xfe12 = KEY_NEXTSONG (0xa3)
> scancode 0xfe13 = KEY_ANGLE (0x173)
> scancode 0xfe15 = KEY_VOLUMEUP (0x73)
> scancode 0xfe16 = KEY_SETUP (0x8d)
> scancode 0xfe17 = KEY_2 (0x03)
> scancode 0xfe19 = KEY_OPEN (0x86)
> scancode 0xfe1a = KEY_DVD (0x185)
> scancode 0xfe1b = KEY_3 (0x04)
> scancode 0xfe1e = KEY_FAVORITES (0x16c)
> scancode 0xfe1f = KEY_ZOOM (0x174)
> scancode 0xfe42 = KEY_ENTER (0x1c)
> scancode 0xfe43 = KEY_REWIND (0xa8)
> scancode 0xfe46 = KEY_POWER2 (0x164)
> scancode 0xfe47 = KEY_PLAYPAUSE (0xa4)
> scancode 0xfe48 = KEY_7 (0x08)
> scancode 0xfe49 = KEY_BACK (0x9e)
> scancode 0xfe4c = KEY_8 (0x09)
> scancode 0xfe4d = KEY_MENU (0x8b)
> scancode 0xfe4e = KEY_POWER (0x74)
> scancode 0xfe4f = KEY_FASTFORWARD (0xd0)
> scancode 0xfe50 = KEY_5 (0x06)
> scancode 0xfe51 = KEY_UP (0x67)
> scancode 0xfe52 = KEY_CAMERA (0xd4)
> scancode 0xfe53 = KEY_DOWN (0x6c)
> scancode 0xfe54 = KEY_6 (0x07)
> scancode 0xfe55 = KEY_TAB (0x0f)
> scancode 0xfe57 = KEY_MUTE (0x71)
> scancode 0xfe58 = KEY_9 (0x0a)
> scancode 0xfe59 = KEY_INFO (0x166)
> scancode 0xfe5a = KEY_TUNER (0x182)
> scancode 0xfe5b = KEY_LEFT (0x69)
> scancode 0xfe5e = KEY_OK (0x160)
> scancode 0xfe5f = KEY_RIGHT (0x6a)
> 
> # ir-keytable -s rc1 -t
> Testing events. Please, press CTRL-C to abort.
> 1479985656.760267: event type EV_MSC(0x04): scancode = 0xfe47
> 1479985656.760267: event type EV_KEY(0x01) key_down: KEY_PLAYPAUSE(0x00a4)
> 1479985656.760267: event type EV_SYN(0x00).
> 1479985657.011045: event type EV_KEY(0x01) key_up: KEY_PLAYPAUSE(0x00a4)
> 1479985657.011045: event type EV_SYN(0x00).
> 1479985671.812267: event type EV_MSC(0x04): scancode = 0xfe53
> 1479985671.812267: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c)
> 1479985671.812267: event type EV_SYN(0x00).
> 1479985672.063048: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c)
> 1479985672.063048: event type EV_SYN(0x00).
> 1479985674.520279: event type EV_MSC(0x04): scancode = 0xfe52
> 1479985674.520279: event type EV_KEY(0x01) key_down: KEY_CAMERA(0x00d4)
> 1479985674.520279: event type EV_SYN(0x00).
> 1479985674.771044: event type EV_KEY(0x01) key_up: KEY_CAMERA(0x00d4)
> 1479985674.771044: event type EV_SYN(0x00).
> 1479985675.628312: event type EV_MSC(0x04): scancode = 0xfe4d
> 1479985675.628312: event type EV_KEY(0x01) key_down: KEY_MENU(0x008b)
> 1479985675.628312: event type EV_SYN(0x00).
> 1479985675.879045: event type EV_KEY(0x01) key_up: KEY_MENU(0x008b)
> 1479985675.879045: event type EV_SYN(0x00).
> 1479985677.732236: event type EV_MSC(0x04): scancode = 0xfe49
> 1479985677.732236: event type EV_KEY(0x01) key_down: KEY_BACK(0x009e)
> 1479985677.732236: event type EV_SYN(0x00).
> 1479985677.983043: event type EV_KEY(0x01) key_up: KEY_BACK(0x009e)
> 1479985677.983043: event type EV_SYN(0x00).
> 1479985687.464239: event type EV_MSC(0x04): scancode = 0xfe5e
> 1479985687.464239: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
> 1479985687.464239: event type EV_SYN(0x00).
> 1479985687.715043: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
> 1479985687.715043: event type EV_SYN(0x00).
> 1479985696.396382: event type EV_MSC(0x04): scancode = 0xfe42
> 1479985696.396382: event type EV_KEY(0x01) key_down: KEY_ENTER(0x001c)
> 1479985696.396382: event type EV_SYN(0x00).
> 1479985696.647049: event type EV_KEY(0x01) key_up: KEY_ENTER(0x001c)
> 1479985696.647049: event type EV_SYN(0x00).
> 1479985701.220194: event type EV_MSC(0x04): scancode = 0xfe0d
> 1479985701.220194: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
> 1479985701.220194: event type EV_SYN(0x00).
> 1479985701.471047: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
> 1479985701.471047: event type EV_SYN(0x00).
> ^C
> 
> # diff  dvice_mce dvico_mce_new
> --- dvico_mce   2016-11-24 22:18:48.000000000 +1100
> +++ dvico_mce_new   2016-11-24 22:11:02.000000000 +1100
> @@ -12,7 +12,7 @@
>  0xfe5b KEY_LEFT
>  0xfe5f KEY_RIGHT
>  0xfe53 KEY_DOWN
> -0xfe5e KEY_OK
> +0xfe5e KEY_ENTER
>  0xfe59 KEY_INFO
>  0xfe55 KEY_TAB
>  0xfe0f KEY_PREVIOUSSONG
> 
> # ir-keyable -v -s rc1 -c
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc1/input18/
> Event sysfs node is /sys/class/rc/rc1/input18/event15/
> Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
> /sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
> /sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event15
> /sys/class/rc/rc1/protocols protocol unknown (disabled)
> Opening /dev/input/event15
> Input Protocol version: 0x00010001
> Deleting entry 1
> Deleting entry 2
> Deleting entry 3
> Deleting entry 4
> Deleting entry 5
> Deleting entry 6
> Deleting entry 7
> Deleting entry 8
> Deleting entry 9
> Deleting entry 10
> Deleting entry 11
> Deleting entry 12
> Deleting entry 13
> Deleting entry 14
> Deleting entry 15
> Deleting entry 16
> Deleting entry 17
> Deleting entry 18
> Deleting entry 19
> Deleting entry 20
> Deleting entry 21
> Deleting entry 22
> Deleting entry 23
> Deleting entry 24
> Deleting entry 25
> Deleting entry 26
> Deleting entry 27
> Deleting entry 28
> Deleting entry 29
> Deleting entry 30
> Deleting entry 31
> Deleting entry 32
> Deleting entry 33
> Deleting entry 34
> Deleting entry 35
> Deleting entry 36
> Deleting entry 37
> Deleting entry 38
> Deleting entry 39
> Deleting entry 40
> Deleting entry 41
> Deleting entry 42
> Deleting entry 43
> Deleting entry 44
> Deleting entry 45
> Deleting entry 46
> Old keytable cleared
> 
> # ir-keyable -v -s rc1 -w dvico-mce-new
> Parsing ./dvico_mce_new keycode file
> parsing 0xfe02=KEY_TV:	value=377
> parsing 0xfe0e=KEY_MP3:	value=391
> parsing 0xfe1a=KEY_DVD:	value=389
> parsing 0xfe1e=KEY_FAVORITES:	value=364
> parsing 0xfe16=KEY_SETUP:	value=141
> parsing 0xfe46=KEY_POWER2:	value=356
> parsing 0xfe0a=KEY_EPG:	value=365
> parsing 0xfe49=KEY_BACK:	value=158
> parsing 0xfe4d=KEY_MENU:	value=139
> parsing 0xfe51=KEY_UP:	value=103
> parsing 0xfe5b=KEY_LEFT:	value=105
> parsing 0xfe5f=KEY_RIGHT:	value=106
> parsing 0xfe53=KEY_DOWN:	value=108
> parsing 0xfe5e=KEY_ENTER:	value=28
> parsing 0xfe59=KEY_INFO:	value=358
> parsing 0xfe55=KEY_TAB:	value=15
> parsing 0xfe0f=KEY_PREVIOUSSONG:	value=165
> parsing 0xfe12=KEY_NEXTSONG:	value=163
> parsing 0xfe42=KEY_ENTER:	value=28
> parsing 0xfe15=KEY_VOLUMEUP:	value=115
> parsing 0xfe05=KEY_VOLUMEDOWN:	value=114
> parsing 0xfe11=KEY_CHANNELUP:	value=402
> parsing 0xfe09=KEY_CHANNELDOWN:	value=403
> parsing 0xfe52=KEY_CAMERA:	value=212
> parsing 0xfe5a=KEY_TUNER:	value=386
> parsing 0xfe19=KEY_OPEN:	value=134
> parsing 0xfe0b=KEY_1:	value=2
> parsing 0xfe17=KEY_2:	value=3
> parsing 0xfe1b=KEY_3:	value=4
> parsing 0xfe07=KEY_4:	value=5
> parsing 0xfe50=KEY_5:	value=6
> parsing 0xfe54=KEY_6:	value=7
> parsing 0xfe48=KEY_7:	value=8
> parsing 0xfe4c=KEY_8:	value=9
> parsing 0xfe58=KEY_9:	value=10
> parsing 0xfe13=KEY_ANGLE:	value=371
> parsing 0xfe03=KEY_0:	value=11
> parsing 0xfe1f=KEY_ZOOM:	value=372
> parsing 0xfe43=KEY_REWIND:	value=168
> parsing 0xfe47=KEY_PLAYPAUSE:	value=164
> parsing 0xfe4f=KEY_FASTFORWARD:	value=208
> parsing 0xfe57=KEY_MUTE:	value=113
> parsing 0xfe0d=KEY_STOP:	value=128
> parsing 0xfe01=KEY_RECORD:	value=167
> parsing 0xfe4e=KEY_POWER:	value=116
> Read dvico_mce table
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc1/input18/
> Event sysfs node is /sys/class/rc/rc1/input18/event15/
> Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
> /sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
> /sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event15
> /sys/class/rc/rc1/protocols protocol unknown (disabled)
> Opening /dev/input/event15
> Input Protocol version: 0x00010001
> 	fe4e=0074
> 	fe01=00a7
> 	fe0d=0080
> 	fe57=0071
> 	fe4f=00d0
> 	fe47=00a4
> 	fe43=00a8
> 	fe1f=0174
> 	fe03=000b
> 	fe13=0173
> 	fe58=000a
> 	fe4c=0009
> 	fe48=0008
> 	fe54=0007
> 	fe50=0006
> 	fe07=0005
> 	fe1b=0004
> 	fe17=0003
> 	fe0b=0002
> 	fe19=0086
> 	fe5a=0182
> 	fe52=00d4
> 	fe09=0193
> 	fe11=0192
> 	fe05=0072
> 	fe15=0073
> 	fe42=001c
> 	fe12=00a3
> 	fe0f=00a5
> 	fe55=000f
> 	fe59=0166
> 	fe5e=001c
> 	fe53=006c
> 	fe5f=006a
> 	fe5b=0069
> 	fe51=0067
> 	fe4d=008b
> 	fe49=009e
> 	fe0a=016d
> 	fe46=0164
> 	fe16=008d
> 	fe1e=016c
> 	fe1a=0185
> 	fe0e=0187
> 	fe02=0179
> Wrote 45 keycode(s) to driver
> /sys/class/rc/rc1//protocols: Invalid argument
> Couldn't change the IR protocols
> 
> # ir-keyable -v -s rc1 -r
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc1/input18/
> Event sysfs node is /sys/class/rc/rc1/input18/event15/
> Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
> /sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
> /sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event15
> /sys/class/rc/rc1/protocols protocol unknown (disabled)
> Opening /dev/input/event15
> Input Protocol version: 0x00010001
> Enabled protocols: 
> scancode 0xfe01 = KEY_RECORD (0xa7)
> scancode 0xfe02 = KEY_TV (0x179)
> scancode 0xfe03 = KEY_0 (0x0b)
> scancode 0xfe05 = KEY_VOLUMEDOWN (0x72)
> scancode 0xfe07 = KEY_4 (0x05)
> scancode 0xfe09 = KEY_CHANNELDOWN (0x193)
> scancode 0xfe0a = KEY_EPG (0x16d)
> scancode 0xfe0b = KEY_1 (0x02)
> scancode 0xfe0d = KEY_STOP (0x80)
> scancode 0xfe0e = KEY_MP3 (0x187)
> scancode 0xfe0f = KEY_PREVIOUSSONG (0xa5)
> scancode 0xfe11 = KEY_CHANNELUP (0x192)
> scancode 0xfe12 = KEY_NEXTSONG (0xa3)
> scancode 0xfe13 = KEY_ANGLE (0x173)
> scancode 0xfe15 = KEY_VOLUMEUP (0x73)
> scancode 0xfe16 = KEY_SETUP (0x8d)
> scancode 0xfe17 = KEY_2 (0x03)
> scancode 0xfe19 = KEY_OPEN (0x86)
> scancode 0xfe1a = KEY_DVD (0x185)
> scancode 0xfe1b = KEY_3 (0x04)
> scancode 0xfe1e = KEY_FAVORITES (0x16c)
> scancode 0xfe1f = KEY_ZOOM (0x174)
> scancode 0xfe42 = KEY_ENTER (0x1c)
> scancode 0xfe43 = KEY_REWIND (0xa8)
> scancode 0xfe46 = KEY_POWER2 (0x164)
> scancode 0xfe47 = KEY_PLAYPAUSE (0xa4)
> scancode 0xfe48 = KEY_7 (0x08)
> scancode 0xfe49 = KEY_BACK (0x9e)
> scancode 0xfe4c = KEY_8 (0x09)
> scancode 0xfe4d = KEY_MENU (0x8b)
> scancode 0xfe4e = KEY_POWER (0x74)
> scancode 0xfe4f = KEY_FASTFORWARD (0xd0)
> scancode 0xfe50 = KEY_5 (0x06)
> scancode 0xfe51 = KEY_UP (0x67)
> scancode 0xfe52 = KEY_CAMERA (0xd4)
> scancode 0xfe53 = KEY_DOWN (0x6c)
> scancode 0xfe54 = KEY_6 (0x07)
> scancode 0xfe55 = KEY_TAB (0x0f)
> scancode 0xfe57 = KEY_MUTE (0x71)
> scancode 0xfe58 = KEY_9 (0x0a)
> scancode 0xfe59 = KEY_INFO (0x166)
> scancode 0xfe5a = KEY_TUNER (0x182)
> scancode 0xfe5b = KEY_LEFT (0x69)
> scancode 0xfe5e = KEY_ENTER (0x1c)    ##NB
> scancode 0xfe5f = KEY_RIGHT (0x6a)
> 
> # cat /sys/class/rc/rc1/protocols
> unknown

That all looks fine.

> Mapping KEY_OK to KEY_ENTER worked (ie the behaviour when the
> OK key was pressed changed), but others did not. For example
> I mapped KEY_BACK (0x9e, decimal 158) to KEY_ESC (001)
> and KEY_PLAYPAUSE (0xa4, 164) to KEY_PAUSE (119).
> But I did not observe any change in behaviour for these two.
> ir-keytable -t did show the correct KEY_foo and descimal code, eg.
> # ir-keytable -s rc1 -t
> Testing events. Please, press CTRL-C to abort.
> 1479989250.528206: event type EV_MSC(0x04): scancode = 0xfe47
> 1479989250.528206: event type EV_KEY(0x01) key_down: KEY_PAUSE(0x0077)
> 1479989250.528206: event type EV_SYN(0x00).
> 1479989250.779044: event type EV_KEY(0x01) key_up: KEY_PAUSE(0x0077)
> 1479989250.779044: event type EV_SYN(0x00).
> ^C

So if I understand you correctly, if you change the keymap, like you
changed 0xfe47 to KEY_PAUSE, then "ir-keytable -s rc1 -t" show you the
correct (new) key? So as far as ir-keytable is concerned, everything
works?

However when you try to use the new mapping in some application then
it does not work?

> I notice that KEY_ENTER existed in the original keymap but _PAUSE
> and _ESC don't, but I don't understand the significance of that.

I don't know how that should matter.

Thanks
Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Nov. 25, 2016, 8:59 a.m. UTC | #2
On 11/25/16, Sean Young <sean@mess.org> wrote:
>
> So if I understand you correctly, if you change the keymap, like you
> changed 0xfe47 to KEY_PAUSE, then "ir-keytable -s rc1 -t" show you the
> correct (new) key? So as far as ir-keytable is concerned, everything
> works?
>
> However when you try to use the new mapping in some application then
> it does not work?

That's correct. ir-keytable seems to be doing the right thing, mapping
the scancode to the input-event-codes.h key code I asked it to.

The application I am trying to use it with is the mythtv frontend.  I
am doing the keycode munging from an SSH session while myth is still
running on the main screen. I didn't think this would matter (since it
worked for KEY_OK->KEY_ENTER) but perhaps it does. Obviously
ir-keytable -t intercepts the scancodes when it is running, but when I
kill it myth responds normally to some keys, but not all.



I wanted to mention that the IR protocol is still showing as unknown.
Is there anything that can be done to sort that out?

Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Nov. 27, 2016, 12:39 a.m. UTC | #3
>>
>> However when you try to use the new mapping in some application then
>> it does not work?
>
> That's correct. ir-keytable seems to be doing the right thing, mapping
> the scancode to the input-event-codes.h key code I asked it to.
>
> The application I am trying to use it with is the mythtv frontend.  I
> am doing the keycode munging from an SSH session while myth is still
> running on the main screen. I didn't think this would matter (since it
> worked for KEY_OK->KEY_ENTER) but perhaps it does. Obviously
> ir-keytable -t intercepts the scancodes when it is running, but when I
> kill it myth responds normally to some keys, but not all.

It turned out that that I had to restart X to make it notice the updated keymap.
After that, the modfied keymap I set up is mostly working.

There is still a bit of a mystery. As I understand it, X should notice
key codes less than 255 (0xff). But it seems to be ignoring KEY_STOP
(code 128, 0x80) and any key codes higher than that but less than 255.
ir-keytable -t shows the right codes.

Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sean Young Nov. 27, 2016, 7:35 p.m. UTC | #4
On Fri, Nov 25, 2016 at 07:59:21PM +1100, Vincent McIntyre wrote:
> On 11/25/16, Sean Young <sean@mess.org> wrote:
> >
> > So if I understand you correctly, if you change the keymap, like you
> > changed 0xfe47 to KEY_PAUSE, then "ir-keytable -s rc1 -t" show you the
> > correct (new) key? So as far as ir-keytable is concerned, everything
> > works?
> >
> > However when you try to use the new mapping in some application then
> > it does not work?
> 
> That's correct. ir-keytable seems to be doing the right thing, mapping
> the scancode to the input-event-codes.h key code I asked it to.

ir-keytable reads from the input layer, so that's the key being sent. The
problem is elsewhere.

> The application I am trying to use it with is the mythtv frontend.  I
> am doing the keycode munging from an SSH session while myth is still
> running on the main screen. I didn't think this would matter (since it
> worked for KEY_OK->KEY_ENTER) but perhaps it does. Obviously
> ir-keytable -t intercepts the scancodes when it is running, but when I
> kill it myth responds normally to some keys, but not all.

X and keycodes is a bit messy. You might need xmodmap mappings. You
can check them xev. I don't know much about this, I'm afraid. What
linux distribution, version and keyboard layout are you using? I could
try and see if I can reproduce/fix this.
 
> I wanted to mention that the IR protocol is still showing as unknown.
> Is there anything that can be done to sort that out?

It would be nice if that could be sorted out, although that would be 
a separate patch.

So all we know right now is what scancode the IR receiver hardware
produces but we have no idea what IR protocol is being used. In order to
figure this out we need a recording of the IR the remote sends, for which
a different IR receiver is needed. Neither your imon nor your 
dvb_usb_af9035 can do this, something like a mce usb IR receiver would
be best. Do you have access to one? One with an IR emitter would be
best.

So with that we can have a recording of the IR the remote sends, and
with the emitter we can see which IR protocols the IR receiver 
understands.


Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Nov. 28, 2016, 8:35 a.m. UTC | #5
On Sun, Nov 27, 2016 at 07:35:10PM +0000, Sean Young wrote:
> > The application I am trying to use it with is the mythtv frontend.  I
> > am doing the keycode munging from an SSH session while myth is still
> > running on the main screen. I didn't think this would matter (since it
> > worked for KEY_OK->KEY_ENTER) but perhaps it does. Obviously
> > ir-keytable -t intercepts the scancodes when it is running, but when I
> > kill it myth responds normally to some keys, but not all.
> 
> X and keycodes is a bit messy. You might need xmodmap mappings. You
> can check them xev. I don't know much about this, I'm afraid. What
> linux distribution, version and keyboard layout are you using? I could
> try and see if I can reproduce/fix this.

I mostly figured this out but something weird happens with the most
significant bit (see my follow-on email). FWIW, this is on ubuntu 16.04
with their standard kernel (4.4) and a bog-standard US english layout.


> > I wanted to mention that the IR protocol is still showing as unknown.
> > Is there anything that can be done to sort that out?
> 
> It would be nice if that could be sorted out, although that would be 
> a separate patch.

That's fine. For the current patch, please feel free to add my
Tested-By: vincent.mcintyre@gmail.com

> So all we know right now is what scancode the IR receiver hardware
> produces but we have no idea what IR protocol is being used. In
> order to figure this out we need a recording of the IR the remote
> sends, for which a different IR receiver is needed. Neither your
> imon nor your dvb_usb_af9035 can do this, something like a mce usb
> IR receiver would be best. Do you have access to one? One with an IR
> emitter would be best.
> 
> So with that we can have a recording of the IR the remote sends, and
> with the emitter we can see which IR protocols the IR receiver
> understands.
> 

I'll poke around to see if I can find something, will take a few days.
Thanks again for your interest in this.
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Nov. 30, 2016, 9:02 a.m. UTC | #6
On Sun, Nov 27, 2016 at 07:35:10PM +0000, Sean Young wrote:
>  
> > I wanted to mention that the IR protocol is still showing as unknown.
> > Is there anything that can be done to sort that out?
> 
> It would be nice if that could be sorted out, although that would be 
> a separate patch.
> 
> So all we know right now is what scancode the IR receiver hardware
> produces but we have no idea what IR protocol is being used. In order to
> figure this out we need a recording of the IR the remote sends, for which
> a different IR receiver is needed. Neither your imon nor your 
> dvb_usb_af9035 can do this, something like a mce usb IR receiver would
> be best. Do you have access to one? One with an IR emitter would be
> best.
> 
> So with that we can have a recording of the IR the remote sends, and
> with the emitter we can see which IR protocols the IR receiver 
> understands.

Haven't been able to find anything suitable. I would order something
but I won't be able to follow up for several weeks.
I'll ask on the myth list to see if anyone is up for trying this.

Thanks again for your help with this
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Feb. 2, 2017, 11:18 a.m. UTC | #7
Hey there

On 11/30/16, Vincent McIntyre <vincent.mcintyre@gmail.com> wrote:
> On Sun, Nov 27, 2016 at 07:35:10PM +0000, Sean Young wrote:
>>
>> > I wanted to mention that the IR protocol is still showing as unknown.
>> > Is there anything that can be done to sort that out?
>>
>> It would be nice if that could be sorted out, although that would be
>> a separate patch.
>>
>> So all we know right now is what scancode the IR receiver hardware
>> produces but we have no idea what IR protocol is being used. In order to
>> figure this out we need a recording of the IR the remote sends, for which
>> a different IR receiver is needed. Neither your imon nor your
>> dvb_usb_af9035 can do this, something like a mce usb IR receiver would
>> be best. Do you have access to one? One with an IR emitter would be
>> best.
>>
>> So with that we can have a recording of the IR the remote sends, and
>> with the emitter we can see which IR protocols the IR receiver
>> understands.
>
> Haven't been able to find anything suitable. I would order something
> but I won't be able to follow up for several weeks.
> I'll ask on the myth list to see if anyone is up for trying this.
>

I bought one of these, but I am not sure how to make the recording:

# lsusb -d 1934:5168 -v

Bus 008 Device 003: ID 1934:5168 Feature Integration Technology Inc.
(Fintek) F71610A or F71612A Consumer Infrared Receiver/Transceiver
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        16
  idVendor           0x1934 Feature Integration Technology Inc. (Fintek)
  idProduct          0x5168 F71610A or F71612A Consumer Infrared
Receiver/Transceiver
  bcdDevice            0.01
  iManufacturer           1 FINTEK
  iProduct                2 eHome Infrared Transceiver
  iSerial                 3 88636562727801
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)


# ir-keytable -v
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Found device /sys/class/rc/rc3/                          <---- the new device
Input sysfs node is /sys/class/rc/rc0/input8/
Event sysfs node is /sys/class/rc/rc0/input8/event5/
Parsing uevent /sys/class/rc/rc0/input8/event5/uevent
/sys/class/rc/rc0/input8/event5/uevent uevent MAJOR=13
/sys/class/rc/rc0/input8/event5/uevent uevent MINOR=69
/sys/class/rc/rc0/input8/event5/uevent uevent DEVNAME=input/event5
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-imon-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=imon
input device is /dev/input/event5
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
	Driver imon, table rc-imon-mce
	Supported protocols: rc-6
	Enabled protocols: rc-6
	Name: iMON Remote (15c2:ffdc)
	bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
	Repeat delay = 500 ms, repeat period = 125 ms
Input sysfs node is /sys/class/rc/rc1/input18/
Event sysfs node is /sys/class/rc/rc1/input18/event15/
Parsing uevent /sys/class/rc/rc1/input18/event15/uevent
/sys/class/rc/rc1/input18/event15/uevent uevent MAJOR=13
/sys/class/rc/rc1/input18/event15/uevent uevent MINOR=79
/sys/class/rc/rc1/input18/event15/uevent uevent DEVNAME=input/event15
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event15
/sys/class/rc/rc1/protocols protocol unknown (disabled)
Found /sys/class/rc/rc1/ (/dev/input/event15) with:
	Driver dvb_usb_cxusb, table rc-dvico-mce
	Supported protocols: unknown
	Enabled protocols:
	Name: IR-receiver inside an USB DVB re
	bus: 3, vendor/product: 0fe9:db78, version: 0x827b
	Repeat delay = 500 ms, repeat period = 125 ms
Input sysfs node is /sys/class/rc/rc2/input19/
Event sysfs node is /sys/class/rc/rc2/input19/event16/
Parsing uevent /sys/class/rc/rc2/input19/event16/uevent
/sys/class/rc/rc2/input19/event16/uevent uevent MAJOR=13
/sys/class/rc/rc2/input19/event16/uevent uevent MINOR=80
/sys/class/rc/rc2/input19/event16/uevent uevent DEVNAME=input/event16
Parsing uevent /sys/class/rc/rc2/uevent
/sys/class/rc/rc2/uevent uevent NAME=rc-empty
/sys/class/rc/rc2/uevent uevent DRV_NAME=dvb_usb_af9035
input device is /dev/input/event16
/sys/class/rc/rc2/protocols protocol nec (disabled)
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
	Driver dvb_usb_af9035, table rc-empty
	Supported protocols: nec
	Enabled protocols:
	Name: Leadtek WinFast DTV Dongle Dual
	bus: 3, vendor/product: 0413:6a05, version: 0x0200
	Repeat delay = 500 ms, repeat period = 125 ms
Input sysfs node is /sys/class/rc/rc3/input20/
 <---- new device
Event sysfs node is /sys/class/rc/rc3/input20/event2/
Parsing uevent /sys/class/rc/rc3/input20/event2/uevent
/sys/class/rc/rc3/input20/event2/uevent uevent MAJOR=13
/sys/class/rc/rc3/input20/event2/uevent uevent MINOR=66
/sys/class/rc/rc3/input20/event2/uevent uevent DEVNAME=input/event2
Parsing uevent /sys/class/rc/rc3/uevent
/sys/class/rc/rc3/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc3/uevent uevent DRV_NAME=mceusb
input device is /dev/input/event2
/sys/class/rc/rc3/protocols protocol other (disabled)
/sys/class/rc/rc3/protocols protocol unknown (disabled)
/sys/class/rc/rc3/protocols protocol rc-5 (disabled)
/sys/class/rc/rc3/protocols protocol nec (disabled)
/sys/class/rc/rc3/protocols protocol rc-6 (enabled)
/sys/class/rc/rc3/protocols protocol jvc (disabled)
/sys/class/rc/rc3/protocols protocol sony (disabled)
/sys/class/rc/rc3/protocols protocol rc-5-sz (disabled)
/sys/class/rc/rc3/protocols protocol sanyo (disabled)
/sys/class/rc/rc3/protocols protocol sharp (disabled)
/sys/class/rc/rc3/protocols protocol mce_kbd (disabled)
/sys/class/rc/rc3/protocols protocol xmp (disabled)
/sys/class/rc/rc3/protocols protocol cec (disabled)
/sys/class/rc/rc3/protocols protocol lirc (enabled)
Found /sys/class/rc/rc3/ (/dev/input/event2) with:
	Driver mceusb, table rc-rc6-mce
	Supported protocols: unknown other lirc rc-5 jvc sony nec sanyo
mce-kbd rc-6 sharp xmp
	Enabled protocols: lirc rc-6
	Name: Media Center Ed. eHome Infrared
	bus: 3, vendor/product: 1934:5168, version: 0x0001
	Repeat delay = 500 ms, repeat period = 125 ms


When I plugged it in, I got this in dmesg:

usb 8-1: new full-speed USB device number 3 using uhci_hcd
usb 8-1: New USB device found, idVendor=1934, idProduct=5168
usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 8-1: Product: eHome Infrared Transceiver
usb 8-1: Manufacturer: FINTEK
usb 8-1: SerialNumber: 88636562727801
Registered IR keymap rc-rc6-mce
input: Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)
as /devices/pci0000:00/0000:00:1d.1/usb8/8-1/8-1:1.0/rc/rc3/input20
rc rc3: Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)
as /devices/pci0000:00/0000:00:1d.1/usb8/8-1/8-1:1.0/rc/rc3
lirc_dev: IR Remote Control driver registered, major 241
rc rc3: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
IR LIRC bridge handler initialized
mceusb 8-1:1.0: Registered FINTEK eHome Infrared Transceiver with mce
emulator interface version 2
mceusb 8-1:1.0: 0 tx ports (0x0 cabled) and 2 rx sensors (0x1 active)
usbcore: registered new interface driver mceusb
IR RC6 protocol handler initialized

Poking around I see lirc has an irrecord program. Is that what I need?

Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sean Young Feb. 2, 2017, 11:35 p.m. UTC | #8
Hi Vincent,

On Thu, Feb 02, 2017 at 10:18:52PM +1100, Vincent McIntyre wrote:
> On 11/30/16, Vincent McIntyre <vincent.mcintyre@gmail.com> wrote:
> > On Sun, Nov 27, 2016 at 07:35:10PM +0000, Sean Young wrote:
> >>
> >> > I wanted to mention that the IR protocol is still showing as unknown.
> >> > Is there anything that can be done to sort that out?
> >>
> >> It would be nice if that could be sorted out, although that would be
> >> a separate patch.
> >>
> >> So all we know right now is what scancode the IR receiver hardware
> >> produces but we have no idea what IR protocol is being used. In order to
> >> figure this out we need a recording of the IR the remote sends, for which
> >> a different IR receiver is needed. Neither your imon nor your
> >> dvb_usb_af9035 can do this, something like a mce usb IR receiver would
> >> be best. Do you have access to one? One with an IR emitter would be
> >> best.
> >>
> >> So with that we can have a recording of the IR the remote sends, and
> >> with the emitter we can see which IR protocols the IR receiver
> >> understands.
> >
> > Haven't been able to find anything suitable. I would order something
> > but I won't be able to follow up for several weeks.
> > I'll ask on the myth list to see if anyone is up for trying this.
> >
> 
> I bought one of these, but I am not sure how to make the recording:
> 
> # lsusb -d 1934:5168 -v
> 
> Bus 008 Device 003: ID 1934:5168 Feature Integration Technology Inc.
> (Fintek) F71610A or F71612A Consumer Infrared Receiver/Transceiver
-snip-
> Poking around I see lirc has an irrecord program. Is that what I need?

That's great. There are a couple of ways of doing this, and none of them
is straightforward. It's a bit of reading tea leaves (that's one of the
motivations for my lirc-scancodes patches, but I digress).

Method 1:
echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +xmp" > /sys/class/rc/rc3/protocols
echo 1 > /sys/module/rc_core/parameters/debug
journal -f -k 
# press button on remote

Now look for "scancode" somewhere in there.

Method 2:
Either use lirc's mode2 or "ir-ctl -r -d /dev/lircX" (from v4l-utils 1.12),
and post the output here.

Thanks!

Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Feb. 7, 2017, 12:33 p.m. UTC | #9
I tried your patch, after disabling the custom keymap file I had put
in. Unfortunately the remote isn't working at all. When the relevant
modules get loaded I see this in dmesg


[    7.838223] media: Linux media interface: v0.10
[    7.840484] WARNING: You are using an experimental version of the
media stack.
                As the driver is backported to an older kernel, it doesn't offer
                enough quality for its usage in production.
                Use it with care.
               Latest git patches (needed if you report a bug to
linux-media@vger.kernel.org):
                47b037a0512d9f8675ec2693bed46c8ea6a884ab [media]
v4l2-async: failing functions shouldn't have side effects
                79a2eda80c6dab79790c308d9f50ecd2e5021ba3 [media]
mantis_dvb: fix some error codes in mantis_dvb_init()
                c2987aaf0c9c2bcb0d4c5902d61473d9aa018a3d [media]
exynos-gsc: Avoid spamming the log on VIDIOC_TRY_FMT
[    7.843667] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_rw
[    7.843669] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_rw (err -22)
[    7.843692] dvb_usb_cxusb: disagrees about version of symbol rc_keydown
[    7.843693] dvb_usb_cxusb: Unknown symbol rc_keydown (err -22)
[    7.843701] dvb_usb_cxusb: disagrees about version of symbol
dib0070_wbd_offset
[    7.843702] dvb_usb_cxusb: Unknown symbol dib0070_wbd_offset (err -22)
[    7.843707] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_device_init
[    7.843708] dvb_usb_cxusb: Unknown symbol dvb_usb_device_init (err -22)
[    7.843712] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_write
[    7.843713] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_write (err -22)
[    8.089033] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_rw
[    8.089035] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_rw (err -22)
[    8.089068] dvb_usb_cxusb: disagrees about version of symbol rc_keydown
[    8.089070] dvb_usb_cxusb: Unknown symbol rc_keydown (err -22)
[    8.089079] dvb_usb_cxusb: disagrees about version of symbol
dib0070_wbd_offset
[    8.089080] dvb_usb_cxusb: Unknown symbol dib0070_wbd_offset (err -22)
[    8.089085] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_device_init
[    8.089086] dvb_usb_cxusb: Unknown symbol dvb_usb_device_init (err -22)
[    8.089090] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_write
[    8.089091] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_write (err -22)

A manual modprobe gives this:

# modprobe -v dvb_usb_cxusb
insmod /lib/modules/4.4.0-59-generic/kernel/drivers/media/usb/dvb-usb/dvb-usb-cxusb.ko
modprobe: ERROR: could not insert 'dvb_usb_cxusb': Invalid argument
# dmesg
....
[  547.365417] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_rw
[  547.365422] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_rw (err -22)
[  547.365461] dvb_usb_cxusb: disagrees about version of symbol rc_keydown
[  547.365463] dvb_usb_cxusb: Unknown symbol rc_keydown (err -22)
[  547.365475] dvb_usb_cxusb: disagrees about version of symbol
dib0070_wbd_offset
[  547.365477] dvb_usb_cxusb: Unknown symbol dib0070_wbd_offset (err -22)
[  547.365484] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_device_init
[  547.365486] dvb_usb_cxusb: Unknown symbol dvb_usb_device_init (err -22)
[  547.365493] dvb_usb_cxusb: disagrees about version of symbol
dvb_usb_generic_write
[  547.365495] dvb_usb_cxusb: Unknown symbol dvb_usb_generic_write (err -22)

I was able to modprobe the rc-dvico-mce module, there was nothing in
dmesg afterward though.

Cheers
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vincent McIntyre Feb. 16, 2017, 1:05 p.m. UTC | #10
Hi again

after you kindly fixed media_build for me I applied the nec protocol
patch and tried again.

$ sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
        Driver imon, table rc-imon-mce
        Supported protocols: rc-6
        Enabled protocols: rc-6
        Name: iMON Remote (15c2:ffdc)
        bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc1/ (/dev/input/event11) with:
        Driver dvb_usb_cxusb, table rc-dvico-mce
        Supported protocols: nec
        Enabled protocols:
        Name: IR-receiver inside an USB DVB re
        bus: 3, vendor/product: 0fe9:db78, version: 0x827b
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
        Driver dvb_usb_af9035, table rc-empty
        Supported protocols: nec
        Enabled protocols:
        Name: Leadtek WinFast DTV Dongle Dual
        bus: 3, vendor/product: 0413:6a05, version: 0x0200
        Repeat delay = 500 ms, repeat period = 125 ms

$ sudo ir-keytable -v --sysdev rc1
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc0/input8/
Event sysfs node is /sys/class/rc/rc0/input8/event5/
Parsing uevent /sys/class/rc/rc0/input8/event5/uevent
/sys/class/rc/rc0/input8/event5/uevent uevent MAJOR=13
/sys/class/rc/rc0/input8/event5/uevent uevent MINOR=69
/sys/class/rc/rc0/input8/event5/uevent uevent DEVNAME=input/event5
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-imon-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=imon
input device is /dev/input/event5
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
        Driver imon, table rc-imon-mce
        Supported protocols: rc-6
        Enabled protocols: rc-6
        Name: iMON Remote (15c2:ffdc)
        bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
Input sysfs node is /sys/class/rc/rc1/input17/
Event sysfs node is /sys/class/rc/rc1/input17/event11/
Parsing uevent /sys/class/rc/rc1/input17/event11/uevent
/sys/class/rc/rc1/input17/event11/uevent uevent MAJOR=13
/sys/class/rc/rc1/input17/event11/uevent uevent MINOR=75
/sys/class/rc/rc1/input17/event11/uevent uevent DEVNAME=input/event11
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event11
/sys/class/rc/rc1/protocols protocol nec (disabled)
Found /sys/class/rc/rc1/ (/dev/input/event11) with:
        Driver dvb_usb_cxusb, table rc-dvico-mce
        Supported protocols: nec
        Enabled protocols:
        Name: IR-receiver inside an USB DVB re
        bus: 3, vendor/product: 0fe9:db78, version: 0x827b
        Repeat delay = 500 ms, repeat period = 125 ms
Input sysfs node is /sys/class/rc/rc2/input19/
Event sysfs node is /sys/class/rc/rc2/input19/event16/
Parsing uevent /sys/class/rc/rc2/input19/event16/uevent
/sys/class/rc/rc2/input19/event16/uevent uevent MAJOR=13
/sys/class/rc/rc2/input19/event16/uevent uevent MINOR=80
/sys/class/rc/rc2/input19/event16/uevent uevent DEVNAME=input/event16
Parsing uevent /sys/class/rc/rc2/uevent
/sys/class/rc/rc2/uevent uevent NAME=rc-empty
/sys/class/rc/rc2/uevent uevent DRV_NAME=dvb_usb_af9035
input device is /dev/input/event16
/sys/class/rc/rc2/protocols protocol nec (disabled)
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
        Driver dvb_usb_af9035, table rc-empty
        Supported protocols: nec
        Enabled protocols:
        Name: Leadtek WinFast DTV Dongle Dual
        bus: 3, vendor/product: 0413:6a05, version: 0x0200
        Repeat delay = 500 ms, repeat period = 125 ms

So only rc0 has any protocols enabled. Let's try to enable nec on rc1

$ sudo /usr/bin/ir-keytable -s rc1 -c
Old keytable cleared
$ sudo /usr/bin/ir-keytable -s rc1 -w /etc/rc_keymaps/dvico-remote
Read dvico_mce table
Wrote 45 keycode(s) to driver
Invalid protocols selected
Couldn't change the IR protocols
$ sudo /usr/bin/ir-keytable -s rc1 -p nec -v
Found device /sys/class/rc/rc0/
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc2/
Input sysfs node is /sys/class/rc/rc1/input17/
Event sysfs node is /sys/class/rc/rc1/input17/event11/
Parsing uevent /sys/class/rc/rc1/input17/event11/uevent
/sys/class/rc/rc1/input17/event11/uevent uevent MAJOR=13
/sys/class/rc/rc1/input17/event11/uevent uevent MINOR=75
/sys/class/rc/rc1/input17/event11/uevent uevent DEVNAME=input/event11
Parsing uevent /sys/class/rc/rc1/uevent
/sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
/sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
input device is /dev/input/event11
/sys/class/rc/rc1/protocols protocol nec (disabled)
Opening /dev/input/event11
Input Protocol version: 0x00010001
/sys/class/rc/rc1//protocols: Invalid argument
Couldn't change the IR protocols

$ sudo cat /sys/class/rc/rc1/protocols
nec
$ sudo sh
# echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +xmp" >
/sys/class/rc/rc1/protocols
bash: echo: write error: Invalid argument
# cat  /sys/class/rc/rc1/protocols
nec
In kern.log I got:
kernel: [ 2293.491534] rc_core: Normal protocol change requested
kernel: [ 2293.491538] rc_core: Protocol switching not supported

# echo "+nec" > /sys/class/rc/rc1/protocols
bash: echo: write error: Invalid argument
kernel: [ 2390.832476] rc_core: Normal protocol change requested
kernel: [ 2390.832481] rc_core: Protocol switching not supported

dmesg during bootup is attached.
Cheers
Vince
Vincent McIntyre Feb. 16, 2017, 1:07 p.m. UTC | #11
The dmesg...
Sean Young Feb. 20, 2017, 5:13 p.m. UTC | #12
Hi Vincent,

Thanks for testing this.

On Fri, Feb 17, 2017 at 12:05:50AM +1100, Vincent McIntyre wrote:
> Hi again
> 
> after you kindly fixed media_build for me I applied the nec protocol
> patch and tried again.
> 
> $ sudo ir-keytable
> Found /sys/class/rc/rc0/ (/dev/input/event5) with:
>         Driver imon, table rc-imon-mce
>         Supported protocols: rc-6
>         Enabled protocols: rc-6
>         Name: iMON Remote (15c2:ffdc)
>         bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
>         Repeat delay = 500 ms, repeat period = 125 ms
> Found /sys/class/rc/rc1/ (/dev/input/event11) with:
>         Driver dvb_usb_cxusb, table rc-dvico-mce
>         Supported protocols: nec
>         Enabled protocols:
>         Name: IR-receiver inside an USB DVB re
>         bus: 3, vendor/product: 0fe9:db78, version: 0x827b
>         Repeat delay = 500 ms, repeat period = 125 ms
> Found /sys/class/rc/rc2/ (/dev/input/event16) with:
>         Driver dvb_usb_af9035, table rc-empty
>         Supported protocols: nec
>         Enabled protocols:
>         Name: Leadtek WinFast DTV Dongle Dual
>         bus: 3, vendor/product: 0413:6a05, version: 0x0200
>         Repeat delay = 500 ms, repeat period = 125 ms
> 
> $ sudo ir-keytable -v --sysdev rc1
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc0/input8/
> Event sysfs node is /sys/class/rc/rc0/input8/event5/
> Parsing uevent /sys/class/rc/rc0/input8/event5/uevent
> /sys/class/rc/rc0/input8/event5/uevent uevent MAJOR=13
> /sys/class/rc/rc0/input8/event5/uevent uevent MINOR=69
> /sys/class/rc/rc0/input8/event5/uevent uevent DEVNAME=input/event5
> Parsing uevent /sys/class/rc/rc0/uevent
> /sys/class/rc/rc0/uevent uevent NAME=rc-imon-mce
> /sys/class/rc/rc0/uevent uevent DRV_NAME=imon
> input device is /dev/input/event5
> /sys/class/rc/rc0/protocols protocol rc-6 (enabled)
> Found /sys/class/rc/rc0/ (/dev/input/event5) with:
>         Driver imon, table rc-imon-mce
>         Supported protocols: rc-6
>         Enabled protocols: rc-6
>         Name: iMON Remote (15c2:ffdc)
>         bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
>         Repeat delay = 500 ms, repeat period = 125 ms
> Input sysfs node is /sys/class/rc/rc1/input17/
> Event sysfs node is /sys/class/rc/rc1/input17/event11/
> Parsing uevent /sys/class/rc/rc1/input17/event11/uevent
> /sys/class/rc/rc1/input17/event11/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input17/event11/uevent uevent MINOR=75
> /sys/class/rc/rc1/input17/event11/uevent uevent DEVNAME=input/event11
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event11
> /sys/class/rc/rc1/protocols protocol nec (disabled)
> Found /sys/class/rc/rc1/ (/dev/input/event11) with:
>         Driver dvb_usb_cxusb, table rc-dvico-mce
>         Supported protocols: nec
>         Enabled protocols:
>         Name: IR-receiver inside an USB DVB re
>         bus: 3, vendor/product: 0fe9:db78, version: 0x827b
>         Repeat delay = 500 ms, repeat period = 125 ms
> Input sysfs node is /sys/class/rc/rc2/input19/
> Event sysfs node is /sys/class/rc/rc2/input19/event16/
> Parsing uevent /sys/class/rc/rc2/input19/event16/uevent
> /sys/class/rc/rc2/input19/event16/uevent uevent MAJOR=13
> /sys/class/rc/rc2/input19/event16/uevent uevent MINOR=80
> /sys/class/rc/rc2/input19/event16/uevent uevent DEVNAME=input/event16
> Parsing uevent /sys/class/rc/rc2/uevent
> /sys/class/rc/rc2/uevent uevent NAME=rc-empty
> /sys/class/rc/rc2/uevent uevent DRV_NAME=dvb_usb_af9035
> input device is /dev/input/event16
> /sys/class/rc/rc2/protocols protocol nec (disabled)
> Found /sys/class/rc/rc2/ (/dev/input/event16) with:
>         Driver dvb_usb_af9035, table rc-empty
>         Supported protocols: nec
>         Enabled protocols:
>         Name: Leadtek WinFast DTV Dongle Dual
>         bus: 3, vendor/product: 0413:6a05, version: 0x0200
>         Repeat delay = 500 ms, repeat period = 125 ms
> 
> So only rc0 has any protocols enabled. Let's try to enable nec on rc1
> 
> $ sudo /usr/bin/ir-keytable -s rc1 -c
> Old keytable cleared
> $ sudo /usr/bin/ir-keytable -s rc1 -w /etc/rc_keymaps/dvico-remote
> Read dvico_mce table
> Wrote 45 keycode(s) to driver
> Invalid protocols selected
> Couldn't change the IR protocols
> $ sudo /usr/bin/ir-keytable -s rc1 -p nec -v
> Found device /sys/class/rc/rc0/
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc2/
> Input sysfs node is /sys/class/rc/rc1/input17/
> Event sysfs node is /sys/class/rc/rc1/input17/event11/
> Parsing uevent /sys/class/rc/rc1/input17/event11/uevent
> /sys/class/rc/rc1/input17/event11/uevent uevent MAJOR=13
> /sys/class/rc/rc1/input17/event11/uevent uevent MINOR=75
> /sys/class/rc/rc1/input17/event11/uevent uevent DEVNAME=input/event11
> Parsing uevent /sys/class/rc/rc1/uevent
> /sys/class/rc/rc1/uevent uevent NAME=rc-dvico-mce
> /sys/class/rc/rc1/uevent uevent DRV_NAME=dvb_usb_cxusb
> input device is /dev/input/event11
> /sys/class/rc/rc1/protocols protocol nec (disabled)
> Opening /dev/input/event11
> Input Protocol version: 0x00010001
> /sys/class/rc/rc1//protocols: Invalid argument
> Couldn't change the IR protocols

On the cxusb the protocol is now nec, and that is the only protocol it
supports, you can't change it.

> $ sudo cat /sys/class/rc/rc1/protocols
> nec
> $ sudo sh
> # echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +xmp" >
> /sys/class/rc/rc1/protocols
> bash: echo: write error: Invalid argument
> # cat  /sys/class/rc/rc1/protocols
> nec
> In kern.log I got:
> kernel: [ 2293.491534] rc_core: Normal protocol change requested
> kernel: [ 2293.491538] rc_core: Protocol switching not supported
> 
> # echo "+nec" > /sys/class/rc/rc1/protocols
> bash: echo: write error: Invalid argument
> kernel: [ 2390.832476] rc_core: Normal protocol change requested
> kernel: [ 2390.832481] rc_core: Protocol switching not supported

That is expected. Does the the keymap actually work? 

ir-keytable -r -t

Thanks,

Sean
Vincent McIntyre Feb. 21, 2017, 1:07 p.m. UTC | #13
On 2/21/17, Sean Young <sean@mess.org> wrote:
> Hi Vincent,
>
...
>
> On the cxusb the protocol is now nec, and that is the only protocol it
> supports, you can't change it.
>

doh! ok well that's all good then.

>> $ sudo cat /sys/class/rc/rc1/protocols
>> nec
>> $ sudo sh
>> # echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +xmp" >
>> /sys/class/rc/rc1/protocols
>> bash: echo: write error: Invalid argument
>> # cat  /sys/class/rc/rc1/protocols
>> nec
>> In kern.log I got:
>> kernel: [ 2293.491534] rc_core: Normal protocol change requested
>> kernel: [ 2293.491538] rc_core: Protocol switching not supported
>>
>> # echo "+nec" > /sys/class/rc/rc1/protocols
>> bash: echo: write error: Invalid argument
>> kernel: [ 2390.832476] rc_core: Normal protocol change requested
>> kernel: [ 2390.832481] rc_core: Protocol switching not supported
>
> That is expected. Does the the keymap actually work?
>
> ir-keytable -r -t

Kind of important information, yes. Answer: not sure. I can see it
receiving something but none of the keys I pressed caused any reaction
on the application (mythtv)

# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
        Driver imon, table rc-imon-mce
        Supported protocols: rc-6
        Enabled protocols: rc-6
        Name: iMON Remote (15c2:ffdc)
        bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc1/ (/dev/input/event11) with:
        Driver dvb_usb_cxusb, table rc-dvico-mce
        Supported protocols: nec
        Enabled protocols:
        Name: IR-receiver inside an USB DVB re
        bus: 3, vendor/product: 0fe9:db78, version: 0x827b
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
        Driver dvb_usb_af9035, table rc-empty
        Supported protocols: nec
        Enabled protocols:
        Name: Leadtek WinFast DTV Dongle Dual
        bus: 3, vendor/product: 0413:6a05, version: 0x0200
        Repeat delay = 500 ms, repeat period = 125 ms

# ir-keytable -r -t -d /dev/input/event11
scancode 0xfe01 = KEY_R (0x13)
scancode 0xfe02 = KEY_TV (0x179)
scancode 0xfe03 = KEY_0 (0x0b)
scancode 0xfe05 = KEY_VOLUMEDOWN (0x72)
scancode 0xfe07 = KEY_4 (0x05)
scancode 0xfe09 = KEY_CHANNELDOWN (0x193)
scancode 0xfe0a = KEY_EPG (0x16d)
scancode 0xfe0b = KEY_1 (0x02)
scancode 0xfe0d = KEY_ESC (0x01)
scancode 0xfe0e = KEY_MP3 (0x187)
scancode 0xfe0f = KEY_PREVIOUSSONG (0xa5)
scancode 0xfe11 = KEY_CHANNELUP (0x192)
scancode 0xfe12 = KEY_NEXTSONG (0xa3)
scancode 0xfe13 = KEY_ANGLE (0x173)
scancode 0xfe15 = KEY_VOLUMEUP (0x73)
scancode 0xfe16 = KEY_SETUP (0x8d)
scancode 0xfe17 = KEY_2 (0x03)
scancode 0xfe19 = KEY_OPEN (0x86)
scancode 0xfe1a = KEY_DVD (0x185)
scancode 0xfe1b = KEY_3 (0x04)
scancode 0xfe1e = KEY_FAVORITES (0x16c)
scancode 0xfe1f = KEY_ZOOM (0x174)
scancode 0xfe42 = KEY_ENTER (0x1c)
scancode 0xfe43 = KEY_REWIND (0xa8)
scancode 0xfe46 = KEY_POWER2 (0x164)
scancode 0xfe47 = KEY_P (0x19)
scancode 0xfe48 = KEY_7 (0x08)
scancode 0xfe49 = KEY_ESC (0x01)
scancode 0xfe4c = KEY_8 (0x09)
scancode 0xfe4d = KEY_M (0x32)
scancode 0xfe4e = KEY_POWER (0x74)
scancode 0xfe4f = KEY_FASTFORWARD (0xd0)
scancode 0xfe50 = KEY_5 (0x06)
scancode 0xfe51 = KEY_UP (0x67)
scancode 0xfe52 = KEY_CAMERA (0xd4)
scancode 0xfe53 = KEY_DOWN (0x6c)
scancode 0xfe54 = KEY_6 (0x07)
scancode 0xfe55 = KEY_TAB (0x0f)
scancode 0xfe57 = KEY_MUTE (0x71)
scancode 0xfe58 = KEY_9 (0x0a)
scancode 0xfe59 = KEY_INFO (0x166)
scancode 0xfe5a = KEY_TUNER (0x182)
scancode 0xfe5b = KEY_LEFT (0x69)
scancode 0xfe5e = KEY_ENTER (0x1c)
scancode 0xfe5f = KEY_RIGHT (0x6a)
Enabled protocols: other sony nec sanyo mce-kbd rc-6 sharp xmp
Testing events. Please, press CTRL-C to abort.
  # pressed '1' key
1487676458.742329: event type EV_MSC(0x04): scancode = 0xffff010b
1487676458.742329: event type EV_SYN(0x00).
  # '2'
1487676481.742284: event type EV_MSC(0x04): scancode = 0xffff0117
1487676481.742284: event type EV_SYN(0x00).
  # '8'
1487676504.842250: event type EV_MSC(0x04): scancode = 0xffff014c
1487676504.842250: event type EV_SYN(0x00).
  # '9'
1487676506.542243: event type EV_MSC(0x04): scancode = 0xffff0158
1487676506.542243: event type EV_SYN(0x00).
  # right-arrow
1487676551.942312: event type EV_MSC(0x04): scancode = 0xffff015f
1487676551.942312: event type EV_SYN(0x00).
  # vol down
1487676637.746348: event type EV_MSC(0x04): scancode = 0xffff0105
1487676637.746348: event type EV_SYN(0x00).
  # vol up
1487676642.746321: event type EV_MSC(0x04): scancode = 0xffff0115
1487676642.746321: event type EV_SYN(0x00).

# cat /sys/class/rc/rc1/protocols
nec

All the above was done with the system booted with this in /etc/rc.local
/usr/bin/ir-keytable -s rc1 -c
/usr/bin/ir-keytable -s rc1 -w /etc/rc_keymaps/dvico-remote

After I disabled the rc.local script and rebooted:
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event10) with:
        Driver imon, table rc-imon-mce
        Supported protocols: rc-6
        Enabled protocols: rc-6
        Name: iMON Remote (15c2:ffdc)
        bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc1/ (/dev/input/event15) with:
        Driver dvb_usb_cxusb, table rc-dvico-mce
        Supported protocols: nec
        Enabled protocols:
        Name: IR-receiver inside an USB DVB re
        bus: 3, vendor/product: 0fe9:db78, version: 0x827b
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc2/ (/dev/input/event16) with:
        Driver dvb_usb_af9035, table rc-empty
        Supported protocols: nec
        Enabled protocols:
        Name: Leadtek WinFast DTV Dongle Dual
        bus: 3, vendor/product: 0413:6a05, version: 0x0200
        Repeat delay = 500 ms, repeat period = 125 ms

# ir-keytable -r -t -d /dev/input/event15
scancode 0x0101 = KEY_RECORD (0xa7)
scancode 0x0102 = KEY_TV (0x179)
scancode 0x0103 = KEY_0 (0x0b)
scancode 0x0105 = KEY_VOLUMEDOWN (0x72)
scancode 0x0107 = KEY_4 (0x05)
scancode 0x0109 = KEY_CHANNELDOWN (0x193)
scancode 0x010a = KEY_EPG (0x16d)
scancode 0x010b = KEY_1 (0x02)
scancode 0x010d = KEY_STOP (0x80)
scancode 0x010e = KEY_MP3 (0x187)
scancode 0x010f = KEY_PREVIOUSSONG (0xa5)
scancode 0x0111 = KEY_CHANNELUP (0x192)
scancode 0x0112 = KEY_NEXTSONG (0xa3)
scancode 0x0113 = KEY_ANGLE (0x173)
scancode 0x0115 = KEY_VOLUMEUP (0x73)
scancode 0x0116 = KEY_SETUP (0x8d)
scancode 0x0117 = KEY_2 (0x03)
scancode 0x0119 = KEY_OPEN (0x86)
scancode 0x011a = KEY_DVD (0x185)
scancode 0x011b = KEY_3 (0x04)
scancode 0x011e = KEY_FAVORITES (0x16c)
scancode 0x011f = KEY_ZOOM (0x174)
scancode 0x0142 = KEY_ENTER (0x1c)
scancode 0x0143 = KEY_REWIND (0xa8)
scancode 0x0146 = KEY_POWER2 (0x164)
scancode 0x0147 = KEY_PLAYPAUSE (0xa4)
scancode 0x0148 = KEY_7 (0x08)
scancode 0x0149 = KEY_BACK (0x9e)
scancode 0x014c = KEY_8 (0x09)
scancode 0x014d = KEY_MENU (0x8b)
scancode 0x014e = KEY_POWER (0x74)
scancode 0x014f = KEY_FASTFORWARD (0xd0)
scancode 0x0150 = KEY_5 (0x06)
scancode 0x0151 = KEY_UP (0x67)
scancode 0x0152 = KEY_CAMERA (0xd4)
scancode 0x0153 = KEY_DOWN (0x6c)
scancode 0x0154 = KEY_6 (0x07)
scancode 0x0155 = KEY_TAB (0x0f)
scancode 0x0157 = KEY_MUTE (0x71)
scancode 0x0158 = KEY_9 (0x0a)
scancode 0x0159 = KEY_INFO (0x166)
scancode 0x015a = KEY_TUNER (0x182)
scancode 0x015b = KEY_LEFT (0x69)
scancode 0x015e = KEY_OK (0x160)
scancode 0x015f = KEY_RIGHT (0x6a)
Enabled protocols: other jvc sanyo mce-kbd rc-6 sharp xmp
Testing events. Please, press CTRL-C to abort.

 # '1'
1487682068.360565: event type EV_MSC(0x04): scancode = 0xffff010b
1487682068.360565: event type EV_SYN(0x00).
 # '2'
1487682091.293030: event type EV_MSC(0x04): scancode = 0xffff0117
1487682091.293030: event type EV_SYN(0x00).
 # '8'
1487682105.276940: event type EV_MSC(0x04): scancode = 0xffff014c
1487682105.276940: event type EV_SYN(0x00).
 # '9'
1487682121.489049: event type EV_MSC(0x04): scancode = 0xffff0158
1487682121.489049: event type EV_SYN(0x00).
 # vol_down
1487682143.577013: event type EV_MSC(0x04): scancode = 0xffff0105
1487682143.577013: event type EV_SYN(0x00).
 # vol_up
1487682155.736905: event type EV_MSC(0x04): scancode = 0xffff0115
1487682155.736905: event type EV_SYN(0x00).
 # down arrow
1487682175.924965: event type EV_MSC(0x04): scancode = 0xffff0153
1487682175.924965: event type EV_SYN(0x00).

# cat /sys/class/rc/rc1/protocols
nec

When I try to enable the nec protocol I get this:
# ir-keytable  -d /dev/input/event15 -p nec -t -r
Invalid protocols selected
Couldn't change the IR protocols

Hopefully all this stumbling in the dark is somewhat informative...
Vince
diff mbox

Patch

--- dvico_mce   2016-11-24 22:18:48.000000000 +1100
+++ dvico_mce_new   2016-11-24 22:11:02.000000000 +1100
@@ -12,7 +12,7 @@ 
 0xfe5b KEY_LEFT
 0xfe5f KEY_RIGHT
 0xfe53 KEY_DOWN
-0xfe5e KEY_OK
+0xfe5e KEY_ENTER
 0xfe59 KEY_INFO
 0xfe55 KEY_TAB
 0xfe0f KEY_PREVIOUSSONG