10
revolution
(c) Revolution Education Ltd. Email: [email protected] Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE
4.0) Linux Installation
The AXE027 cable contains an internal electronic circuit,
based upon an FTDI USB<>serial converter chip. This chip is
already supported by the default Linux installation, via the
kernel driver named ‘
ftdi_sio’
(kernel 2.4.20 and later).
Therefore no driver download is required.
However, as many different products from many different companies all use the same FTDI chip,
each product is given a unique ‘product id’ number for identification purposes. This unique product
id is programmed into the chip inside the cable, so that when the cable is connected to the
computer it can be uniquely identified.
The unique product id for the AXE027 USB cable is 0xbd90. The vendor id is 0x0403.
However the default driver ftdi_sio, as installed by most Linux distributions, only recognises a
couple of (default) product ids for the FTDI chip (e.g. 0x6001). Therefore it is required to ‘patch’ the
driver so that it correctly supports the AXE027’s 0xbd90 product id.
There are 3 different ways to do this, depending on user expertise with using the Linux operating
system.
Option 1 is to simply patch (“modprobe”) the driver details every time the cable is used. This is very
simple, but needs to be carried out every time the computer is restarted (before the AXE027 cable is
inserted). This method also works when running Linux from a Live CD (without installation).
Option 2 (recommended) is also fairly straight forward, and permanent as it involves adding a new
‘udev rule’ file to the operating system. The rule runs automatically each time the computer boots.
Option 3 is advanced and only for those familiar with kernel module recompiling. It involves
modifying the original driver source code and recompiling.
All 3 options are checked for correct operation in the same simple way – after inserting the AXE027
cable into the USB port the symbolic link file called
/dev/ttyUSB0
should automatically appear within the operating system.
Note that any application using the AXE027 cable needs to address this USB symbolic link
/dev/ttyUSB0
which is not the same as the traditional serial (e.g. “COM1”) port link
/dev/ttyS0
Remember the Linux operating system is case sensitive - ‘ttyusb0’ is not the same as ‘ttyUSB0’. If you
have more than one similar USB device attached the name of the second device will be ttyUSB1 etc.
The following instructions were tested on an Asus eeePc 900, running the default Xandros (Debian
derived) distribution and on a PC booted with a Ubunto live CD (not installed).
Note that although the principles are the same for most Linux distributions, different distributions
will use different methods for becoming root (aka “superuser”) (e.g. use su -l rather than sudo) or
for opening a Console Terminal. See the online documenation for your distribution for more
specific details.