[mythtv-users] Re: Xbox as FE

Robert Anderson riznob at gmail.com
Fri Oct 21 17:29:04 UTC 2005


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

--
Rob Anderson
riznob at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20051021/a86654e9/attachment.htm


More information about the mythtv-users mailing list