How to use the PICAXE USB cable on Linux
So i finally managed to have the Picaxe USB Cable working under linux. Not the programming editor of course, just the serial connection. You can use it to send/receive data with sertxd and serrxd basic command.
Basically, the download cable contains an USB to Serial chip made by FTDI for which a linux kernel module already exists! The problem is that the module is not recognized automatically becouse the cable have different non-standard identificatives. So first, let's find the device. (note: give all commands as root)
It should list something like (among other devices):
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0403 ProdID=bd90 Rev= 6.00
S: Product=AXE027 PICAXE USB
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 90mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
Now take note of the Vendor and ProdID you have (i don't know if they're the same as mine). Then give the following command:
modprobe ftdi_sio vendor=0x0403 product=0xbd90
This will load the ftdi_sio kernel module which will handle the serial communication. Substitute the two ID if they're different (remember the 0x before).
Now try to list the devices again, you should see where it said Driver=(none), now should say Driver=ftdi_sio.
The driver should have created a new device under /dev, called /dev/ttyUSB0 (maybe ttyUSB1 or 2 etc if you had other serial devices).
That's the device for your cable! You can now run your favourite program to use the port.
For example, to access it from the console you can run the standard minicom program. Once open hit CTRL-A O. It should open a configuration menu. Go to Serial port setup, choose the right device, set Bps/par/bits to 4800 8N1, no hardware control flow, no software control flow. Close the menu, connect your robot and you should see his output on the terminal!
(To exit minicom, give CTRL-A Q).
I think you can make the module load at boot time by putting a line in /etc/modules, something like:
ftdi_sio vendor=0x0403 product=0xbd90
This ends this wanderful guide. IHTH