axe027 and linux mint

SteveDee

Senior Member
I've only been half-following this thread, but it looks like operations that initially worked (post #1) are no longer working (post #41).

Could we just start agian?

Please boot your system, log in as you, and then plug the AXE027 cable in. Don't connect the jack end to anything.

In a terminal type: lsusb
...and make sure the output includes: "...0403:bd90 Future Technology Devices International, Ltd..."

Now run command:-

sudo modprobe ftdi_sio

Navigate with file manager to:-

/sys/bus/usb-serial/drivers/ftdi_sio/new_id

You can open new_id in a text editor to have a peek, but it will be a blank file.

Change file permissions so we can write to new_id:-

sudo chmod 777 /sys/bus/usb-serial/drivers/ftdi_sio/new_id

...then write to file using:-
sudo echo "0403 bd90" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id

Opening new_id now should show:-

0403 bd90

Use your file manager to check whether you have this file: /dev/ttyUSB0

Let us know what happens at each stage.
 

JeremyB

New Member
I think GAP has given up on using Linux Mint with picaxe. Changing permissions on the file is not needed if you change other commands, you can use
Code:
sudo modprobe ftdi_sio
sudo -i
echo "0403 bd90" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
exit
I thought I read about a windows program that could change the id of the program cable to 0403 6001 or 6006 then the linux module should load on its own as those ID's are in the kernel source code but I made a change to the 3.13 source code for GAP and it still didn't create /dev/ttyUSB0
 

kfjl

Member
Post #13: The NON-LINUX solution suggested by Janne. Ideal, I would have thought , for a Linux newbie.
Post #14: The Picaxe tool to do the job.
Post #15: I think GAP might have tried to use the Windows tool with Linux.
Post #16: A handfull of WINDOWS clicks and it's done.
Post #18: Forget the linux command line and do it with the OS you're used to.
Post #42: That was fun, let's do it again.

What's the programming tool for?
 
Last edited:

JeremyB

New Member
The Windows programming tool should be able to change the ID on the picaxe cable from 0403 bd90 to 0403 6001 or 6006 as the 6001/6006 ID is in the Linux kernel source code
Code:
#define FTDI_VID	0x0403	/* Vendor Id */


/*** "original" FTDI device PIDs ***/

#define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */
#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
#define FTDI_4232H_PID 0x6011 /* Quad channel hi-speed device */
#define FTDI_232H_PID  0x6014 /* Single channel hi-speed device */
#define FTDI_FTX_PID   0x6015 /* FT-X series (FT201X, FT230X, FT231X, etc) */
#define FTDI_SIO_PID	0x8372	/* Product Id SIO application of 8U100AX */
#define FTDI_232RL_PID  0xFBFA  /* Product ID for FT232RL */
 

kfjl

Member
The Windows programming tool should be able to change the ID on the picaxe cable from 0403 bd90 to 0403 6001 or 6006 as the 6001/6006 ID is in the Linux kernel source code
There's no "should" about it, it DOES change the cable's product ID (post #16). That's all it does. That's what it's for.

The cable will then work out-of-the-box in almost any Linux distribution. The only exception I've found so far is, (surprise!) Arch linux, but Arch users will know why and what to do.
 

hippy

Technical Support
Staff member
When I put "sudo modprobe ftdi_sio" into terminal.

I get this error "modprobe: ERROR: could not insert 'ftdi_sio': Exec format error"
What that seems to be indicating is that the ftdi_sio you have on your system is not compatible with your Linux system or has been corrupted.

I don't know if that is a Linux Mint distro issue or caused by something you may have done while trying to get things to work. It could be that ftdi_sio was accidentally overwritten with garbage while running some command.

If you can locate where 'ftdi_sio' is you could 'sudo cat' it to see what's in the file to perhaps determine what went wrong.
 

JeremyB

New Member
What that seems to be indicating is that the ftdi_sio you have on your system is not compatible with your Linux system or has been corrupted.

I don't know if that is a Linux Mint distro issue or caused by something you may have done while trying to get things to work. It could be that ftdi_sio was accidentally overwritten with garbage while running some command.

If you can locate where 'ftdi_sio' is you could 'sudo cat' it to see what's in the file to perhaps determine what went wrong.
I think the Exec format error occurred because they tried using a patched 3.13 kernel module rather than the 4.4 kernel module. Easiest way to check is
Code:
modinfo ftdi_sio | grep 'file|vermagic'
The file will show 4.4 kernel directory and the vermagic shows what kernel the module is built against
 

GAP

Senior Member
I think GAP has given up on using Linux Mint with picaxe. Changing permissions on the file is not needed if you change other commands, you can use
Code:
sudo modprobe ftdi_sio
sudo -i
echo "0403 bd90" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
exit
I thought I read about a windows program that could change the id of the program cable to 0403 6001 or 6006 then the linux module should load on its own as those ID's are in the kernel source code but I made a change to the 3.13 source code for GAP and it still didn't create /dev/ttyUSB0
Jeremy is right, I have given up on trying to get Axe027 to operate within Axepad on Linux.
I have uninstalled axepad and have started trying to use programming editor via xp within virtual box. That does not seen to be working either because of a COM port issue between virtualbox and the host machine.
When I went back to windows programming editor can't find the hardware to download to, that is in addition to the USB port that AXE027 was connected to has now stopped working.
 

hippy

Technical Support
Staff member
I have uninstalled axepad and have started trying to use programming editor via xp within virtual box. That does not seen to be working either because of a COM port issue between virtualbox and the host machine.
When I went back to windows programming editor can't find the hardware to download to, that is in addition to the USB port that AXE027 was connected to has now stopped working.
If you are running virtual box on the same PC you were using before, then the problem with FTDI_SIO will likely be preventing the AXE027 working with that.

As I understand it, Linux still manages the USB system and then provides access to devices to virtual box. If Linux cannot recognise the AXE027 then it cannot provide access to it for either AXEpad or anything running in virtual box.

The issue is not so much that AXEpad or programming editor under virtual box are being problematic but that you have a Linux system which won't recognise FTDI serial cables or modules.

You likely need to forget about getting any PICAXE software working at present, focus on getting Linux to recognise the AXE027, able to create a /dev/ttyUSB* interface when it is plugged in, then move on from there. To achieve that you need to resolve the FTDI_SIO issue. That may require a reinstallation of Linux.
 

hippy

Technical Support
Staff member
A hardware failure would be a logical reason that nothing worked
There seems to be far more going wrong than can be attributed to hardware failure.

The best way forward is to determine how things stand now, and the first thing would be to determine the status of the AXE027. To do that I would take that to a PC running Windows XP or later natively ( not in virtual box or similar ) and install it, check its VID and PID, and check that it can download a program and/or complete a successful loopback test.

Plugging this AXE027 into a Windows PC which already has drivers for AXE027 installed and is successfully programming a PICAXE using another AXE027 would be the best option.
 

GAP

Senior Member
There seems to be far more going wrong than can be attributed to hardware failure.

The best way forward is to determine how things stand now, and the first thing would be to determine the status of the AXE027. To do that I would take that to a PC running Windows XP or later natively ( not in virtual box or similar ) and install it, check its VID and PID, and check that it can download a program and/or complete a successful loopback test.

Plugging this AXE027 into a Windows PC which already has drivers for AXE027 installed and is successfully programming a PICAXE using another AXE027 would be the best option.
I tested the AXE027 on a WIN10 machine and the XP machine and it worked both times (discovered one dead USB port).
Conclusion;
Formatted the HDD and installed Win XP on the XP hobby machine it is now a stand alone with program editor installed.
Mind you the installation process of AXE027 is quite daunting for the PC illiterate and it took ages to find out how to do it.
Getting a zip file with no instructions on what to run is a bit disappointing.
Linux Mint 17.1 appears not to be compatible with AXE027 might try 18.2 in the future but as technology evolve faster than anything else that will probably be obsolete and totally useless on the old steam driven PC.
In the end to all the people who tried to help a big thank you.
 

hippy

Technical Support
Staff member
out of the box!
I am not so sure I would call that "out of the box" given whatever FTDI cable or module you are using has a 0403:6001 VID and PID, and an out of the box AXE027 will not have that.

Yes; Mint 17, like almost all other Linux distros since 2012, will recognise FTDI cables and modules using the 0403:6001 VID and PID out the box. It is using those Linux systems with out of the box AXE027 with its 0403:bd90 VID and PID which requires some configuration, of Linux or the AXE027.

The bottom line is that, so far, and to the best of our knowledge, no AXE027 will work out of the box with any Linux distro.
 

kfjl

Member
@hippy

It's the axe027 whose PID I changed with REV-ED's programming tool, that I found thanks to your link in post #14.

I took the trouble to install mint 17.1 on a USB stick to reply to GAP's supposition: "Linux Mint 17.1 appears not to be compatible with AXE027". What would be the sense of "cheating", as you seem to be insinuating, by using an FTDI module? How did you expect the cable to show up after it's Product ID has been changed to 6001? Why do you think I included the terminal window?

So long and thanks for all the fish.
 
Last edited:

GAP

Senior Member
The installation instructions are available from the same AXE027 product web pages from which the ZIP file can be downloaded from -

http://www.picaxe.com/Hardware/Cables/PICAXE-USB-Download-Cable
http://www.picaxestore.com/index.php/en_gb/axe027.html
I probably misinterpreted the instruction about the pre installer.
I read them as if the AXE027 had ever been plugged in then it could not be used and as I had plugged it in before it would not work.
I Followed an explanation in another forum thread I found on the net was much clearer and easier and in minutes I had it running on 2 computers.
 

hippy

Technical Support
Staff member
I probably misinterpreted the instruction about the pre installer.
I read them as if the AXE027 had ever been plugged in then it could not be used and as I had plugged it in before it would not work.
That is generally correct. If the AXE027 is plugged in and Windows determines the AXE027 to be an "unknown device" before the pre-installer is run then running the pre-installer will not change that, will not do as it is intended to do. In that case the device drivers have to be manually installed as described in the installation guide.
 

hippy

Technical Support
Staff member
I took the trouble to install mint 17.1 on a USB stick to reply to GAP's supposition: "Linux Mint 17.1 appears not to be compatible with AXE027". What would be the sense of "cheating", as you seem to be insinuating, by using an FTDI module?
I am sorry if you found what I had written inappropriate or unacceptable. I was just trying to clarify what seemed to me to be a claim that AXE027 and Linux could be used out of the box.
 

GAP

Senior Member
That is generally correct. If the AXE027 is plugged in and Windows determines the AXE027 to be an "unknown device" before the pre-installer is run then running the pre-installer will not change that, will not do as it is intended to do. In that case the device drivers have to be manually installed as described in the installation guide.
I have just installed drivers (pre-installer) for AXE027 and now have it running as advertised in XP (gave up on Linux with this PC)

One issue I did have that may be worth noting is that if AXE027 is plugged into a USB hub the programming editor will not see it, to get it to work I had to plug it into its own dedicated USB port.
 

hippy

Technical Support
Staff member
One issue I did have that may be worth noting is that if AXE027 is plugged into a USB hub the programming editor will not see it, to get it to work I had to plug it into its own dedicated USB port.
I have my AXE027 working through a hub so it perhaps depends on which hub one has. Plugging into different USB sockets, different hubs, may install additional AXE027 devices on different COM ports so there may need to be adjustments and additional configuration to handle that.
 
Top