<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Only Dreaming &#187; Support</title>
	<atom:link href="http://onlydreaming.net/tag/support/feed" rel="self" type="application/rss+xml" />
	<link>http://onlydreaming.net</link>
	<description></description>
	<lastBuildDate>Thu, 09 Feb 2012 23:39:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HOWTO: Use an XBox 360 Dance Mat on Ubuntu Karmic</title>
		<link>http://onlydreaming.net/guides/using-an-xbox-360-dance-mat-on-ubuntu-karmic</link>
		<comments>http://onlydreaming.net/guides/using-an-xbox-360-dance-mat-on-ubuntu-karmic#comments</comments>
		<pubDate>Wed, 03 Mar 2010 11:36:14 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Console Hackery]]></category>
		<category><![CDATA[Dance Mat]]></category>
		<category><![CDATA[Dancing Stage]]></category>
		<category><![CDATA[DDR]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Drivers]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Help]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Joystick]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[Xbox 360]]></category>
		<guid isPermaLink="false">http://www.onlydreaming.net/?p=2780</guid>
		<description><![CDATA[Normal XBox 360 wired controllers are supported out of the box on Ubuntu Karmic (9.10). However, it seems that dance mats such as the one that comes bundled with Dancing Stage Universe behave a little differently. Here’s how I got &#8230; <a href="http://onlydreaming.net/guides/using-an-xbox-360-dance-mat-on-ubuntu-karmic">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Normal XBox 360 wired controllers are supported out of the box on Ubuntu Karmic (9.10).  However, it seems that dance mats such as the one that comes bundled with Dancing Stage Universe behave a little differently.  Here’s how I got mine to work.</p>
<div id="notes">
<p>This HOWTO is in the public domain.  You are free to re-post it wherever and however you like, though a link back <a href="http://www.onlydreaming.net/blog/using-an-xbox-360-dance-mat-on-ubuntu-karmic">here</a> would be appreciated.</p>
</div>
<p>Be warned, this is not for the faint of heart — we will be spending most of our time in a terminal window, and we’ll be compiling drivers ourselves.  Read the instructions carefully, and follow what I did line by line.  If you have problems, leave a comment and I’ll see if I can help you out.  <i>Running commands as the root user is potentially dangerous; I am not responsible if your computer is damaged by incorrectly following these instructions.</i></p>
<p>First of all, check that you have the same device as I do.  If not, proceed only with caution!  To find out, plug your dance mat into a USB port, open up a terminal window and run</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lsusb</pre></div></div>
<p>You should see a line which looks like:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Bus 002 Device 002: ID 12ab:0004 Honey Bee Electronic International Ltd.</pre></div></div>
<p>Your ‘Bus’ and ‘Device’ numbers will probably be different, but the rest of the line should be the same.</p>
<p>The <code>xpad</code> driver, which is already baked into the kernel, does not work for these dance mats.  We will have to instead install <a href="http://pingus.seul.org/~grumbel/xboxdrv/">xboxdrv</a>, which does support dance mats.</p>
<p>The first thing we need to do is download the source code for xboxdrv.  Their website provides downloads of various versions (at time of writing, the latest was <a href="http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv-linux-0.4.10.tar.bz2">0.4.10</a>), but I chose to grab the very latest code from their <code>git</code> repository.  To do that, first install <code>git</code> if you don’t already have it:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> git-core</pre></div></div>
<p>Then find a space to download <code>xboxdrv</code> to — I just chose my home directory, which should be the location you’re at when you first run the terminal anyway.  Download their latest source using git, then go into the downloaded directory:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>Grumbel<span style="color: #000000; font-weight: bold;">/</span>xboxdrv.git
<span style="color: #7a0874; font-weight: bold;">cd</span> xboxdrv</pre></div></div>
<p>Now you’ll need to compile the driver from the source code you’ve just downloaded.  These following instructions are largely from the <code>README</code> file included with <code>xboxdrv</code>.  You’ll need a bunch of things installed so that you can compile the code.  To make sure you have everything, run:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">g++</span> libboost1.40-dev libboost-thread1.40-dev scons libusb-dev libx11-dev x11proto-core-dev python-dbus</pre></div></div>
<p>Now compile by simply running:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">scons</pre></div></div>
<p>Make a cup of tea, this will take a few minutes.</p>
<p>Assuming you don’t see any errors, you now have a driver that will support the dance mat.  However, this is a ‘user-space’ driver, which means we don’t actually bake it into the kernel — instead, we need to make sure that the kernel supports user-space input drivers, then we run <code>xboxdrv</code> as if it were a normal application.</p>
<p>First of all, though, we should check it’s actually working.  To start with, we’ll remove the <code>xpad</code> driver from the kernel, and add the user-space driver support.  <em>Note that if you have any other joysticks, removing xpad could stop them working.  I’m not sure if there’s any way around this at the moment.</em>  Run the following commands:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> rmmod xpad
<span style="color: #c20cb9; font-weight: bold;">sudo</span> modprobe uinput
<span style="color: #c20cb9; font-weight: bold;">sudo</span> modprobe joydev</pre></div></div>
<p>Now we can run <code>xboxdrv</code> and check it’s working.  Type:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>xboxdrv</pre></div></div>
<p>You should see something like the following:</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">xboxdrv 0.4.8
Copyright (C) 2008 Ingo Ruhnke &lt;grumbel@gmx.de&gt;
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
&nbsp;
USB Device:        002:002
Controller:        &quot;DDR Universe 2 Mat&quot; (idVendor: 0x12ab, idProduct: 0x0004)
Controller Type:   Xbox360
Deadzone:          0
Trigger Deadzone:  0
Rumble Debug:      off
Rumble Speed:      left: -1 right: -1
LED Status:        auto
Square Axis:       no
ButtonMap:         none
AxisMap:           none
RelativeAxisMap:   none
AutoFireMap:       none
RumbleGain:        255
ForceFeedback:     disabled
&nbsp;
Starting with uinput... Error: /dev/input/uinput: No such file or directory
done
&nbsp;
Your Xbox/Xbox360 controller should now be available as:
  /dev/input/js0
  /dev/input/event7
&nbsp;
Press Ctrl-c to quit
&nbsp;
X1:     0 Y1:     0  X2:     0 Y2:     0  du:0 dd:0 dl:0 dr:0  back:0 guide:0 start:0
TL:0 TR:0  A:0 B:0 X:0 Y:0  LB:0 RB:0  LT:  0 RT:  0</pre></div></div>
<p>(You can ignore the “<code>Error: /dev/input/uinput: No such file or directory</code>” line if it appears on your screen, it doesn’t seem to affect <code>xboxdrv</code> at all.)</p>
<p>Press some of the pads on your dance mat.  You should see extra lines appearing at the end indicating the buttons that have been pressed.  The arrows on the mat match up to D-pad directions, so for example if you press Down, you should see <code>dd:1</code> on the line that appears.</p>
<p>Once you’re satisfied that it’s working, hit Ctrl+C to quit.</p>
<p>Before we’re finished, we need to make those changes to the kernel modules permanent.  To do this, run:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-i</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;blacklist xpad&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>modprobe.d<span style="color: #000000; font-weight: bold;">/</span>blacklist.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;uinput&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;joydev&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>
<p>You can now reboot if you want to, and all your kernel module changes will stick.</p>
<p>There’s one more step.  At the moment before using your dance mat, you’ll still have to run <code>xboxdrv</code> manually.  We can fix this with an ‘init script’ that will run <code>xboxdrv</code> automatically on startup.</p>
<p>First, let’s put <code>xboxdrv</code> somewhere sensible on your filesystem, rather than in your home directory:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xboxdrv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> xboxdrv <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xboxdrv<span style="color: #000000; font-weight: bold;">/</span>xboxdrv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> tools<span style="color: #000000; font-weight: bold;">/</span>xboxdrv-daemon.py <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xboxdrv<span style="color: #000000; font-weight: bold;">/</span>xboxdrv-daemon.py</pre></div></div>
<p>Now we’ll set up the init script.  The script itself is a few dozen lines, so rather than pasting it here, here’s a download link instead: <a href="http://www.onlydreaming.net/files/xboxdrv">xboxdrv init script</a>.  Download this, then copy it to <code>/etc/init.d</code>.  That requires root access, so from your terminal, run the following to download the above file and put it in the right place:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.onlydreaming.net<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>xboxdrv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> xboxdrv <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xboxdrv</pre></div></div>
<p>Now we have to make sure that’s executable and that it runs on startup:</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xboxdrv
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-rc.d xboxdrv start <span style="color: #000000;">51</span> S .</pre></div></div>
<p>(don’t forget the dot on the end!)</p>
<p>Aaaand at long last, you should be done.  Reboot, and your dance mat should work properly with no extra configuration.  If you’re using StepMania, remember to map the mat’s controls before playing.  If you’ve not drunk that cup of tea yet, it’s probably cold!</p>
<p><em>If you’re looking for a similar guide for OpenSuSE, I’ve just discovered <a href="http://forums.opensuse.org/hardware/415316-my-xbox-360-controller-controls-mouse.html#post1992693">this post</a> which is similar to the post you’re reading, but with OpenSuSE-specific init script instructions.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydreaming.net/guides/using-an-xbox-360-dance-mat-on-ubuntu-karmic/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

