[mythtv-users] HOWTO for Multiple ATI Remote Wonder remotes

Mercury Morris mercury.morris at gmail.com
Mon Nov 7 13:57:07 EST 2005

HOWTO for Multiple ATI Remote Wonder(RW) remotes

Why this HOWTO:

If you have more than one MythTV system and want to use ATI RW remotes
to control them, then this HOWTO can help you do that.


This HOWTO was developed using Fedora Core 3, kernel 2.6.13, lirc-0.7.2.


This HOWTO applies only to the ATI Remote Wonder PC/MAC RF remote control.
It does not apply to any other model of the ATI Remote Wonder.


1. You can read the output from the command, "modinfo lirc_atiusb".
2. You can Google for "INFO-BASE file 4028", click on "Cached".


This HOWTO assumes that all the software is installed, software installation
is not covered.  Also assumed is that you started with one remote and are
adding a second one.


Here are the steps to configure one remote to control one MythTV,
avoiding any conflict with another MythTV system.

1. Update /etc/modprobe.conf with options for kernel module lirc_atiusb
2. Set unique unit code IDs on each ATI RW remote
3. Re-boot the system, stop MythTV backend and frontend, stop lirc daemon
4. Use irrecord to generate a new, unique /etc/lircd.conf
5. Save the current /etc/lircd.conf, put the newly-generated one in place
6. Restart MythTV backend and frontend, restart lircd daemon, -OR- re-boot
7. Test the system using multiple remotes and/or multiple unit code IDs

You can repeat the steps for a second ATI RW remote and second MythTV system.
Just use different values for unit code ID and the mask in /etc/modprobe.conf.

Here are the details of each step:

1. Update /etc/modprobe.conf

After the line "alias char-major-61 lirc_atiusb", add the line
"options lirc_atiusb unique=1 debug=1 mask=0x0040".

The unique=1 tells lirc_atiusb to use the unit code ID sent by the remote
as part of the data when a button is pressed.  If unique=1 is not included,
lirc_atiusb ignores the unit code ID, stripping it from the data.

The debug=1, though not really needed, makes it easier to
trouble-shoot problems.

The mask=0x0040 tells lirc_atiusb to accept signals only from an ATI RW
that has been configured for unit code ID 07.  Sixteen different unit code
IDs, 01 through 16, may be configured.  In the 16-bit mask, unit code IDs
are numbered starting from the right-most bit, so 0x0040 corresponds to
unit code ID 07.

You can pick any unit code ID, just be sure that you set the remote so
that it corresponds correctly to the mask value.  See the next step.

2. Set a unique unit code ID on one of the ATI RW remotes

Chose a specific ATI RW remote and label it in some way.  Use a piece
of tape, a yellow sticky note, something, and put a meaningful label
on it.  You could use a number, a letter, or the name of the MythTV system.

On the remote itself, Press and Hold the "hand" button (sometimes
called "drag").
The LED will begin blinking rapidly.  Continue to hold the "hand" button until
the blinking slows down, then release the "hand" button.

Next, use the numeric keys to enter the unit code ID.  In this example,
press 0, then press 7.  Finally, press the "hand" key.  You may have read
in the reference material that the number of blinks when you release the
"hand" key is the unit code ID.  And it may be, but it blinks so fast that
it's hard to be sure.

3. Re-boot the system.  As soon as you can, stop the MythTV backend, and the
frontend, in case it is running.  Also stop the lirc daemon.  On Fedora Core,
there are tools to accomplish these steps, but the following will work:

   /etc/rc.d/init.d/mythbackend stop

   /etc/rc.d/init.d/lirc stop

4. Use irrecord to generate a new /etc/lircd.conf

By generating a new /etc/lircd.conf, you are configuring the MythTV system
to match the ATI RW remote from step 2, above.  There is a man page
for irrecord,
as well as good dignostic messages when irrecord can't complete the

irrecord may refuse to run unless it finds /dev/lirc.  If irrecord stops with an
error message about /dev/lirc, you may have to create a symbolic link
to /dev/lirc0
with a command such as, "ln -s /dev/lirc0 /dev/lirc".

irrecord may also timeout, indicating that it didn't receive any signal or data.
If irrecord times out, check to be sure that the value you chose for mask=0xmmmm
corresponds to the unit code ID you set on the remote.  Remember that the unit
code ID is the bit position, starting with the right-most bit in the mask.
So, unit code ID 01 would be mask=0x0001, 02 would be mask=0x0002, 03 would be
mask=0x0004, and so on until unit code 16 would be mask=0x8000.

Once irrecord starts, it will ask you to enter the name of a button on
the remote,
and then press and hold that button until it asks you for the next one.  You can
enter any name you like for any button, but the names must match the
names you have
in ~/.mythtv/lircrc, which is the configuration file for controlling MythTV.

Before you install the new /etc/lircd.conf, you might want to compare it to the
current /etc/lircd.conf.  A good program for comparing is tkdiff, usually found
as part of the tkcvs package.  tkdiff will show, in color, the
individual differences
between the two files.  There should be differences in only two bytes of each
code generated by the ATI RW remote, now configured to unit code ID 07.

5. Save the current /etc/lircd.conf and install the new one

Make a copy of the current /etc/lircd.conf, so you can restore it should you
decide to go back to the condition where the system will respond to all remotes.

Copy the file generated by irrecord to /etc/lircd.conf.

6. Restart MythTV backend and frontend, restart lircd daemon, -OR- re-boot

While it may be possible to restart the MythTV backend and frontend, restart
the lircd daemon, and use the uniquely configured remote, you can also just
re-boot the system.  If you just restart the services but the remote doesn't
seem to have any effect on the MythTV screens and menus, then re-boot
the system.

7. Test the system using multiple remotes and/or multiple unit code IDs

Of course, you want to test the changes you've made to the system configuration
files and the unit code ID on the remote.  And, if you have a second
MythTV system,
you want to test to be sure that its remote does not control the system to which
you've just made the changes.

Another way to test the changes is to set a different unit code ID
into the remote
you configured to match the MythTV system.  If you do change the unit
code ID, then
the remote should be ignored by the system.  When you change it back
(to 07), the
remote should again control the MythTV system.


You may find better and/or different ways to configure multiple ATI RW remotes
to control multiple MythTV systems.  If you do, please post what you find that
works better, easier, or simpler.  If you find errors in the above steps, please
point them out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20051107/352c2f84/attachment.htm

More information about the mythtv-users mailing list