Archive for September, 2011

XBMCbuntu ATI Remote Wonder Howto

I recently re-discovered my ATI Remote Wonder and decided to get it working under my Ubuntu Linux XBMC install.

First, install lirc. I selected the option to use the “ATI/NVidia/X10 I II RF Remote” with the kernel (Not userspace) driver, with no transmitter.

sudo apt-get install lirc

My /etc/lirc/lirc.conf file looks like:

include "/usr/share/lirc/extras/more_remotes/atiusb/lircd.conf.atiusb"

My /etc/lirc/hardware.conf was generated automatically by debconf during the lirc install. However, for reference it is:

# /etc/lirc/hardware.conf
#Chosen Remote Control
REMOTE="ATI/NVidia/X10 I REMOTE="None" II RF Remote"
REMOTE_MODULES="lirc_dev lirc_atiusb"
#Chosen IR Transmitter
#Enable lircd
#Don't start lircmd even if there seems to be a good config file
#Try to load appropriate kernel modules
# Default configuration files for your hardware if any
#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"

Restart the lirc daemon and run irw and ensure there is output produced:

sudo /etc/init.d/lirc restart
# * Starting remote control daemon(s) : LIRC
# 000000144b760000 00 mouse-right_down SAPPHIRE_ATIUSB_5000023600
# 0000001446710000 00 mouse-right SAPPHIRE_ATIUSB_5000023600

Copy lirc & keymap configuration files into the user XBMC folder (If they do not exist).

#copy Lirc configuration file
cd ~/.xbmc/userdata
cp cp /usr/share/xbmc/system/Lircmap.xml .
#copy remote.xml keymap
cd ~/.xbmc/userdata/keymaps/
cp /usr/share/xbmc/system/keymaps/remote.xml .

Edit the XBMC LIRC Configuration File (Lircmap.xml) to contain the following key mappings, ensuring that the device matches the device output by irw.

        <remote device="SAPPHIRE_ATIUSB_5000023600">

Restart XBMC and you should now have ATI Remote support.

I spent considerable effort attempting to get The Lirc Mouse support working. However, I had no success. I found that X would recognize the LIRC mouse, but wouldn’t find an appropriate driver for it. In the end, I assigned the mouse buttons to the navigation keys via Lircmap.xml.

For the curious I will post the process that I used to get X to the point where it would detect the remote (according to the Xorg log).

The default settings for the lircm daemon wern’t creating the appropriate /dev/lircm which, I believe, prevents X from locating the mouse, so I had to take an alternative approach using the uinput module. It seems that this method has had limited success with others so perhaps it is a system configuration issue with me.

First I configured my /etc/lirc/lircm.conf file with the following contents (the button presses determined from examining the output of irw):

# To find out how to get a proper configuration file please read:
#       /usr/share/doc/lirc/README.Debian
PROTOCOL IntelliMouse
MOVE_N * mouse-up
MOVE_S * mouse-down
MOVE_W * mouse-left
MOVE_E * mouse-right
MOVE_NW * mouse-up-left
MOVE_NE * mouse-up-right
MOVE_SW * mouse-down-left
MOVE_SE * mouse-down-right

Next I ensured that the START_LIRCMD value is FALSE in /etc/lirc/hardware.conf:

#Make sure there isn't a trailing START_LIRCMD in your hardware.conf as there was in mine.

While experimenting I would load the uinput module manually, then start lircmd by hand – however, a working implementation would have uinput in /etc/modprobe.d so it loads automatically, and lircmd in something like rc.conf so it runs automatically.

#Make sure lircd is already running (see above)
#load the module and start lircmd for testing:
sudo modprobe uinput
sudo lircmd --uinput

At this point you’re able to restart X and have it detect the lircm mouse. However, I never got it to properly load the drivers. If anyone knows what I’m missing it would be great if you could post in the comments.

, , , ,