This document is intended to help the user set up and use ACCES USB devices in Linux. This document describes only configuring Linux to recognize connected devices and upload firmware to the devices. For information on using the AIOUSB software module, refer to Installing And Using AIOUSB Library.
In order to upload the firmware you must have the fxload package installed on your system. To test if you have fxload installed on your system simply type fxload -V on the command line. If fxload is installed on your system you will see version information displayed on your screen. If fxload is not installed on your system you can find more information at http://linux-hotplug.sourceforge.net/ or check the package manager for your Linux distribution.
There are two methods for uploading the firmware to an ACCES USB device. The first involves manually uploading the firmware every time the device is plugged into the computer. When the device is plugged in you need to run the accesloader.pl script with root privileges. This will result in something similar to the following:
This script will upload the appropriate firmware to any ACCES USB devices that are found on the system. If firmware is uploaded to any devices, then the script will pause for five seconds before attempting to make all ACCES USB devices on the system usable by users other than root. This script must be run with root privileges. fxload -t fx2 -D /dev/bus/usb/008/006 -I /usr/share/usb/USB-AI16-16.hex chmod 0666 /dev/bus/usb/008/007
In the above example a model USB-AI16-16A device was detected, the appropriate firmware was uploaded to it and it was made readable and writable by all users. It is unlikely that this manual method would be used for anything other than simple testing purposes.
The second, preferred method involves setting up your system to automatically upload the firmware anytime an ACCES USB device is attached to the system. This method takes only a few minutes to set up and also requires root access to the system.
mkdir /usr/share/usb
cp -p *.hex /usr/share/usb/
A directory listing of /usr/share/usb/ should be similar to this:
Cmd> l /usr/share/usb/ total 216 drwxr-xr-x 2 root root 4096 2009-09-03 15:55 ./ drwxr-xr-x 458 root root 20480 2009-08-24 12:02 ../ -rw-r--r-- 1 root root 4026 2008-12-02 21:13 a3load.hex -rw-r--r-- 1 root root 10657 2009-06-16 13:00 PICO-DIO16RO8.hex -rw-r--r-- 1 root root 18742 2009-09-22 14:54 USB-AI16-16.hex -rw-r--r-- 1 root root 13683 2009-07-22 12:25 USB-CTR-15.hex -rw-r--r-- 1 root root 4383 2009-04-28 09:41 USB-DA12-8A.hex -rw-r--r-- 1 root root 4285 2008-12-02 15:19 USB-DA12-8E.hex -rw-r--r-- 1 root root 16972 2009-05-14 11:16 USB-DIO-16A.hex -rw-r--r-- 1 root root 12315 2008-04-21 10:24 USB-DIO-32.hex -rw-r--r-- 1 root root 10867 2009-05-06 11:50 USB-DIO-48.hex -rw-r--r-- 1 root root 11151 2009-02-25 16:37 USB-DIO-96.hex -rw-r--r-- 1 root root 12967 2009-05-21 11:38 USB-IDIO-16.hex -rw-r--r-- 1 root root 11694 2008-03-17 12:51 USB-IIRO-16.hex -rw-r--r-- 1 root root 11139 2006-04-25 11:10 USB-IIRO4-2SM.hex -rw-r--r-- 1 root root 11139 2006-04-25 11:10 USB-IIRO4-COM.hex -rw-r--r-- 1 root root 10657 2009-06-16 13:04 USBP-DIO16RO8.hex
File a3load.hex pertains to the fxload package and should be left alone.
cp -p 10-acces_usb.rules /etc/udev/rules.d/
A directory listing of /etc/udev/rules.d/ should be similar to this:
Cmd> l /etc/udev/rules.d/
total 284
drwxr-xr-x 2 root root 4096 2009-09-11 12:31 ./
drwxr-xr-x 3 root root 4096 2008-12-03 20:55 ../
-r--r--r-- 1 root root 21884 2009-09-01 15:26 10-acces_usb.rules
-rw-r--r-- 1 root root 357 2008-12-02 22:19 40-alsa.rules
-rw-r--r-- 1 root root 2360 2008-12-02 23:53 40-bluetooth.rules
-rw-r--r-- 1 root root 2141 2008-12-02 23:51 40-lomoco.rules
-rw-r--r-- 1 root root 750 2008-12-03 04:16 40-xen.rules
-rw-r--r-- 1 root root 99 2008-12-02 22:33 41-soundfont.rules
...
Once these two simple steps are completed, plugging an ACCES USB device into the system should result in its firmware being automatically uploaded and the device being made available for use.
For both manual and automatic firmware initialization, the .hex files must be copied to /usr/share/usb/.
For automatic firmware initialization, the 10-acces_usb.rules file must be copied to /etc/udev/rules.d/.
For manual firmware initialization, the accesloader.pl file may be copied anywhere, preferably somewhere that’s accessible in the execution path.
The following standard Linux utilities are also required: /bin/sh, /sbin/fxload, /bin/chmod, /bin/sleep. The Perl interpreter (/usr/bin/perl) is also required if accesloader.pl is going to be used.