Howto: DDR dance pads in Linux (Super Dual Box)

31 Jan 2006  in the late evening  Matt Winckler

This evening I finally got my DDR dance pads working in Linux - hurrah! It was not nearly as easy as it should have been, but surprisingly, all the difficulty was simply finding out what needed to be done. In the interests of helping others, here’s what I had to do to get things going.

Hardware
PS2->USB converter: Wisegroup, Ltd MP-8866 Dual USB Joypad. A.k.a.: Super Dual Box (as seen here (I have the BNSUSA one).
Dance pads: Generic soft mats (also from BNS).

Operating System
Gentoo Linux, kernel 2.6.12-gentoo-r6

1. Install required kernel modules.
The following kernel settings are required to get the USB converter working (assuming 2.6 series kernel):

Device Drivers -->
 Input Device Support -->
  <*> Joystick Interface
  <*> Event Interface
   [*] Joysticks
 USB Support -->
  <*> Support for Host-side USB
   [*] USB device filesystem
  <*> EHCI HCD (USB 2.0) support
  <*> OHCI HCD support
  <*> UHCI HCD (most Intel and VIA) support
  <*> USB Human Interface Device (full HID) support
   [*] HID input layer support

Note that among EHCI, OHCI, and UHCI, you only need whichever chipset your motherboard supports. Once the necessary options are enabled, compile and install your new kernel.

2. Working?
Apparently on some setups, everything now works at this point and you’re done. However, this was not the case for me. In my instance, dmesg showed the dance pads being properly recognized, lsusb also showed the correct information, and all the proper nodes were being created in /dev/input, but all input from the dance pads was being ignored. cat /dev/input/js0 showed the initial garbage right after the dance pads were connected, but no further input when I stepped on them.

3. Hacking hotplug.functions
After some Googling, I found this very helpful message from Andrew Fuller indicating that he had to hack his /etc/hotplug/hotplug.functions file to get his Super Dual Box to work properly. As he indicated, “In the file /etc/hotplug/hotplug.functions, around line 85 you should have this:”

# should we use usbmodules, pcimodules?  not on 2.5+, because sysfs
# ought to expose the data we need to find all candidate drivers.
# (on 2.5.48 it does for usb; but maybe not yet for pci.)
case "$KERNEL" in
2.2*|2.3*|2.4*)     LISTER=`which ${TYPE}modules` ;;
*)                  LISTER="" ;;
esac

“Change the 2nd to last line to the following:”

*)                  LISTER=`type -p ${TYPE}modules` ;;

This did the trick for me. After activating the dance pad code (hold down SELECT, START, and the up arrow simultaneously for ~3 seconds - this tells the converter to map arrows to buttons instead of axes, so that more than one can be depressed at the same time), they worked perfectly in Stepmania.

However, as Andrew pointed out later on in his message, this really is a hack. I don’t know what else the change may have broken on my system, if it broke anything. Surely a better solution must exist (though no one on the linux-usb-users or linux-hotplug-devel mailing lists had any suggestions in response to Andrew), but until it becomes evident to me, the hack gets things working.

Additional resources

9 vociferations follow:

  1. 1 week after the fact, ozzee responded:

    hey, can i configure it in windows? how is it?
    i can’t use the PS dancepad on it! i’ve the hardware, but the devices is not functioning.
    thx for ur help, pls e-mail me : de_sleeperz@yahoo.com

    regards, ozzee

  2. * * * * *
    1 week after the fact, Matt Winckler responded:

    I wouldn’t know; I don’t run Windows. The only time I’ve had to use it in Windows XP, all I had to do was plug it in and put in the dancepad code (step on Start + Select + Up arrow simultaneously for 3 seconds). The Stepmania compatibility list I linked to suggested possible conflicts between this converter and some brands of dance pads.

  3. * * * * *
    2 weeks, 2 days after the fact, Tim responded:

    I’m having a hard time getting this going. I’m running FC4, and the first super dual box I had worked fine, then crapped out after 2 weeks. Then I got a different adaptor that wouldn’t work with dance pads. Now I have a NEW super dual box that won’t work. I plug it in and it’s recognized, but if you cat /dev/js0 there’s nothing. I tried the hack above, now my /etc/hotplug/hotplug.functions reads:

    # should we use usbmodules, pcimodules?  not on 2.5+, because sysfs
    # ought to expose the data we need to find all candidate drivers.
    # (on 2.5.48 it does for usb; but maybe not yet for pci.)
    LISTER='type -p ${TYPE}modules' ;;
    

    And I still get nothing. Originally all that was here was LISTER=”" on the default FC4 install. This is driving me crazy because I had it working a few weeks ago with no hacking at all and now it won’t work. The converter does work under windoze. Any suggestions?

  4. * * * * *
    2 weeks, 3 days after the fact, Tim responded:

    The problem was that Fedora uses a slightly different /etc/hotplug/hotplug.functions so it didn’t work for me. Andrew Fuller was nice enough to give me a few suggestions. First you need to install an old version of usbutils (0.11) which you can download here. Don’t use yum because the latest version won’t work. Run lsusb to find where the adapter is plugged in (for example 003-018), then manually run usbmodules –device /proc/bus/usb/003/018 (replace
    003/018 with what you got from the lsusb command). Then cat /dev/js0 to see if you’re getting output when you press buttons. It worked for me.

  5. * * * * *
    2 weeks, 3 days after the fact, Matt Winckler responded:

    Excellent! Thanks for posting your results. I was actually in the process of replying to your original post when you replied, and I’m glad you found an answer…my suggestions weren’t even close. :-)

  6. * * * * *
    1 month after the fact, heykal abdillah responded:

    I need help also i’am newbie for linux, using SuSE 10 kernel 2.6. And there no file ‘hotplug.function’ in may /etc/hotplug. I try the FC4 method but my system say there is no ‘usbmodules’ command.
    The usb is detected fine, just like above problem when i cat /dev/input/js0 it showed garbage. Can u help me?

  7. * * * * *
    9 months, 2 weeks after the fact, Steve Hicks responded:

    I don’t know if anyone’s had side effects from this hack, but I’ve extended it to hopefully reduce the chance anything unforeseeable. I replaced the LISTER="" line with:


    *) if [[ $DESCRIPTION =~ '925/8866' ]]; then
    LISTER=`type -p ${TYPE}modules`
    else
    LISTER=”"
    fi ;;

    Where I’ve taken 925/8866 from the product id and vendor id of the device, respectively, dropping leading zeros (I discovered this by mesg’ing ${DESCRIPTION}). Now this code should only get invoked on this device, and will behave normally for any others.

    Edit: Fixed markup to show backticks. -Matt

  8. * * * * *
    9 months, 2 weeks after the fact, Matt Winckler responded:

    Thanks for the tip, Steve! That is definitely a better way of doing things, if hotplug.functions must be hacked at all.

  9. * * * * *
    1 year, 11 months after the fact, Eivind responded:

    How would I go about to make this work with udev? Or isn’t it nescessary?

React

This comment form is Markdown-enabled, in addition to allowing the following XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .