LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Usb Gamepad (http://www.linuxquestions.org/questions/linux-general-1/usb-gamepad-321394/)

LostNLinux 05-08-2005 03:24 PM

Usb Gamepad
 
I am having a problem with a usb gamepad. I'm using kernel version 2.6.11.8. When I plug in my gamepad, dmesg gives an error -
"usbhid: probe of 1-1:1.0 failed with error -5".
At this point if I try "cat /dev/js0" or "cat /dev/input/js0" I get "no such device".

I have most USB modules compiled in kernel because this same thing happened when they were individual modules.

I've read that usbhid error 5 is an EIO error or an I/O error. I also read someone say that error 5 is not actually an error but is the usbhid module ignoring the device so the usbserial module can use it. I'm not sure if that's true. In any case I have usbserial compiled in kernel too.

This gamepad works in Windows so I know it's functional. The relevant portion of dmesg is :
usbcore: registered new driver usbfs
usbcore: registered new driver hub
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: default language 0x0409
usb usb1: Product: UHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.11.8 uhci_hcd
usb usb1: SerialNumber: 0000:00:1f.2
usb usb1: hotplug
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: hotplug
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: no power switching (usb 1.0)
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: default language 0x0409
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.11.8 uhci_hcd
usb usb2: SerialNumber: 0000:00:1f.4
usb usb2: hotplug
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: hotplug
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: no power switching (usb 1.0)
usb 1-1: new low speed USB device using uhci_hcd and address 2
usb 1-1: skipped 1 descriptor after interface
usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: default language 0x0409
usb 1-1: Product: RetroPad4Score
usb 1-1: Manufacturer: SealieComputing
usb 1-1: hotplug
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: hotplug
usbcore: registered new driver usb-storage
usbcore: registered new driver hiddev
usbhid 1-1:1.0: usb_probe_interface
usbhid 1-1:1.0: usb_probe_interface - got id
usbhid: probe of 1-1:1.0 failed with error -5
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver

Does anyone have any ideas?
Thanks!

xukosky 05-09-2005 08:23 AM

Mine is at /dev/usb/js0 or similar (i can't test it now).

You can also look at the kde control center if you have it installed.

LostNLinux 05-09-2005 11:12 AM

Quote:

Originally posted by xukosky
Mine is at /dev/usb/js0 or similar (i can't test it now).

You can also look at the kde control center if you have it installed.


THe only thing(s) I have under /dev/usb that look like they might work is hiddev*. I tried all 15 of them and couldn't find one that worked. KDE Control Center says it couldn't detect a joystick.

Let me add a little more information here.

I'm using an install of SuSE 9.2 but have manually upgraded to 2.6.11.8.

My gamepad shows up on /proc/bus/usb/devices and lsusb shows this for the device:

Bus 001 Device 002: ID 0f00:0040
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0f00
idProduct 0x0040
bcdDevice 0.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 bytes 8 once
bInterval 10
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 55
Report Descriptor: (length is 55)
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x05 ] 5
Gamepad
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Local ): Usage, data= [ 0x01 ] 1
Pointer
Item(Main ): Collection, data= [ 0x00 ] 0
Physical
Item(Local ): Usage, data= [ 0x30 ] 48
Direction-X
Item(Local ): Usage, data= [ 0x31 ] 49
Direction-Y
Item(Local ): Usage, data= [ 0x32 ] 50
Direction-Z
Item(Local ): Usage, data= [ 0x33 ] 51
Rotate-X
Item(Local ): Usage, data= [ 0x34 ] 52
Rotate-Y
Item(Local ): Usage, data= [ 0x35 ] 53
Rotate-Z
Item(Local ): Usage, data= [ 0x36 ] 54
Slider
Item(Local ): Usage, data= [ 0x36 ] 54
Slider
Item(Global): Logical Minimum, data= [ 0x09 ] 9
Item(Global): Logical Maximum, data= [ 0x07 0x00 ] 7
Item(Global): Report Size, data= [ 0x04 ] 4
Item(Global): Report Count, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
Item(Global): Usage Page, data= [ 0x09 ] 9
Buttons
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
Button 1 (Primary)
Item(Local ): Usage Maximum, data= [ 0x20 ] 32
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x20 ] 32
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none

I have the following modules modprobed (beside all of the usb modules) - joydev,analog,and gameport

dmesg | grep input :
input: AT Translated Set 2 keyboard on isa0060/serio0
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1
drivers/usb/input/hid-core.c: v2.0:USB HID core driver

Thanks for everyone's help! I'm totally lost on this one.

makuyl 05-09-2005 02:04 PM

Try modprobing evdev as well. That's what I needed in addition to usbhid and joydev to get a logitech cordless rumblepad 2 working.

LostNLinux 05-09-2005 07:06 PM

Quote:

Originally posted by makuyl
Try modprobing evdev as well. That's what I needed in addition to usbhid and joydev to get a logitech cordless rumblepad 2 working.

I didn't think include evdev in my post because I didn't know it was important but it was already modprobed.

It looks like lsusb is showing the device as a gamepad and mentions axis'. I just wonder why it doesn't show up as js*.

Thanks

cs-cam 05-09-2005 11:56 PM

Sure it's not in /dev/input?

LostNLinux 05-10-2005 12:38 AM

Quote:

Originally posted by cs-cam
Sure it's not in /dev/input?
Yeah, I have done a cat on all js* in both /dev and /dev/input.

I found my keyboard at /dev/input/event0 and mouse at /dev/input/event1 but no gamepad.

I'm still thinking it has something to do with the error message from usbhid.

usbhid: probe of 1-1:1.0 failed with error -5.

But I may be wrong.

Thanks for everyone's help!

pyrael 05-27-2005 05:27 PM

Gemini GGE980 Recoil
 
I'm having a "similar" problem, I believe that the game pad is recognized, but I have searched the ENTIRE "Start Menu" <eh hem> for an app that will let me configure it.
'Hardware Browser' Recognizes it as :Jess Tech USB 4axis 12 button gamepad.

My system:
abit SG72 mobo
4 USB 1.1/2.0 and 2 USB 2.0 (dedicated)
Celeron 2.8 GHz
SB PCI512 Sound Card
AC97 5.1 integrated Audio
Integrated Video (I know, I know)
768 MB RAM PC3200(128 used for video.....so.....640)
80 GB Western Digital
Yank DVD Burner ATAPI
USB 2.0 52X24X52 CDRW
Fedora Core 2 running KDE (gnome installed)
All Development packages

Any Ideas?


All times are GMT -5. The time now is 01:30 PM.