Joystick problem ;) {NetBSD/libSDL-CVS and 1.2.9}

Hi,
I run SDL on NetBSD… don’t know if it’s relevant or not, but I guess
that’s a good start to the message. :wink:
I’ve tried both libSDL-CVS and 1.2.9, but I have this one problem…
I have this USB dancepad-- let’s call it a USB joystick. (As that’s
what it should be detected as)
Now, it has 10 buttons-- up,down,left,right, diagonal ups and downs, a
center button and aback button-- so 10 buttons!
Now, when I start something that uses SDL, e.g. the SDL joystick test
program, or better yet pydance (through pygame which is, subsequently,
using SDL), I get something like:
Joystick 0 initialized: 0 axes, 0 buttons.
Hmmmm… bad…
Now, you’re probably thinking "Oh, must be a NetBSD kernel problem!"
Well, I’ll show you the dmesg output for detection of my “joystick”:

pseudoxh4: {1} dmesg | grep uhid
uhidev0 at uhub1 port 1 configuration 1 interface 0
uhidev0: Andamiro Andamiro Pump it up!, rev 1.00/0.01, addr 2, iclass 3/0
uhid0 at uhidev0: input=2, output=2, feature=0

So far so good!
I tried cat-ing it and reading the garbage output for each button and
a combination of buttons-- seems fine.
Now, to proceed to what most NetBSD/*BSD users would do when getting
their uhid connected-- do a usbhidctl -f 0 -a; i.e. showing all items
and their current values… let’s see:

pseudoxh4: {4} usbhidctl -f 0 -a
usbhidctl: USB_GET_REPORT(input) [probably not supported by device]:
Input/output error

Whaddaya know… the device doesn’t have USB_GET_REPORT support…
hrmm… perhaps a contribution to the problem?

OK, time for plan B-- dump the USB HID report descriptor:

pseudoxh4: {6} usbhidctl -f 0 -r
Report descriptor:
Collection page=Microsoft usage=0x0001
Input size=2 count=1 page=Microsoft usage=0x0001, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0002, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0003, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0004, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0005, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0006, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0007, logical range 0…1
Input size=2 count=1 page=Microsoft usage=0x0008, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0001, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0002, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0003, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0004, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0005, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0006, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0007, logical range 0…1
Output size=2 count=1 page=Microsoft usage=0x0008, logical range 0…1
End collection
Total input size 2 bytes
Total output size 2 bytes
Total feature size 0 bytes

Seems pretty fine on my end…

Now my question is… is there any way to get around the SDL problem?
I can’t double check if this joystick works on Linux or other BSD
flavours (Don’t have any access to stray boxes) but I do know it runs
on Windows-- irrelevant to me however…

Anyone got any ideas?
Thanks ALOT for any responses!

-Ahmad

I run SDL on NetBSD… don’t know if it’s relevant or not, but I guess
that’s a good start to the message. :wink:
I’ve tried both libSDL-CVS and 1.2.9, but I have this one problem…
I have this USB dancepad-- let’s call it a USB joystick. (As that’s
what it should be detected as)
Now, it has 10 buttons-- up,down,left,right, diagonal ups and downs, a
center button and aback button-- so 10 buttons!
Now, when I start something that uses SDL, e.g. the SDL joystick test
program, or better yet pydance (through pygame which is, subsequently,
using SDL), I get something like:
Joystick 0 initialized: 0 axes, 0 buttons.

Are other joysticks detected correctly? Do any non-SDL programs detect
this dancepad correctly?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello,

I have not tried other joysticks since I don’t have any others…
Also, I haven’t found any other joystick-compatible alternative for
SDL/NetBSD… but all I can say is that it works on Windows great.
Don’t know, guess I’m too vague… trying to find a solution for
this nasty problem though…
Thanks for any responses,

AhmadOn 1/31/06, Sam Lantinga wrote:

I run SDL on NetBSD… don’t know if it’s relevant or not, but I guess
that’s a good start to the message. :wink:
I’ve tried both libSDL-CVS and 1.2.9, but I have this one problem…
I have this USB dancepad-- let’s call it a USB joystick. (As that’s
what it should be detected as)
Now, it has 10 buttons-- up,down,left,right, diagonal ups and downs, a
center button and aback button-- so 10 buttons!
Now, when I start something that uses SDL, e.g. the SDL joystick test
program, or better yet pydance (through pygame which is, subsequently,
using SDL), I get something like:
Joystick 0 initialized: 0 axes, 0 buttons.

Are other joysticks detected correctly? Do any non-SDL programs detect
this dancepad correctly?

    -Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl