<br><br>
<div><span class="gmail_quote">On 10/21/05, <b class="gmail_sendername">Vladan Bato</b> &lt;<a href="mailto:vbato@ieee.org">vbato@ieee.org</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Quoting myself:<br>&gt; However I think that it's a problem with the particular remote (or better,<br>&gt; the remote dongle) that I have.
<br>&gt;<br>&gt; By poking in the /proc/usb/devices, I discovered that the remote is<br>&gt; actually seen as a gamepad and handled by the xpad driver. This also means<br>&gt; that lirc never sees it.<br>&gt;<br>&gt; I guess I'll have to spend the €30 for a genuine Microsoft DVD kit.
<br>&gt;<br><br>Well, I spared the €30 as I managed to make it work!<br><br>So, for the record (if anybody happens to have the same problem), here's<br>what I found out and what I did:<br><br>The first question was: why was the remote receiver handled by the xpad
<br>driver. I looked at /proc/bus/usb/devices and noticed that this device<br>had a strange ID. Both Vendor and ProdID where ffff!<br><br>I then looked at the xpad driver sources to see what it says about this<br>device. And here's what I found in drivers/usb/xpad-
core.c:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ 0xffff, 0xffff, 0, &quot;Chinese-made Xbox Controller&quot; }, /* WTF are<br>device IDs for? */<br><br>It appears that there are many xbox game controllers (and apparently DVD<br>dongles) that have bogus IDs. The xpad driver handles them all and
<br>assumes they are game controllers.<br><br>The question was: If I made the xir driver (the one handling the xbox<br>remote) recognize this device, would it work? Well, it did.<br><br>Before I explain what I did, let's write something for google to index
<br>in case someone does a search for this:<br><br>How to make cheap chinese aftermarket DVD remotes for Xbox work with<br>LIRC in xebian 1.1.4:<br><br>Note: I'm writing this from memory, so it probably contains errors.<br>
<br>* Get the kernel sources (use apt)<br>* configure the sources using the config file in /boot:<br>&nbsp;&nbsp;* # cd /usr/src/kernel-2.4.31-xbox<br>&nbsp;&nbsp;* # cp /boot/config-2.4.31-xbox .config<br>&nbsp;&nbsp;* # make oldconfig<br>&nbsp;&nbsp;* # make dep
<br>* Go to the drivers/usb directory and modify the xpad-core.c and xir.c<br>files:<br>&nbsp;&nbsp;* # cd drivers/usb<br>&nbsp;&nbsp;* # vi xpad-core.c<br>&nbsp;&nbsp;* Comment the line mentioned above (line 95) and save the file<br>&nbsp;&nbsp;* # vi xir.c<br>
&nbsp;&nbsp;* Add the following line after line 83 (in the xir_device array):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ 0xffff, 0xffff, &quot;Chinese-made Xbox Controller&quot; },<br>&nbsp;&nbsp; (Notice that it's not the same as above, there is one less element<br>in the struct).
<br>&nbsp;&nbsp;* Compile the modules (I didn't know how to compile modules in a<br>single directory, so I compiled them all):<br>&nbsp;&nbsp;* # cd /usr/src/kernel-2.4.31-xbox<br>&nbsp;&nbsp;* # make modules<br>&nbsp;&nbsp;* Copy the two modules (xpad.o and xir.o
) to the<br>/lib/modules/2.4.31-xbox/kernel/drivers/usb/ directory, overwriting the<br>old ones (make a backup first).<br>&nbsp;&nbsp;* Reboot the xbox. The xir driver should now handle the remote, and<br>lirc should work correctly (test it with irw).
<br><br><br>--<br>Vladan Bato<br><a href="mailto:vbato@ieee.org">vbato@ieee.org</a><br><br><br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org
</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br><br><br></blockquote></div><br>Question:&nbsp;Should the genuine Micro$oft remote work after these changes are made? If you think so, send me the updated 
xir.o and xpad.o files and I will include them in the dist. Even if they don't work with the MS remote, I could include them in the dist so that users who need them could easily install them and use an aftermarket remote.
<br clear="all"><br>-- <br>Rob Anderson<br><a href="mailto:riznob@gmail.com">riznob@gmail.com</a>