All done now.. all keys working ( OK and Enter seem to send the same code but I can live with that ).. better write it all down before I forget it...
Setup
Acer R3700
Lubuntu... Linux meegosh 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Install packages
Code:
apt-get install lirc inputlirc
/etc/lirc/hardware.conf
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES=""
REMOTE_DRIVER=""
REMOTE_DEVICE=""
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
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="false"
#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="true"
# 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=""
/etc/lirc/lircd.conf
Code:
#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.
#Configuration for the Linux input layer (/dev/input/eventX) remote:
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
/etc/default/inputlirc
Code:
# Options to be passed to inputlirc.
EVENTS="/dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-event-kbd /dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-if01-event-mouse"
OPTIONS="-g -m 0 -c"
Fire it up
Code:
service inputlirc start
Running irw now should produce some output when buttons are pressed
Code:
irw
2 0 KEY_1 /dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-event-kbd
a6 0 KEY_STOPCD /dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-if01-event-mouse
Stop X from grabbing keyboard event
Add in /etc/X11/xorg.conf
Code:
Section "InputClass"
Identifier "Ignore BTC USB Multimedia Cordless Keyboard"
MatchProduct "BTC USB Multimedia Cordless Keyboard"
MatchIsKeyboard "true"
Option "Ignore" "true"
EndSection
xbmc config
~/.xbmc/userdata/Lircmap.xml
Code:
<lircmap>
<remote device="/dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-event-kbd">
<up>KEY_UP</up>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<down>KEY_DOWN</down>
<select>KEY_ENTER</select>
<zero>KEY_0</zero>
<one>KEY_1</one>
<two>KEY_2</two>
<three>KEY_3</three>
<four>KEY_4</four>
<five>KEY_5</five>
<six>KEY_6</six>
<seven>KEY_7</seven>
<eight>KEY_8</eight>
<nine>KEY_9</nine>
<star>SHIFT_KEY_8</star>
<hash>SHIFT_KEY_3</hash>
<subtitle>KEY_TEXT</subtitle>
<clear>KEY_ESC</clear>
</remote>
<remote device="/dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-if01-event-mouse">
<power>KEY_SLEEP</power>
<record>KEY_RECORD</record>
<pause>KEY_PAUSE</pause>
<stop>KEY_STOPCD</stop>
<reverse>KEY_REWIND</reverse>
<play>KEY_PLAY</play>
<forward>KEY_FASTFORWARD</forward>
<skipminus>KEY_PREVIOUSSONG</skipminus>
<skipplus>KEY_NEXTSONG</skipplus>
<back>KEY_BACK</back>
<info>KEY_PROPS</info>
<display>KEY_MEDIA</display>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<mute>KEY_MUTE</mute>
<recordedtv>KEY_TV2</recordedtv>
<guide>KEY_PROGRAM</guide>
<livetv>KEY_TV</livetv>
<menu>KEY_MENU</menu>
<mymusic>KEY_MP3</mymusic>
<mypictures>KEY_CAMERA</mypictures>
<myvideo>KEY_VIDEO</myvideo>
<title>KEY_RADIO</title>
<up>KEY_CHANNELUP</up>
<down>KEY_CHANNELDOWN</down>
<subtitle>KEY_TEXT</subtitle>
<red>KEY_RED</red>
<green>KEY_GREEN</green>
<yellow>KEY_YELLOW</yellow>
<blue>KEY_BLUE</blue>
</remote>
</lircmap>
~/.xbmc/userdata/keymaps/remote.xml
Code:
<keymap>
<global>
<remote>
<power>XBMC.Suspend()</power>
</remote>
</global>
</keymap>
Enable debugging and you should be getting in ~/.xbmc/temp/debug.log
Code:
23:29:01 T:140598791657344 DEBUG: LIRC: Update - NEW at 939153:2 0 KEY_1 /dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-event-kbd (KEY_1)
23:29:01 T:140598791657344 DEBUG: OnKey: 206 (ce) pressed, action is Number1
23:29:04 T:140598791657344 DEBUG: LIRC: Update - NEW at 942386:a6 0 KEY_STOPCD /dev/input/by-id/usb-BTC_USB_Multimedia_Cordless_Keyboard-if01-event-mouse (KEY_STOPCD)
23:29:04 T:140598791657344 DEBUG: OnKey: 224 (e0) pressed, action is Stop
enable wake from USB
Add in /etc/rc.local
Code:
echo enabled > /sys/bus/usb/devices/usb4/power/wakeup
echo enabled > /sys/bus/usb/devices/4-2/power/wakeup
Get numbers from lsusb
Code:
lsusb | grep Behavior
Bus 004 Device 002: ID 046e:5577 Behavior Tech. Computer Corp.
Think that's everything.
Edit: Updated to bind RADIO key to context menu.