Gamepad/Joypad: Not All Buttons Recognized - Hardware

This is a discussion on Gamepad/Joypad: Not All Buttons Recognized - Hardware ; Hello! I bought a wireless USB Playstation-2-like gamepad for $10 at the local supermarket, and, lo and behold, the thing works in linux! This is what I get from 'dmesg': [17195015.492000] input: Jess Technology Co., Ltd. USB Game Controller as ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Gamepad/Joypad: Not All Buttons Recognized

  1. Gamepad/Joypad: Not All Buttons Recognized

    Hello!

    I bought a wireless USB Playstation-2-like gamepad for $10 at the local
    supermarket, and, lo and behold, the thing works in linux! This is what
    I get from 'dmesg':

    [17195015.492000] input: Jess Technology Co., Ltd. USB Game Controller as
    /class/input/input9 [17195015.492000] input: USB HID v1.01 Joystick [Jess \
    Technology Co., Ltd. USB Game Controller] on usb-0000:00:1d.2-1.1

    However, from 'jstest' I see that while the 12 buttons and 2 analog sticks
    all work, the direction pad is not recognized. I had expected it to be
    recognized as 4 buttons, one for each direction -- at least that was the
    case with another Playstation-2-like gamepad that I once had. So how can I
    get the d-pad working? Is there a way to explicitly tell the driver that
    the pad has 16 buttons, or is there a generic driver for this type of
    gamepad / how can I manually switch the driver?

    Thx!
    ubi

  2. Re: Gamepad/Joypad: Not All Buttons Recognized

    ubi staggered into the Black Sun and said:
    > I bought a wireless USB Playstation-2-like gamepad for $10 at the
    > local supermarket, and, lo and behold, the thing works in linux!


    There's a standard protocol that USB Human Interactive Devices are
    supposed to follow. Practically everything gets it right, so this is
    really not surprising.

    > input: Jess Technology Co., Ltd. USB Game Controller as
    > /class/input/input9 input: USB HID v1.01 Joystick


    There's nothing in a 2.6.20.1 vanilla kernel's USB tree about anything
    weird with Jess Tech. devices that I could find.

    > From 'jstest' I see that while the 12 buttons and 2 analog sticks all
    > work, the direction pad is not recognized. I had expected it to be
    > recognized as 4 buttons, one for each direction -- at least that was
    > the case with another Playstation-2-like gamepad that I once had. So
    > how can I get the d-pad working? Is there a way to explicitly tell the
    > driver that the pad has 16 buttons, or is there a generic driver for
    > this type of gamepad / how can I manually switch the driver?


    I don't see anything in usbhid about explicitly setting the number of
    buttons. There's a PARM that does this for the xpad module, but this is
    a module for the Xbox gamepads, not HID gamepads. The dmesg bits say
    that your device is HID, not Xbox. Um... I dunno. This may require
    kernel-level screwing around to figure out what's really going on with
    the device. Get your printk()s out and be prepared to use them....

    --
    We thank with brief thanksgiving / Whatever gods may be
    That no man lives forever, / That dead men rise up never,
    That even the weariest river / Winds somewhere safe to sea.
    There is no Darkness in Eternity/But only Light too dim for us to see

  3. Re: Gamepad/Joypad: Not All Buttons Recognized

    On Sun, 04 Mar 2007 18:23:51 -0600, Dances With Crows wrote:
    > There's nothing in a 2.6.20.1 vanilla kernel's USB tree about anything
    > weird with Jess Tech. devices that I could find.


    I'm using Ubuntu's 2.6.17-11-generic, maybe it's an Ubuntu-specific patch?

    > I don't see anything in usbhid about explicitly setting the number of
    > buttons. There's a PARM that does this for the xpad module, but this is
    > a module for the Xbox gamepads, not HID gamepads. The dmesg bits say
    > that your device is HID, not Xbox. Um... I dunno. This may require
    > kernel-level screwing around to figure out what's really going on with
    > the device. Get your printk()s out and be prepared to use them....


    Oh well, and I hoped to get away without that kernel hacking stuff...

  4. Re: Gamepad/Joypad: Not All Buttons Recognized

    ubi staggered into the Black Sun and said:
    [ problem with a USB HID gamepad having only 12 of its 16 buttons
    recognized ]
    > On Sun, 04 Mar 2007 18:23:51 -0600, Dances With Crows wrote:
    >> There's nothing in a 2.6.20.1 vanilla kernel's USB tree about
    >> anything weird with Jess Tech. devices that I could find.

    > I'm using Ubuntu's 2.6.17-11-generic, maybe it's an Ubuntu-specific
    > patch?


    ? When the kernel guys find a device that has quirks, they add that
    device's vendor ID and device ID to a table or set of tables in the
    kernel source. Then the module that handles that device class can take
    appropriate action to work around the quirks that device has. Since
    there was nothing about your device in a recent vanilla source tarball,
    I figured that either A) nobody's reported anything to Vojtech and the
    guys yet or B) nobody's used this device yet.

    >> Um... This may require kernel-level screwing around to figure out
    >> what's really going on with the device. Get your printk()s out and
    >> be prepared to use them....

    > Oh well, and I hoped to get away without that kernel hacking stuff...


    It's not hacking if you just add extra statements that display
    additional information. Regardless, you may wish to put the relevant
    output from lsusb -v into a text file, just in case the kernel guys want
    to see it.

    --
    "Assembly of God". Haven't you ever wondered what goes on in a place
    like that? What kinds of parts does God need? --Slacquer
    There is no Darkness in Eternity/But only Light too dim for us to see

+ Reply to Thread