2013-10-05, 22:03
Posting here mainly for personal archiving purposes - this is a working configuration for me YMMV
Running Ubuntu 12.04.3 LTS (precise) - 3.2.0-54-generic-pae, using Lirc
I added some keycodes to my imon-pad driver conf; the file looks like this now:
Purely for convenience I added a udev script (in my case /etc/udev/rules.d/71-imon.rules) for symlinking my input device; now I can point Lirc to the simlink.
(Reboot needed for having the symlinks added automatically)
I configured Lirc to using devinput.
By now, you should be able to query all events you configured
For some reason I still seemed to be missing some keys when testing with 'irw'.
It took me some time to figure out that I had some missing key names/codes within my Lirc setup.
I bluntly downloaded a copy from jwilson:
I now have all my buttons in perfect working order.
I configured my xbmc buttons like this:
Cherry on the cake is I got my power button on the remote working again. Both for shutting down and (cold) booting the machine again.
Running Ubuntu 12.04.3 LTS (precise) - 3.2.0-54-generic-pae, using Lirc
I added some keycodes to my imon-pad driver conf; the file looks like this now:
Quote:cat /lib/udev/rc_keymaps/imon_pad
Code:# table imon_pad, type: OTHER
0x2a8195b7 KEY_REWIND
0x298315b7 KEY_REWIND
0x2b8115b7 KEY_FASTFORWARD
0x2b8315b7 KEY_FASTFORWARD
0x2b9115b7 KEY_PREVIOUS
0x298195b7 KEY_NEXT
0x2a8115b7 KEY_PLAY
0x2a8315b7 KEY_PLAY
0x2a9115b7 KEY_PAUSE
0x2b9715b7 KEY_STOP
0x298115b7 KEY_RECORD
0x01008000 KEY_UP
0x01007f00 KEY_DOWN
0x01000080 KEY_LEFT
0x0100007f KEY_RIGHT
0x2aa515b7 KEY_UP
0x289515b7 KEY_DOWN
0x29a515b7 KEY_LEFT
0x2ba515b7 KEY_RIGHT
0x0200002c KEY_SPACE
0x2a9315b7 KEY_SPACE
0x02000028 KEY_ENTER
0x28a195b7 KEY_ENTER
0x288195b7 KEY_EXIT
0x02000029 KEY_ESC
0x2bb715b7 KEY_ESC
0x0200002a KEY_BACKSPACE
0x28a115b7 KEY_BACKSPACE
0x2b9595b7 KEY_MUTE
0x28a395b7 KEY_VOLUMEUP
0x28a595b7 KEY_VOLUMEDOWN
0x289395b7 KEY_CHANNELUP
0x288795b7 KEY_CHANNELDOWN
0x0200001e KEY_NUMERIC_1
0x0200001f KEY_NUMERIC_2
0x02000020 KEY_NUMERIC_3
0x02000021 KEY_NUMERIC_4
0x02000022 KEY_NUMERIC_5
0x02000023 KEY_NUMERIC_6
0x02000024 KEY_NUMERIC_7
0x02000025 KEY_NUMERIC_8
0x02000026 KEY_NUMERIC_9
0x02000027 KEY_NUMERIC_0
0x28b595b7 KEY_NUMERIC_1
0x2bb195b7 KEY_NUMERIC_2
0x28b195b7 KEY_NUMERIC_3
0x2a8595b7 KEY_NUMERIC_4
0x299595b7 KEY_NUMERIC_5
0x2aa595b7 KEY_NUMERIC_6
0x2b9395b7 KEY_NUMERIC_7
0x2a8515b7 KEY_NUMERIC_8
0x2aa115b7 KEY_NUMERIC_9
0x2ba595b7 KEY_NUMERIC_0
0x02200025 KEY_NUMERIC_STAR
0x28b515b7 KEY_NUMERIC_STAR
0x02200020 KEY_NUMERIC_POUND
0x29a115b7 KEY_NUMERIC_POUND
0x2b8515b7 KEY_VIDEO
0x299195b7 KEY_AUDIO
0x2ba115b7 KEY_IMAGES
0x28a515b7 KEY_TV
0x29a395b7 KEY_DVD
0x29a295b7 KEY_DVD
0x2ba385b7 KEY_MENU
0x2ba395b7 KEY_MENU
0x288515b7 KEY_BOOKMARKS
0x2ab715b7 KEY_CAMERA
0x2ba155b7 KEY_CAMERA
0x298595b7 KEY_SUBTITLE
0x2b8595b7 KEY_LANGUAGE
0x29a595b7 KEY_ZOOM
0x2aa395b7 KEY_SCREEN
0x299115b7 KEY_KEYBOARD
0x299135b7 KEY_KEYBOARD
0x01010000 BTN_LEFT
0x01000000 BTN_RIGHT
0x01020000 BTN_RIGHT
0x01010080 BTN_LEFT
0x01020080 BTN_RIGHT
0x688301b7 BTN_LEFT
0x688481b7 BTN_RIGHT
0x2a9395b7 KEY_CYCLEWINDOWS
0x2b8395b7 KEY_TIME
0x289115b7 KEY_POWER
0x29b195b7 KEY_EJECTCD
0x299395b7 KEY_EJECTCLOSECD
0x02800000 KEY_CONTEXT_MENU
0x2b8195b7 KEY_CONTEXT_MENU
0x02000065 KEY_COMPOSE
0x28b715b7 KEY_COMPOSE
0x2ab195b7 KEY_MEDIA
0x29b715b7 KEY_DASHBOARD
Purely for convenience I added a udev script (in my case /etc/udev/rules.d/71-imon.rules) for symlinking my input device; now I can point Lirc to the simlink.
(Reboot needed for having the symlinks added automatically)
Quote:cat /etc/udev/rules.d/71-imon.rulesnote that these are my exact id's as udevadm in my case reported:
Code:SUBSYSTEM=="input",ATTRS{idVendor}=="15c2",ATTRS{idProduct}=="0034",ATTR{dev}=="13:68",SYMLINK="input/imon_remote"
SUBSYSTEM=="input",ATTRS{idVendor}=="15c2",ATTRS{idProduct}=="0034",ATTR{dev}=="13:67",SYMLINK="input/imon_panel_knob_mouse"
Quote:udevadm info -q all -n /dev/input/event4
Code:P: /devices/pci0000:00/0000:00:04.0/usb1/1-6/1-6:1.0/rc/rc0/input4/event4
N: input/event4
S: input/imon_remote
E: DEVLINKS=/dev/input/imon_remote
E: DEVNAME=/dev/input/event4
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb1/1-6/1-6:1.0/rc/rc0/input4/event4
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_MODEL=0034
E: ID_MODEL_ENC=0034
E: ID_MODEL_ID=0034
E: ID_PATH=pci-0000:00:04.0-usb-0:6:1.0
E: ID_PATH_TAG=pci-0000_00_04_0-usb-0_6_1_0
E: ID_REVISION=0014
E: ID_SERIAL=15c2_0034
E: ID_TYPE=hid
E: ID_USB_DRIVER=imon
E: ID_USB_INTERFACES=:030002:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=15c2
E: ID_VENDOR_ENC=15c2
E: ID_VENDOR_ID=15c2
E: MAJOR=13
E: MINOR=68
E: SUBSYSTEM=input
E: UDEV_LOG=3
E: USEC_INITIALIZED=8210970
E: XKBLAYOUT=us
E: XKBMODEL=pc105
E: XKBVARIANT=intl
I configured Lirc to using devinput.
Quote:cat /etc/lirc/hardware.conf
Note that I replaced "/dev/input/event4" with "/dev/input/imon_remote" for I already have my udev rules in place. This will even guarantee things will still work when devices get renumbered after restarting.Code:# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
#REMOTE_DEVICE="/dev/input/event4"
REMOTE_DEVICE="/dev/input/imon_remote"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
REMOTE_LIRCD_ARGS=""
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="false"
# Default configuration files for your hardware if any
LIRCMD_CONF=""
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
By now, you should be able to query all events you configured
Quote:sudo ir-keytable -r... or test them with: sudo ir-keytable -t
Code:scancode 0x1000000 = BTN_RIGHT (0x111)
scancode 0x100007f = KEY_RIGHT (0x6a)
scancode 0x1000080 = KEY_LEFT (0x69)
scancode 0x1007f00 = KEY_DOWN (0x6c)
scancode 0x1008000 = KEY_UP (0x67)
scancode 0x1010000 = BTN_MOUSE (0x110)
scancode 0x1010080 = BTN_MOUSE (0x110)
scancode 0x1020000 = BTN_RIGHT (0x111)
scancode 0x1020080 = BTN_RIGHT (0x111)
scancode 0x200001e = KEY_NUMERIC_1 (0x201)
scancode 0x200001f = KEY_NUMERIC_2 (0x202)
scancode 0x2000020 = KEY_NUMERIC_3 (0x203)
scancode 0x2000021 = KEY_NUMERIC_4 (0x204)
scancode 0x2000022 = KEY_NUMERIC_5 (0x205)
scancode 0x2000023 = KEY_NUMERIC_6 (0x206)
scancode 0x2000024 = KEY_NUMERIC_7 (0x207)
scancode 0x2000025 = KEY_NUMERIC_8 (0x208)
scancode 0x2000026 = KEY_NUMERIC_9 (0x209)
scancode 0x2000027 = KEY_NUMERIC_0 (0x200)
scancode 0x2000028 = KEY_ENTER (0x1c)
scancode 0x2000029 = KEY_ESC (0x01)
scancode 0x200002a = KEY_BACKSPACE (0x0e)
scancode 0x200002c = KEY_SPACE (0x39)
scancode 0x2000065 = KEY_COMPOSE (0x7f)
scancode 0x2200020 = KEY_NUMERIC_POUND (0x20b)
scancode 0x2200025 = KEY_NUMERIC_STAR (0x20a)
scancode 0x2800000 = KEY_CONTEXT_MENU (0x1b6)
scancode 0x288195b7 = KEY_EXIT (0xae)
scancode 0x288515b7 = KEY_BOOKMARKS (0x9c)
scancode 0x288795b7 = KEY_CHANNELDOWN (0x193)
scancode 0x289115b7 = KEY_POWER (0x74)
scancode 0x289395b7 = KEY_CHANNELUP (0x192)
scancode 0x289515b7 = KEY_DOWN (0x6c)
scancode 0x28a115b7 = KEY_BACKSPACE (0x0e)
scancode 0x28a195b7 = KEY_ENTER (0x1c)
scancode 0x28a395b7 = KEY_VOLUMEUP (0x73)
scancode 0x28a515b7 = KEY_TV (0x179)
scancode 0x28a595b7 = KEY_VOLUMEDOWN (0x72)
scancode 0x28b195b7 = KEY_NUMERIC_3 (0x203)
scancode 0x28b515b7 = KEY_NUMERIC_STAR (0x20a)
scancode 0x28b595b7 = KEY_NUMERIC_1 (0x201)
scancode 0x28b715b7 = KEY_COMPOSE (0x7f)
scancode 0x298115b7 = KEY_RECORD (0xa7)
scancode 0x298195b7 = KEY_NEXT (0x197)
scancode 0x298315b7 = KEY_REWIND (0xa8)
scancode 0x298595b7 = KEY_SUBTITLE (0x172)
scancode 0x299115b7 = KEY_KEYBOARD (0x176)
scancode 0x299135b7 = KEY_KEYBOARD (0x176)
scancode 0x299195b7 = KEY_AUDIO (0x188)
scancode 0x299395b7 = KEY_EJECTCLOSECD (0xa2)
scancode 0x299595b7 = KEY_NUMERIC_5 (0x205)
scancode 0x29a115b7 = KEY_NUMERIC_POUND (0x20b)
scancode 0x29a295b7 = KEY_DVD (0x185)
scancode 0x29a395b7 = KEY_DVD (0x185)
scancode 0x29a515b7 = KEY_LEFT (0x69)
scancode 0x29a595b7 = KEY_ZOOM (0x174)
scancode 0x29b195b7 = KEY_EJECTCD (0xa1)
scancode 0x29b715b7 = KEY_DASHBOARD (0xcc)
scancode 0x2a8115b7 = KEY_PLAY (0xcf)
scancode 0x2a8195b7 = KEY_REWIND (0xa8)
scancode 0x2a8315b7 = KEY_PLAY (0xcf)
scancode 0x2a8515b7 = KEY_NUMERIC_8 (0x208)
scancode 0x2a8595b7 = KEY_NUMERIC_4 (0x204)
scancode 0x2a9115b7 = KEY_PAUSE (0x77)
scancode 0x2a9315b7 = KEY_SPACE (0x39)
scancode 0x2a9395b7 = KEY_CYCLEWINDOWS (0x9a)
scancode 0x2aa115b7 = KEY_NUMERIC_9 (0x209)
scancode 0x2aa395b7 = KEY_SCREEN (0x177)
scancode 0x2aa515b7 = KEY_UP (0x67)
scancode 0x2aa595b7 = KEY_NUMERIC_6 (0x206)
scancode 0x2ab195b7 = KEY_MEDIA (0xe2)
scancode 0x2ab715b7 = KEY_CAMERA (0xd4)
scancode 0x2b8115b7 = KEY_FASTFORWARD (0xd0)
scancode 0x2b8195b7 = KEY_CONTEXT_MENU (0x1b6)
scancode 0x2b8315b7 = KEY_FASTFORWARD (0xd0)
scancode 0x2b8395b7 = KEY_TIME (0x167)
scancode 0x2b8515b7 = KEY_VIDEO (0x189)
scancode 0x2b8595b7 = KEY_LANGUAGE (0x170)
scancode 0x2b9115b7 = KEY_PREVIOUS (0x19c)
scancode 0x2b9395b7 = KEY_NUMERIC_7 (0x207)
scancode 0x2b9595b7 = KEY_MUTE (0x71)
scancode 0x2b9715b7 = KEY_STOP (0x80)
scancode 0x2ba115b7 = KEY_IMAGES (0x1ba)
scancode 0x2ba155b7 = KEY_CAMERA (0xd4)
scancode 0x2ba385b7 = KEY_MENU (0x8b)
scancode 0x2ba395b7 = KEY_MENU (0x8b)
scancode 0x2ba515b7 = KEY_RIGHT (0x6a)
scancode 0x2ba595b7 = KEY_NUMERIC_0 (0x200)
scancode 0x2bb195b7 = KEY_NUMERIC_2 (0x202)
scancode 0x2bb715b7 = KEY_ESC (0x01)
scancode 0x688301b7 = BTN_MOUSE (0x110)
scancode 0x688481b7 = BTN_RIGHT (0x111)
Enabled protocols:
For some reason I still seemed to be missing some keys when testing with 'irw'.
It took me some time to figure out that I had some missing key names/codes within my Lirc setup.
I bluntly downloaded a copy from jwilson:
Quote:wget http://people.redhat.com/jwilson/misc/li...f.devinputand replaced /usr/share/lirc/remotes/devinput/lircd.conf.devinput (where Lircd's hardware.conf expects it to be).
I now have all my buttons in perfect working order.
I configured my xbmc buttons like this:
Quote:cat /home/xbmc/.xbmc/userdata/Lircmap.xml
Code:<lircmap>
<remote device="devinput">
<altname>/dev/input/imon_remote</altname>
<pause>KEY_PLAY</pause>
<stop>KEY_STOP</stop>
<forward>KEY_FASTFORWARD</forward>
<reverse>KEY_REWIND</reverse>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_ENTER</select>
<pageplus>KEY_CHANNELUP</pageplus>
<pageminus>KEY_CHANNELDOWN</pageminus>
<back>KEY_BACKSPACE</back>
<menu>KEY_MENU</menu>
<play>KEY_PLAY</play>
<info>KEY_COMPOSE</info>
<skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<mute>KEY_MUTE</mute>
<power>KEY_POWER</power>
<title>KEY_CONTEXT_MENU</title>
<display>KEY_ZOOM</display>
<tab>KEY_SCREEN</tab>
<home>KEY_EXIT</home>
<teletext>KEY_CYCLEWINDOWS</teletext>
<myvideo>KEY_VIDEO</myvideo>
<guide>KEY_MEDIA</guide>
<mypictures>KEY_CAMERA</mypictures>
<mytv>KEY_TV</mytv>
<subtitle>KEY_SUBTITLE</subtitle>
<language>KEY_LANGUAGE</language>
<one>KEY_NUMERIC_1</one>
<two>KEY_NUMERIC_2</two>
<three>KEY_NUMERIC_3</three>
<four>KEY_NUMERIC_4</four>
<five>KEY_NUMERIC_5</five>
<six>KEY_NUMERIC_6</six>
<seven>KEY_NUMERIC_7</seven>
<eight>KEY_NUMERIC_8</eight>
<nine>KEY_NUMERIC_9</nine>
<zero>KEY_NUMERIC_0</zero>
</remote>
</lircmap>
Cherry on the cake is I got my power button on the remote working again. Both for shutting down and (cold) booting the machine again.