Installation
Linux
Dependencies:- python 2.x
Which is usually installed on any distro by default - libusb 0.1
This library is used to access the USB ports and is part of most Linux distros. - python-usb 0.4x
These are the python bindings for libusb 0.1. - wxWidgets + wxPython
This is used to build the GUI. You only need to install wxPython, as it comes with a copy of wxWidgets. (Under Gnome wxgtk)
sudo apt-get install python-wxgtk2.8 python-usb
- Extract the itrackutil archive into a separate directory.
- Create a sub-directory named "wav" for the sound files.
- Make itrackutil.py executable.
USB user permissions
Write access to the USB ports is restricted to root, however itrackutil needs write access to communicate with the device.
You could run itrackutil with root privileges, but this is the least favourable option from a security standpoint.
You could change the permissions of the USB device manually, but the name of the device will change.
The best way is, to let the operating system change the permissions each time you plug the device in.
Change USB port permissions automatically
First, get to know the USB id of your device:
$lsusb ... Bus 001 Device 053: ID 03eb:6125 Atmel Corp. ....Secondly, check if you need to change anything.
$ls -l /dev/bus/usb/001 ... crw-r--r-- 1 root root 189, 0 2009-11-08 22:26 053 ...Your output may vary slightly (note: you may recognize the “053” from the previous output). What it means is, that only root has read/write (rw) access.
If you use VirtualBox or similar a products, their installation routine has most likely changed this default behaviour:
Here is the output when VirtualBox is installed:
crw-rw-r-- 1 root vboxusers 189, 0 2009-11-08 22:26 053This shows, that apart from root, members of the group “vboxusers” have read/write access as well. And if you are member of that group, you needn't change anything.
However, if your system shows the default behaviour, you have to change it.
In modern Linux systems, tasks like changing user permissions of device files are carried out by UDEV. To automate it, you have to create a “rule” in the folder /etc/udev/rules.d
If this folder is missing, your system most likely doesn't use udev. Stop here and let me know.
Create a text file named 10-usb-gpslogger.rules with the following content – you need root privileges to do this (use “sudo”).
SUBSYSTEM==”USB”,ATTR(idVendor=vvvv),ATTR(idProduct)==”pppp”,OWNER=”yourname”where
- vvvv is the first part of the USB ID (vvvv:pppp)
- pppp it the second part of the USB ID
- yourname is your Unix user name
This will change the ownership of the device that is created when you plug-in your GPS logger to you.
Reboot your computer, to be sure that this change gets picked up by the operating system. Then verify the permissions as described above.