iTU4l
Connecting AT91xx based GPS-Loggers to USB on Linux
The XAiOX iTrackU and Gisteq PhotoTrackr GPS loggers have an Atmel
AT91xx ARM achitecture microcontroler with USB support. It is supported
by the Linux usbserial
driver.
If you own an Asus Eee-PC, please read this: http://wiki.eeeuser.com/howto:usbserial
To get it running on
older systems you have to do two steps (you have to be root to do all
this):
1. Activate the AT91xx support
As already said above the USB interface is supported by the Linux
kernel module usbserial.
But this part of the driver it is not activated by default. To activate
it you have to add options to the kernel module. The vendor ID for
Atmel seems to be always 0x3EB. The product ID depends on your device
type. Plug the device in and find out the device ID:
lsusb | fgrep Atmel
The device ID for known devices is:
6125 for XAiOX
iTrackU
6125 for Gisteq
PhotoTrackr
6126 for Gisteq PhotoTrackr Lite
Please report new device IDs. See also Chapter "Troubleshooting" below.
So you have to tell the usbserial driver these device IDs. There are
two different ways depending the usbserial driver is a module or is
staticly linked into your kernel. As far as I know, most Linux
distributions have usbserial.ko as a
module.
Note for Ubuntu 9.04 (Jaunty Jackalope):
Only the early releases used a
staticly linked driver (see here and here), but this was changed back to a module using the usual updates (sudo apt-get upgrade;sudo apt-get upgrade).
1.1 If you have usbserial as module, add the following line
options usbserial
vendor=0x03EB product=0x6125
# for XAiOX iTrackU and Gisteq PhotoTrackr
or
options usbserial vendor=0x03EB product=0x6126 # for Gisteq
PhotoTrackr Lite
using a text editor to the end of the file /etc/modprobe.d/options
for Debian or Ubuntu pre 9.04 systems. For Ubuntu 9.04 Jaunty Jackalope (and later Ubuntu versions ?) simply as root copy atmel-usb.conf to /etc/modprobe.d/.
On other distributions this file
could not exist. Then try /etc/modules.conf
instead or find it out from the manual man modprobe.
Then type
depmod -a
update-modules
to tell the system, that someting changed with the kernel module
configuration.
1.2 If you have usbserial linked to your kernel, add the following line
usbserial.vendor=0x03EB usbserial.product=0x6125
# for XAiOX iTrackU and Gisteq PhotoTrackr
or
usbserial.vendor=0x03EB usbserial.product=0x6126 # for Gisteq
PhotoTrackr Lite
and reboot.
2. Load the driver (only if you have usbserial as a module)
The driver can loaded in two ways
- always on system start by adding a line
usbserial
to the file /etc/modules
using a text editor. The module will be loaded then always on system
start using the options you added as described above. This should work
on all current Linux distributions.
***
or ***
- triggered by the plug USB cable in event using the
udev
framework (at least for current Debian and Ubuntu distributions). To do
this you simply have to copy this 66-atmel-usb.rules
to your /etc/udev/rules.d
folder.
If the usbserial
module is
already loaded (because of a connected RS232-USB adapter cable or a USB
connected mobile phone) the module has to reloaded to use the changes
made.
rmmod usbserial
modprobe usbserial
This could fail because of other loaded modules which depend on usbserial. You
have then to rmmod
this modules too or simply start your system new.
Troubleshooting
If you come into trouble check all step by step (you have to be root to do all
this):
- Does your
USB works on yous system at all ?
You should have successfully used an USB memory stick, an USB WLAN
stick, an USB Bluetooth stick, an RS232-USB-adapter or something like
this before you try the next steps.
- Does the
system recognizes the AT91xx USB devive ?
Type lsusb
before and after you plugged in the cable. If your system does not know
the lsusb
command you have to install the package usbutils on
Debian/Ubuntu. The output from lsusb
should show a line like this if the device is plugged in:
Bus 004 Device
016: ID 03eb:6125 Atmel Corp.
The Bus
and Device
numbers depend on which plug you connect the device, but
the ID should be exactly the same: 03eb:6125. If
not please tell it the author of this page. Check the output of the dmesg command
and the content of the system log to see what is going wrong.
- Is the
module usbserial
already loaded ?
Type lsmod
| fgrep usbserial and search a line beginning
with usbserial like this:
usbserial
33448 2 ftdi_sio,pl2303
If it appears, the module is already loaded. We see
too, that the module is currently used by two other modules: ftdi_sio and pl2303. This
must not be so.
Skip next step if you did not got the line above. That means, the usbserial
module was not loaded.
- Can the
module be unloaded ?
Type rmmod
fdti_sio and rmmod
pl2303 or whatever you find out above (or nothimg if usbserial was
not used by any other module) and then rmmod usbserial.
No answer means success.
- Can the
module loaded again ?
Type modprobe
usbserial vendor=0x03EB product=0x6125. No answer means
success. As you see we give the options you entered in the
file /etc/modprobe.d/options
as described above as an alternative directly on the command line. If
this helps, check the enty in /etc/modprobe.d/options
and check if this ist the right file for your system (man modprobe).
Check the output of the dmesg
command and the content of the system log to see what is going wrong.
- Is there any
USB tty device file ?
Type ls
-l /dev/ttyUSB* and ls -l /dev/usb/tty/*.
One of both commands should print out a line like
crw-rw---- 1
root dialout 188, 0 2007-10-07 17:08 /dev/ttyUSB0
and not No
such file or directory. More than one line are ok too if
you habe connected an RS232-USB adapter cable or your mobile phone.
- Do you have
rw permissions for the USB tty device file ?
In the example line above the group of the device is dialout
(historical from modem devices). So your user has to be in the group dialout. Check
this in the file /etc/group.
There will be a line beginning with dialout on
which you can see your user name too.
That is all. Now try to access the device using your application, here iTU4l.pl, which
does the rest.
11.07.2009, itu4l〈ΑΤ〉schimmelnetz.de