2009-11-08, 22:55
Hi
This is a guide for getting the Cyberlink remote shown below to work in Ubuntu 9.10 Karmic Koala. It may possible to adapt this to other versions, distros etc.
This remote is one of the cheapest remote you can buy here in the UK
This has been become much easier in Ubuntu 9.10 because a patch has been added into kernels after 2.6.30 (Ubuntu 9.10 uses 2.6.31).
Step 1: Check the remote is working and get the event number
Execute the following command on the command line:
This should output information about all the human input devices connected to your machine. If the remote is connected properly this should include two blocks that are similar to mine shown below:
The sections in green are important. If your output does not contain blocks with names like that then either your remote is not the same as mine and this guide is not for you or your remote is not working properly.
Step 2: Install LIRC
This is the
Step 3: Configure your lircd processes
This unfortunately is extra complicated due to the fact that the Cyberlink remote shows up as two devices. Don't worry though, help is at hand. the clever people that wrote LIRC designed it such that you can start multiple processes and connect them together so the remote acts like one device.
Furthermore Mario Limonciello and the rest of the clever people who integrate LIRC into Ubuntu have made it easy to configure these processes in this setup.
So a Big Thankyou to all of them!!
Stop the lircd deamon:
Perhaps repeat this a couple of time to make sure it worked.
You need to edit the hardware.conf, you will need to do this with root permissions like so:
Edit your file to look like mine below. Don't worry about the fact one says it's a transmitter just go with it.
We're going to use the by id symlinks, this means if the device numbers change it will automatically point to the correct devices.
Restart the lircd deamon:
Perhaps repeat this a couple of time to make sure it worked.
Check if its running:
Hopefully you will see two instances of lircd similar to mine shown below:
If you do this is the hard bit done.. :-)
Grab a cup of tea or a beer.
Step 4: Test your LIRC daemon
Run the following command:
Now press all the buttons on your remote. If all is working well you should get out put similar to the following:
And so on...
If so your remote is working well. Make sure all keys result in output.
Step 5: Link the defualt socket to your socket
This step is optional. With most programs including xbmc it's possible to tell it which socket to connect to. But most programs default to /dev/lircd so we'll make that work here:
Step 6: Configure xbmc with your remote
In this step we'll simply copy my config to your xbmc profile.
This is a guide for getting the Cyberlink remote shown below to work in Ubuntu 9.10 Karmic Koala. It may possible to adapt this to other versions, distros etc.
This remote is one of the cheapest remote you can buy here in the UK
This has been become much easier in Ubuntu 9.10 because a patch has been added into kernels after 2.6.30 (Ubuntu 9.10 uses 2.6.31).
Step 1: Check the remote is working and get the event number
Execute the following command on the command line:
Code:
cat /proc/bus/input/devices
Code:
I: Bus=0003 Vendor=0766 Product=0204 Version=0100
[color=GREEN]N: Name="TopSeed Tech Corp. USB IR Combo Device "[/color]
P: Phys=usb-0000:00:02.0-7/input0
S: Sysfs=/devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0/input/input5
U: Uniq=
H: Handlers=kbd [color=red][b]event5[/b][/color]
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f
I: Bus=0003 Vendor=0766 Product=0204 Version=0100
[color=GREEN]N: Name="TopSeed Tech Corp. USB IR Combo Device "[/color]
P: Phys=usb-0000:00:02.0-7/input1
S: Sysfs=/devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.1/input/input6
U: Uniq=
H: Handlers=kbd mouse2 [color=red][b]event6[/b][/color]
B: EV=17
B: KEY=fc112 20d0c0000000000 70000 18000 21f8d001d804 9e004000000000 0
B: REL=103
B: MSC=10
Step 2: Install LIRC
This is the
Code:
sudo apt-get install lirc
Step 3: Configure your lircd processes
This unfortunately is extra complicated due to the fact that the Cyberlink remote shows up as two devices. Don't worry though, help is at hand. the clever people that wrote LIRC designed it such that you can start multiple processes and connect them together so the remote acts like one device.
Furthermore Mario Limonciello and the rest of the clever people who integrate LIRC into Ubuntu have made it easy to configure these processes in this setup.
So a Big Thankyou to all of them!!
Stop the lircd deamon:
Code:
sudo /etc/init.d/lirc stop
You need to edit the hardware.conf, you will need to do this with root permissions like so:
Code:
sudo vi /etc/lirc/hardware.conf
Edit your file to look like mine below. Don't worry about the fact one says it's a transmitter just go with it.
We're going to use the by id symlinks, this means if the device numbers change it will automatically point to the correct devices.
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="CYBERLINK"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-TopSeed_Tech_Corp._USB_IR_Combo_Device-event-mouse"
REMOTE_SOCKET="/var/run/lirc/lircd2"
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
REMOTE_LIRCD_ARGS=""
#Chosen IR Transmitter
TRANSMITTER="CYBERLINK"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER="devinput"
TRANSMITTER_DEVICE="/dev/input/by-id/usb-TopSeed_Tech_Corp._USB_IR_Combo_Device-event-kbd"
TRANSMITTER_SOCKET="/var/run/lirc/lircd"
TRANSMITTER_LIRCD_CONF="devinput/lircd.conf.devinput"
TRANSMITTER_LIRCD_ARGS="-a "
Restart the lircd deamon:
Code:
sudo /etc/init.d/lirc restart
Check if its running:
Code:
ps -ef | grep lircd
Hopefully you will see two instances of lircd similar to mine shown below:
Code:
/usr/sbin/lircd --output=/var/run/lirc/lircd2 --driver=devinput --device=/dev/input/by-id/usb-TopSeed_Tech_Corp._USB_IR_Combo_Device-event-mouse --listen
/usr/sbin/lircd --output=/var/run/lirc/lircd1 --driver=devinput --device=/dev/input/by-id/usb-TopSeed_Tech_Corp._USB_IR_Combo_Device-event-kbd -a --connect=localhost 8765 --pidfile=/var/run/lirc/lircd1.pid
If you do this is the hard bit done.. :-)
Grab a cup of tea or a beer.
Step 4: Test your LIRC daemon
Run the following command:
Code:
irw /var/run/lirc/lircd1
Code:
0000000080010066 00 KEY_HOME devinput
000000008001008e 00 KEY_SLEEP devinput
000000008001018e 00 KEY_RED devinput
000000008001018f 00 KEY_GREEN devinput
0000000080010190 00 KEY_YELLOW devinput
If so your remote is working well. Make sure all keys result in output.
Step 5: Link the defualt socket to your socket
This step is optional. With most programs including xbmc it's possible to tell it which socket to connect to. But most programs default to /dev/lircd so we'll make that work here:
Code:
sudo rm -f /dev/lircd
sudo ln -s /var/run/lirc/lircd1 /dev/lircd
Step 6: Configure xbmc with your remote
In this step we'll simply copy my config to your xbmc profile.
Quote:wget http://www.protazoa.com/cyberlink-remote/Lircmap.xml -O ~/.xbmc/userdata/Lircmap.xml
mkdir -p ~/.xbmc/userdata/kemaps
wget http://www.protazoa.com/cyberlink-remote/remote.xml -O ~/.xbmc/userdata/keymaps/remote.xml