<br><br>
<div><span class="gmail_quote">On 10/21/05, <b class="gmail_sendername">Vladan Bato</b> <<a href="mailto:vbato@ieee.org">vbato@ieee.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Quoting myself:<br>> However I think that it's a problem with the particular remote (or better,<br>> the remote dongle) that I have.
<br>><br>> By poking in the /proc/usb/devices, I discovered that the remote is<br>> actually seen as a gamepad and handled by the xpad driver. This also means<br>> that lirc never sees it.<br>><br>> I guess I'll have to spend the €30 for a genuine Microsoft DVD kit.
<br>><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> { 0xffff, 0xffff, 0, "Chinese-made Xbox Controller" }, /* 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> * # cd /usr/src/kernel-2.4.31-xbox<br> * # cp /boot/config-2.4.31-xbox .config<br> * # make oldconfig<br> * # make dep
<br>* Go to the drivers/usb directory and modify the xpad-core.c and xir.c<br>files:<br> * # cd drivers/usb<br> * # vi xpad-core.c<br> * Comment the line mentioned above (line 95) and save the file<br> * # vi xir.c<br>
* Add the following line after line 83 (in the xir_device array):<br> { 0xffff, 0xffff, "Chinese-made Xbox Controller" },<br> (Notice that it's not the same as above, there is one less element<br>in the struct).
<br> * Compile the modules (I didn't know how to compile modules in a<br>single directory, so I compiled them all):<br> * # cd /usr/src/kernel-2.4.31-xbox<br> * # make modules<br> * 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> * 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: 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>