# USB DDR mats not recognized

## Sarako

I got some nice Dance Dance Revolution mats for my birthday, but they aren't recognized as devices. I recompiled my kernel with Input core support, Joystick support, USB and HID support, and the primary UHCI driver.

The PyDance (http://icculus.org/pyddr) site gives instructions for getting the EMS USB II adapter (which is what I have) to work without devfs, but they also say "Unfortunately, some braindead distributions like Gentoo... enable devfs by default. If devfs is on, we will not help you set up your pad."

I tried the instructions for installing USB Joysticks at http://www.linux-usb.org/USB-guide/x194.html. However, trying to cat one of the nodes it has you make gives the message that they aren't devices.

I have successfully used the mats and adapter on Windows, so I know they work. What do I have to do in order to get Gentoo (kernel 2.4.20-r5) to recognize the mats?

----------

## NeddySeagoon

Sarako,

I expect that the brain dead drivers for your mats don't do register and unregister, as required by devfs. Its these functions that make nodes appear as required in /devfs.

All is not lost, you can make the nodes by hand and Gentoo should restore these hand made nodes acrross reboots.

You need to use mknod to create the nodes in /dev by hand. You will need to discover the major and minor device numbers for the mats.

From the website Quote:-

The current Linux joystick devices are /dev/input/js0, js1, and so on. Many copies of SDL will look for joysticks at /dev/jsX for compatibility with older Linux kernels. If you don't have those devices, run cd /dev && for I in input/js? ; do ln -s $I .; done .

end quoue.

So, it looks like the mats are fake joysticks. If you look in /usr/src/linux/Documents/devices.txt you will find the info you need to feed to mknod to permanently create the nodes you need.

This is the first step, there may be others. 

edit: I should have read all your references.

Did you make the symbolic links as the website quote says?

Regards,

NeddySeagoon

----------

## nephros

I have the following in /etc/devfs.d/joystick:

```
# Manage USB joystick

REGISTER        ^input/js0$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js0$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^input/js1$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js1$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^input/js2$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js2$   CFUNCTION GLOBAL unlink usbjoystick

```

this should/could automate what NeddySeagoon suggested.

----------

## Sarako

I created such a file and I'll try the mats out next time I reboot. However, I did try creating the nodes as described on the USB site I linked to, but that didn't work. Otherwise nothing shows up at all in /dev/input. If the joystick file will do it, then I should be good.

----------

## nephros

Jusr re-read your post:

 *Sarako wrote:*   

> [...] and the primary UHCI driver.
> 
> [...]instructions for getting the EMS USB II adapter (which is what I have) to work 

 

Hmm. does USB II mean it's a USB2.0 adapter? If so, you have to use ehci, not uhci.

If this is not the problem, do any other usb devices work?

----------

## Sarako

After creating the joystick file and rebooting, devfs was unable to mount my harddrives. I used the LiveCD to delete it. I have successfully used a USB mouse on this computer, but I'm just using a PS/2 mouse at the moment. The EMS adapter is not USB 2.0. The UHCI driver is the one both the sites I cited above said I should use. Only one sign of USB working at all is in /proc/bus/usb/001, where 003 or 005 appears, depending on which slot I plug the adapter into.

What is the missing link between USB recognizing something's plugged in and recognizing it as a joystick?

----------

## Sarako

Sum of my problem (because I'm impatient and want someone to magically come up with a solution):

I have two working Dance Dance Revolution mats and an EMS USB II adapter. I've compiled the following options into my kernel (gentoo, 2.4.20-r5):

Input core support

Joystick support

USB support

HID support

Primary UHCI driver

I then followed the directions for getting devfs for recognizing the USB joystick:

```
# cd /dev

# mknod input/js0 c 13 0

# mknod input/js1 c 13 1

# mknod input/js2 c 13 2

# mknod input/js3 c 13 3

# ln -s input/js0 js0

# ln -s input/js1 js1

# ln -s input/js2 js2

# ln -s input/js3 js3
```

Then I try to test it:

```
# cat js0

cat: js0: No such device
```

When I run PyDance, I get (not suprisingly):

```
0 joystick[s] found in total.

No DDR mats found. Not initializing joystick support.
```

What is going wrong here? What do I need to do in order to get Linux to recognize my DDR mats?

----------

## NeddySeagoon

Sarako,

Why did you choose "Primary UHCI driver"?

That may not suit your USB chip set.

What does usbview say about your root hubs?

Mine are OHCI rather than UHCI.

If you have a OHCI root hub rebuild you kerel with the other driver.

Does usbview see your  EMSUSB2 adaptor?

I don't think it will see the mats plugged into the adaptor because it looks like they are not usb devices.

Regards,

NeddySeagoon

----------

## Sarako

USBview says "USB UHCI-alt Root Hub." When I plug in the adapter, an "Unknown Device" shows up. Should I try the alternate UHCI driver again, or does this mean that it's already using it (for some reason)?

----------

## Sarako

I got my mats working with the help of someone else. It turns out I was doing everything right except one thing: I hadn't copied the kernel image into the boot partition. I also used this for /etc/devfs.d/joystick:

```
REGISTER        ^input/js0$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js0$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^input/js1$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js1$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^input/js2$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^input/js2$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^js0$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^js0$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^js1$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^js1$   CFUNCTION GLOBAL unlink usbjoystick

REGISTER        ^js2$   CFUNCTION GLOBAL mksymlink $devname usbjoystick

UNREGISTER      ^js2$   CFUNCTION GLOBAL unlink usbjoystick
```

I also recompiled my kernel with usb-uhci and joydev as modules, but I doubt that had anything to do with it. Thanks for all your help!

----------

## metnik

Hi I did everything wrote here but everytime I create a /etc/devfs.d/joystick file with anything inside(I tried both suggestions), the system doesn't boot...

this is my dmesg:

 *Quote:*   

> 
> 
> usb.c: registered new driver hid
> 
> hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
> ...

 

and when I plug it in...

 *Quote:*   

> 
> 
> usbdevfs: USBDEVFS_CONTROL failed dev 2 rqt 128 rq 6 len 18 ret -110
> 
> usbdevfs: USBDEVFS_CONTROL failed dev 2 rqt 128 rq 6 len 18 ret -110
> ...

 

I've "input core" compiled into the kernel and joydev and hid as modules

----------

