Logitech xbox gamepad as a uhid

Kevin Downey redchin at gmail.com
Wed Jan 30 12:14:32 PST 2008


I have a wireless xbox (not xbox 360) gamepad that I would like to use
as a remote control for media stuff in X. I figure a first step in
that direction is to get it recognized as a uhid device.

I find it hard to believe that I am the first person to do this on a
freebsd box, yet googling the only hits I get are about xbox360
gamepad support.


uhub7: <Logitech Wingman Wireless Xbox Controller (hub), class 9/0,
rev 1.10/1.03, addr 2> on uhub1
uhub7: 3 ports with 2 removable, bus powered
id->bInterfaceClass 0x58
ugen0: <vendor 0x046d product 0xca84, class 0/0, rev 1.10/1.03, addr 3> on uhub7

the "id->bInterfaceClass 0x58" is from a printf I added after line 208
in /sys/dev/usb/uhid.c


    /* The Xbox 360 gamepad doesn't use the HID class. */
    printf("id->bInterfaceClass 0x%x\n",id->bInterfaceClass);
    if (id->bInterfaceClass != UICLASS_VENDOR ||
        id->bInterfaceSubClass != UISUBCLASS_XBOX360_CONTROLLER ||
        id->bInterfaceProtocol != UIPROTO_XBOX360_GAMEPAD)
      return (UMATCH_NONE);

My idea was maybe I could just add a case for this controller.
Does anyone have any pointers(har har), besides "read the source" for
how to get this working?

-- 
The Mafia way is that we pursue larger goals under the guise of
personal relationships.
    Fisheye


More information about the freebsd-usb mailing list