This tutorial will help you install and use an ATI usb Remote Wonder with LIRC.
This is tested on a Remote Wonder I, which came included in an ATI TV-Wonder Pro Remote Control Edition package.
It is the same version that ships with recent ATI All-In-Wonder cards and also sold separately.
If you get this working on other models drop me an email, I'll add it to the list here.
Various other ways to install these remotes exist. You can use the Gatos ati_remote module, which allows your remote to be used as a regular input device in X. Some info can be found here.
This also involves configuring keymaps in X with xmodmap, and using plugins like xmms-itouch to grab keys for events (something I like to keep exclusive to my multimedia keyboard). I prefered LIRC since it is easier to use and configure in general.
The only package you really need is LIRC, but to use it with other programs you'll need a couple more:
You will also need the following configuration files I have modified and written for use here:
root@galileo:~# lsusb Bus 001 Device 003: ID 0bc7:0004 X10 Wireless Technology, Inc.
root@galileo:~# rpm -Uvh lirc-0.7.0pre4-1.i386.rpm Preparing... ########################################### [100%] 1:lirc ########################################### [100%] root@galileo:~#
root@galileo:~# rpm -Uvh xmms-lirc-1.4-2.fr.i386.rpm Preparing... ########################################### [100%] 1:xmms-lirc ########################################### [100%] root@galileo:~#After you install xmms-lirc, restart XMMS if it is running, then enable the plugin in the Options window.
root@galileo:~# mv lircd.conf /etc/lircd.conf root@galileo:~# mv lircmd.conf /etc/lircmd.confDon't forget to move lircrc to your home directory, name it /home/yourusername/.lircrc
Section "InputDevice" Identifier "LIRC-Mouse" Driver "mouse" Option "Device" "/dev/lircm" Option "Protocol" "IMPS/2" Option "SendCoreEvents" Option "Buttons" "5" Option "ZAxisMapping" "4 5" EndSectionAdd the following to your ServerLayout section in XF86Config, it should look something like this:
Section "ServerLayout" Identifier "ServerLayout" Screen "Screen0" InputDevice "Mouse1" "CorePointer" InputDevice "LIRC-mouse" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection
root@galileo:~# chmod 666 /dev/lircd
root@galileo:~# lircd --nodaemon lircd 0.7.0pre3: lircd(atiusb) readyIf you get no error messages, then all is fine. Control-c to kill it, and run it in the background as a daemon (without '--nodaemon')
ymakki@galileo:~$ irw 00000014c702f000 00 power atiusb 00000014c702f000 01 power atiusb 00000014c702f000 02 power atiusb 00000014c702f000 03 power atiusb 00000014c702f000 04 power atiusb 00000014ce09f000 00 vol-down atiusb 00000014ce09f000 01 vol-down atiusb 00000014ce09f000 02 vol-down atiusb 00000014ce09f000 03 vol-down atiusb 00000014ce09f000 04 vol-down atiusbIf you see similar output, then everything is working perfectly fine so far. To test using the remote as a mouse, first restart X with the mentioned modifications to the configuration above. Then run lircmd to test it:
root@galileo:~# lircmd --nodaemon
ymakki@galileo:~$ irexec --daemonirexec lets you bind commands to buttons on your remote, which you configure in ~/.lircrc in the first section. For example:
begin button = web prog = irexec repeat = 0 config = firefox endThis will launch FireFox when you press the Web button on the remote. Very cool!
ymakki@galileo:~$ mplayer test.avi MPlayer dev-CVS--3.3.2 (C) 2000-2003 MPlayer Team CPU: Intel Celeron 2/Pentium III Tualatin 1005 MHz (Family: 6, Stepping: 1) Detected cache-line size is 32 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0 .. .. Falling back on default (hardcoded) input config Opening joystick device /dev/input/js0 Can't open joystick device /dev/input/js0 : No such device Can't init input joystick Setting up LIRC support... Playing test.avi.
#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local lircd lircmdYou also need to run irexec on startup. In Gnome, add 'irexec --daemon' to Applications -> Preferences -> More Preferences -> Sessions (gnome-session-properties). You can also add it to ~/.xinitrc or other startup scripts you run (.bashrc serves another purpose, but it you can add it there too).
ymakki@galileo:~$ mplayer test.avi MPlayer dev-CVS--3.3.2 (C) 2000-2003 MPlayer Team CPU: Intel Celeron 2/Pentium III Tualatin 1005 MHz (Family: 6, Stepping: 1) Detected cache-line size is 32 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0 .. .. Falling back on default (hardcoded) input config Opening joystick device /dev/input/js0 Can't open joystick device /dev/input/js0 : No such device Can't init input joystick Setting up LIRC support... mplayer: could not connect to socket mplayer: Permission denied Failed to open LIRC support. You will not be able to use your remote control. Playing test.avi.This is easily fixed by setting proper permissions on /dev/lircd:
root@galileo:~# chmod 666 /dev/lircd
ymakki@galileo:~$ ps -aux | grep irexec ymakki 5991 0.0 0.0 2460 352 ? S 14:47 0:00 irexec ymakki@galileo:~$
As you recall, we used irw to test the remote initially. You could use this to grab the names of all buttons on your remote, for use in various programs. Here's a list I put together while configuring mine, you can also find them in /etc/lircd.conf.
Regarding specific programs like XMMS and Mplayer, you'll find detailed info on commands you can send them in their documentation. The xmms-lirc contains all the info you need in /usr/share/doc/xmms-lirc-1.4/README, and Mplayer has an LIRC section in their documentation online. I found some other sources for Mplayer, you'll find them in the links section.
You shouldn't really need to change anything in /etc/lircd.conf, but have a look at /etc/lircmd.conf. You could change mouse cursor acceleration rates, and change which buttons are used as the mouse wheel. I currently set those to the up/down arrow buttons on the bottom. The syntax is pretty straight-forward so it shouldn't be tough.
You'll definitely want to look at .lircrc and change it to your liking. It's very simple, check the documentation on lirc.org.
One other program I'd like to mention is XOSD, which I find extremely useful. It displays OSD style info on your screen, and has an xmms plugin. It's triggered by events such as volume/song change, and is configurable. You can find it here. You'll need both xosd and xmms-xosd.
If you have any suggestions or additions to this faq, drop me an email. Check my TODO list to see if you can help in any way. Thanks go to the authors of the docs in the Links section.8. Links You'll find the links I used to find info while installing the remote and writing this document here.
License and Copyright
Copyright (c) 2004, Youssef Makki.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is located at www.gnu.org/copyleft/fdl.html.