v1.5 - 06/07/2010 - Clarified a few details
v1.4 - 15/01/2008 - adutux is now in the kernel source.
v1.3 - 07/08/2006 - Updated adutux version and patch. Major rewrite.
v1.2 - 25/11/2005 - Minor corrections and clarifications.
v1.1 - 23/11/2005 - Minor revisions with suggestions by John
v1.0 - 22/11/2005 - Initial writing
This document is copyright Steven Haigh. It may be distributed without restrictions, as long as this document remains in tact. You can link to it from anywhere without any problems. Basically, if you play fair, I'll be happy.
This document describes how to add the adutux kernel module to interface with OnTrak's ADU series of interfaces on older linux kernels. I did some work with John and the USB maintainers for the linux Kernel and now as of 2.6.19, the ADUTUX module is included in the source tarball from ftp.kernel.org. This makes most of this information obsolete - however it is kept here for historical reference and in case it ends up helping anyone else. The ADU series are digital I/O and relay controllers based in a tidy USB box. This document will focus on the ADU-218 however these instructions should work for all current ADUs. The adutux module was adapted from the Lego Tower module by John Homppi, and was submitted to the linux-usb maintainers for inclusion in the kernel. This was rejected because the generic USB-HID should work - however (the big however!), the usb-hid module expects all devices to have a bulk-out endpoint - which the ADU series do not have. This means that the ADU series of equipment gets blacklisted and will not work (no matter what you do). Enter the adutux kernel module.
Kernel source code. I used 220.127.116.11 from kernel.org
Building the module
For this document, I used kernel version 18.104.22.168. You may well use a different version. Make the appropriate substitutions as required.
Download the kernel source code into /usr/src.
Unpack the kernel source.
$ tar -jxf linux-22.214.171.124.tar.bz2
Extract the patch file into your new kernel source directory.
$ bunzip adutux-0.0.13.patch.bz2
patch the kernel.
$ patch -p0 < adutux-0.0.13.patch
Change back to the linux directory
$ cd /usr/src/linux-126.96.36.199
Start the interactive kernel configuration interface
$ make menuconfig
Change into \"Device Drivers --> USB support -->\" then press M on \"ADU devices from Ontrak Control Systems (EXPERIMENTAL)\"
It is up to you at this point if you want to customise the kernel to
more suit your hardware. After making these changes, exit the menuconfig
utility and start the kernel compile. This will take a while.
If this finishes without and errors, continue to install the modules,
then the kernel.
It is good practice to do all of the above as a normal user, and only switch to root (or use sudo) to do the next two steps. This isn't a tutorial on good admin practices, but plenty exist on google :)
$ make modules_install $ make install
Reboot into your new kernel. We now want to make the devices to go in /dev for the driver to use. If you are using Fedora Core 4 (or any other distro that uses udev instead of the traditional /dev structure), then you will need to make these files in /etc/udev/devices/usb, otherwise create them in /dev. If you don't know what dev system your distro uses, if you create them in /dev, and the disappear after a reboot, you will need to make them in /etc/udev/devices/usb. We also want to make sure the permissions are correct.
$ cd /etc/udev/devices/usb (or /dev) $ mknod adutux0 c 180 179 $ mknod adutux1 c 180 180 $ mknod adutux2 c 180 181 $ mknod adutux3 c 180 182 $ mknod adutux4 c 180 183 $ mknod adutux5 c 180 184 $ mknod adutux6 c 180 185 $ mknod adutux7 c 180 186 $ mknod adutux8 c 180 187 $ mknod adutux9 c 180 188 $ chmod 666 adutux*
Plug in your ADU device, and insert the new module
$ modprobe adutux
Look in dmesg, and you should see your device as being detected.
$ dmesg ...... drivers/usb/misc/adutux.c: ADU218 E02116 now attached to /dev/usb/adutux0 usbcore: registered new driver adutux drivers/usb/misc/adutux.c: adutux driver - ADUxxx (see www.ontrak.net) v0.0.8 drivers/usb/misc/adutux.c: adutux is an experimental driver. Use at your own risk
You should now be ready to try Johns sample application to test your installation. There is also an application that John wrote, called adu (which I think is much better than the older aducmd) but I haven't seen it up on his site, so I've put it here. The command reference for the ADU218 can be found here.