4

I'm trying to get a cheap usb gamepad to work under Ubuntu 12.04 running on my arm chromebook (using chroot). After plugging in the gamepad, dmesg shows:

[ 5879.411510] usb 2-1: new low-speed USB device number 8 using exynos-ohci
[ 5879.610530] usb 2-1: New USB device found, idVendor=0079, idProduct=0011
[ 5879.610560] usb 2-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 5879.610584] usb 2-1: Product: USB Gamepad

Output of lsusb is:

Bus 001 Device 003: ID 0424:3503 Standard Microsystems Corp.
Bus 002 Device 008: ID 0079:0011 DragonRise Inc. Gamepad
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2232:1037

I don't have /dev/input/ls0 ls -l /dev/input:

drwxr-xr-x 2 root root    120 May 31 17:24 by-path
crw-rw---- 1 root  222 13, 64 May 31 17:24 event0
crw-rw---- 1 root  222 13, 65 May 31 17:24 event1
crw-rw---- 1 root  222 13, 66 May 31 17:24 event2
crw-rw---- 1 root  222 13, 67 May 31 17:24 event3
crw-rw---- 1 root  222 13, 68 May 31 17:24 event4
crw-rw---- 1 root  222 13, 69 May 31 17:24 event5

Any ideas?

Edit: In case it helps here's what I see in usb-devices:

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0079 ProdID=0011 Rev=01.06
S:  Product=USB Gamepad 
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

Edit2: Here's the output of lsusb -v (the section for the gamepad)

Bus 002 Device 002: ID 0079:0011 DragonRise Inc. Gamepad
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0079 DragonRise Inc.
  idProduct          0x0011 Gamepad
  bcdDevice            1.06
  iManufacturer           0 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     101
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10

2 Answers 2

3

DragonRise gamepads use the hid_dr module, which can be loaded with modprobe hid_dr. If the module is not available, you have to compile it by enabling the HID_DRAGONRISE kernel option (in menuconfig, you can find it at Device Drivers -> HID support -> HID bus support -> Special HID drivers -> DragonRise Inc. game controller).

With the module loaded, the device will be properly recognized and /dev/input/js0 will be created.

[19229.563797] usb 3-3: new low-speed USB device number 11 using xhci_hcd
[19229.706682] usb 3-3: New USB device found, idVendor=0079, idProduct=0011
[19229.706688] usb 3-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[19229.706692] usb 3-3: Product: USB Gamepad 
[19229.706915] usb 3-3: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[19229.710302] input: USB Gamepad  as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:0079:0011.000C/input/input13
[19229.710638] dragonrise 0003:0079:0011.000C: input,hidraw0: USB HID v1.10 Joystick [USB Gamepad ] on usb-0000:00:14.0-3/input0
1

Other then the missing js0 it looks good. Try modprobe joydev and see if that gives you a /dev/input/js0. If that fails install evtest and then do:

evtest /dev/input/event1
evtest /dev/input/event2
evtest /dev/input/event3
...

till you have found your gamepad. Post info that evtest prints on startup, as when something fails with detecting it as joystick, there is probably something wrong with the button names.

5
  • Thanks for the suggestion grumbel but I still can't get it to work :( I was having trouble running modprobe joydev but it seems to be working now, when I type the command it doesn't give errors or anything I just get returned to the prompt so I assume that it's working. After running that command I still do not see js0 under /dev/input so I did some reading and it was suggested to run MAKEDEV js and this did create a bunch of js but still does not work. Any other suggestions? TIA!
    – user163542
    Jun 7, 2013 at 4:31
  • BTW I ran evtest /dev/input/event0-5 and on each one tried pressing the buttons on the gamepad and still nothing.
    – user163542
    Jun 7, 2013 at 4:35
  • See Edit 2 above for detailed output from lsusb -v
    – user163542
    Jun 7, 2013 at 4:46
  • Check the output of dmesg after you plugged in the gamepad, it should give you some hint what the kernel is doing with it. As for evtest, check the name of the device that is printed at the top of the evtest output, that should tell you which is your gamepad, show what evtest prints. Or if that doesn't work, unplug the gamepad and plug it back in, whichever /dev/input/eventX file disappears and reappears is your gamepad.
    – Grumbel
    Jun 7, 2013 at 19:09
  • dmesg just logs the usb device being plugged in and removed, not too much detail. /dev/input/eventX files don't change when it is connected/removed - always the same eventX there. I've given up and purchased a different usb gamepad (this one amazon.com/gp/aw/d/B0034ZOAO0) and this one works PERFECTLY :) As soon as I plug it in js0 shows up under /dev/input and tonnes of useful info appears in dmesg and the gamepad is recognized across the os and within all my games.. so I'll just give the other gamepad to my brother, it only cost me 5 bucks anyway :)
    – user163542
    Jun 9, 2013 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .