<pre>HOWTO for Multiple ATI Remote Wonder(RW) remotes<br><br>Why this HOWTO:<br><br>If you have more than one MythTV system and want to use ATI RW remotes<br>to control them, then this HOWTO can help you do that.<br><br>Software:
<br><br>This HOWTO was developed using Fedora Core 3, kernel 2.6.13, lirc-0.7.2.<br><br>Hardware:<br><br>This HOWTO applies only to the ATI Remote Wonder PC/MAC RF remote control.<br>It does not apply to any other model of the ATI Remote Wonder.
<br><br>References:<br><br>1. You can read the output from the command, &quot;modinfo lirc_atiusb&quot;.<br>2. You can Google for &quot;INFO-BASE file 4028&quot;, click on &quot;Cached&quot;.<br><br>Assumptions:<br><br>This HOWTO assumes that all the software is installed, software installation
<br>is not covered.  Also assumed is that you started with one remote and are<br>adding a second one.<br><br>Configuration:<br><br>Here are the steps to configure one remote to control one MythTV,<br>avoiding any conflict with another MythTV system.
<br><br>1. Update /etc/modprobe.conf with options for kernel module lirc_atiusb<br>2. Set unique unit code IDs on each ATI RW remote<br>3. Re-boot the system, stop MythTV backend and frontend, stop lirc daemon<br>4. Use irrecord to generate a new, unique /etc/lircd.conf
<br>5. Save the current /etc/lircd.conf, put the newly-generated one in place<br>6. Restart MythTV backend and frontend, restart lircd daemon, -OR- re-boot<br>7. Test the system using multiple remotes and/or multiple unit code IDs
<br><br>You can repeat the steps for a second ATI RW remote and second MythTV system.<br>Just use different values for unit code ID and the mask in /etc/modprobe.conf.<br><br>Here are the details of each step:<br><br>1. Update /etc/modprobe.conf
<br><br>After the line &quot;alias char-major-61 lirc_atiusb&quot;, add the line<br>&quot;options lirc_atiusb unique=1 debug=1 mask=0x0040&quot;.<br><br>The unique=1 tells lirc_atiusb to use the unit code ID sent by the remote
<br>as part of the data when a button is pressed.  If unique=1 is not included,<br>lirc_atiusb ignores the unit code ID, stripping it from the data.<br><br>The debug=1, though not really needed, makes it easier to trouble-shoot problems.
<br><br>The mask=0x0040 tells lirc_atiusb to accept signals only from an ATI RW<br>that has been configured for unit code ID 07.  Sixteen different unit code<br>IDs, 01 through 16, may be configured.  In the 16-bit mask, unit code IDs
<br>are numbered starting from the right-most bit, so 0x0040 corresponds to<br>unit code ID 07.<br><br>You can pick any unit code ID, just be sure that you set the remote so <br>that it corresponds correctly to the mask value.  See the next step.
<br><br>2. Set a unique unit code ID on one of the ATI RW remotes<br><br>Chose a specific ATI RW remote and label it in some way.  Use a piece<br>of tape, a yellow sticky note, something, and put a meaningful label<br>on it.  You could use a number, a letter, or the name of the MythTV system.
<br><br>On the remote itself, Press and Hold the &quot;hand&quot; button (sometimes called &quot;drag&quot;).<br>The LED will begin blinking rapidly.  Continue to hold the &quot;hand&quot; button until<br>the blinking slows down, then release the &quot;hand&quot; button.
<br><br>Next, use the numeric keys to enter the unit code ID.  In this example,<br>press 0, then press 7.  Finally, press the &quot;hand&quot; key.  You may have read<br>in the reference material that the number of blinks when you release the
<br>&quot;hand&quot; key is the unit code ID.  And it may be, but it blinks so fast that<br>it's hard to be sure.<br><br>3. Re-boot the system.  As soon as you can, stop the MythTV backend, and the<br>frontend, in case it is running.  Also stop the lirc daemon.  On Fedora Core,
<br>there are tools to accomplish these steps, but the following will work:<br><br>   /etc/rc.d/init.d/mythbackend stop<br><br>   /etc/rc.d/init.d/lirc stop<br><br>4. Use irrecord to generate a new /etc/lircd.conf<br><br>
By generating a new /etc/lircd.conf, you are configuring the MythTV system<br>to match the ATI RW remote from step 2, above.  There is a man page for irrecord,<br>as well as good dignostic messages when irrecord can't complete the configuration
<br>process.<br><br>irrecord may refuse to run unless it finds /dev/lirc.  If irrecord stops with an<br>error message about /dev/lirc, you may have to create a symbolic link to /dev/lirc0<br>with a command such as, &quot;ln -s /dev/lirc0 /dev/lirc&quot;.
<br><br>irrecord may also timeout, indicating that it didn't receive any signal or data.<br>If irrecord times out, check to be sure that the value you chose for mask=0xmmmm<br>corresponds to the unit code ID you set on the remote.  Remember that the unit 
<br>code ID is the bit position, starting with the right-most bit in the mask.<br>So, unit code ID 01 would be mask=0x0001, 02 would be mask=0x0002, 03 would be<br>mask=0x0004, and so on until unit code 16 would be mask=0x8000.
<br><br>Once irrecord starts, it will ask you to enter the name of a button on the remote,<br>and then press and hold that button until it asks you for the next one.  You can<br>enter any name you like for any button, but the names must match the names you have
<br>in ~/.mythtv/lircrc, which is the configuration file for controlling MythTV.<br><br>Before you install the new /etc/lircd.conf, you might want to compare it to the<br>current /etc/lircd.conf.  A good program for comparing is tkdiff, usually found
<br>as part of the tkcvs package.  tkdiff will show, in color, the individual differences<br>between the two files.  There should be differences in only two bytes of each<br>code generated by the ATI RW remote, now configured to unit code ID 07.
<br><br>5. Save the current /etc/lircd.conf and install the new one<br><br>Make a copy of the current /etc/lircd.conf, so you can restore it should you <br>decide to go back to the condition where the system will respond to all remotes.
<br><br>Copy the file generated by irrecord to /etc/lircd.conf.<br><br>6. Restart MythTV backend and frontend, restart lircd daemon, -OR- re-boot<br><br>While it may be possible to restart the MythTV backend and frontend, restart
<br>the lircd daemon, and use the uniquely configured remote, you can also just<br>re-boot the system.  If you just restart the services but the remote doesn't<br>seem to have any effect on the MythTV screens and menus, then re-boot the system.
<br><br>7. Test the system using multiple remotes and/or multiple unit code IDs<br><br>Of course, you want to test the changes you've made to the system configuration<br>files and the unit code ID on the remote.  And, if you have a second MythTV system,
<br>you want to test to be sure that its remote does not control the system to which<br>you've just made the changes.<br><br>Another way to test the changes is to set a different unit code ID into the remote<br>you configured to match the MythTV system.  If you do change the unit code ID, then
<br>the remote should be ignored by the system.  When you change it back (to 07), the<br>remote should again control the MythTV system.<br><br>Follow-on:<br><br>You may find better and/or different ways to configure multiple ATI RW remotes
<br>to control multiple MythTV systems.  If you do, please post what you find that<br>works better, easier, or simpler.  If you find errors in the above steps, please<br>point them out.<br><br></pre>