![]() |
HowTo.AddAJoystick HistoryHide minor edits - Show changes to markup March 27, 2009, at 11:59 AM
by -- Added the much easier way - using Debian.
Changed lines 1-2 from:
Adding a joystick to an unslung slugto:
Adding a joystick to the slugUpdate See the end for a much easier way of doing it! Added lines 49-54:
Second update - the easy way I eventually moved everything to Debian lenny, and simply asked for the appropriate joystick modules to be added to the kernel image package for the slug. The developers were extremely helpful - I was sent a kernel with them included and they're being added to the main package on the next release. So the very simple answer to using joysticks is - use Debian! The other info is left on this page for people who have good reasons for using Unslung or SlugOS. March 06, 2009, at 05:33 PM
by -- Correct minor error
Changed lines 45-46 from:
I've now moved the slug onto OpenSlug, but a similar approach works fine (the build system for OpenSlug is different, but IIRC it's still simply a matter of recompiling with to:
I've now moved the slug onto OpenSlug, but a similar approach works fine (the build system for OpenSlug is different, but IIRC it's still simply a matter of recompiling with March 06, 2009, at 05:32 PM
by -- Update on progress with OpenSlug and joystick-using software
Changed lines 42-45 from:
I'm going to go on to look at getting to:
I'm going to go on to look at getting Update
I've now moved the slug onto OpenSlug, but a similar approach works fine (the build system for OpenSlug is different, but IIRC it's still simply a matter of recompiling with April 06, 2008, at 08:40 PM
by -- Formatting tweaks
Changed lines 13-14 from:
to:
cd ~/slug and make unslung-image
Changed lines 19-20 from:
to:
ipkg install /public/kernel-module-joydev_2.4.22.l2.3r63-r21_nslu2be.ipk
Changed lines 23-24 from:
to:
ipkg install kernel-module-input kernel-module-hid
Changed lines 27-29 from:
to:
mkdir /dev/input
mknod /dev/input/js0 c 13 0
Changed lines 32-35 from:
to:
insmod input
insmod hid
insmod joydev
Changed lines 38-39 from:
to:
cat /dev/input/js0
April 06, 2008, at 08:38 PM
by -- Basic (and incomplete) instructions on enabling joystick support. New page.
Added lines 1-42:
Adding a joystick to an unslung slugJoypads and joysticks can be cheap and interesting controllers for various forms of special project - joypads can be seen as a bank of switches with a convenient interface attached and a straightforward API to use them. The default unslung image does not come with the necessary kernel modules installed for joystick use, and one of them (joydev) doesn't seem to be available from the optware feed. I have spent some time trying to get a joystick working and this howto is offered to help others in the right direction. It is almost certainly an inefficient method - I don't yet understand how evrything works! You have been warned... First, set up a cross-development toolchain on another computer, using the instructions at Development.Homepage. Make the unslung image, to make sure there are no problems with your setup. On your development box, Edit openembedded/packages/linux/unslung-kernel/defconfig. Find the line that reads
At this point I reflashed the slug with the new firmware image (in ~/slug/unslung/tmp/deploy/images/unslung-nslu2be-6.11-beta-nslu2.bin) and re-unslung the disk, but this causes a lot of aggravation, and I suspect the next stage will probably work without it as the kernel version is the same in the release firmware of unslung and the image you have just built. Manually upload the new kernel-module-joydev package from ~/slug/unslung/tmp/deploy/ipkg/nslu2be/kernel-module-joydev_2.4.22.l2.3r63-r21_nslu2be.ipk to the slug, and then install it:
And then install the other two necessary kernel modules from the feed:
The joystick driver won't work be very useful until you create the /dev/input/js0 node on the slug:
Then, you need to load the kernel modules before plugging in your USB joystick. It should be possible to arrange for this to happen automatically on boot, but I haven't had time to work out how yet:
Plug in a joystick into one of the USB ports. Without client software, it's not particularly useful, but you can check it is working by watching the datastream:
If you get garbage printed to your terminal when you press the buttons on the stick, you know that the driver is working! I'm going to go on to look at getting Page last modified on March 27, 2009, at 11:59 AM
|