I have two PICAXE microcontrollers. Actually, I have Ubuntu 14.04 LTS (Trusty Tahr).

I had to download the LinAXEpad application and install these libraries:

sudo apt-get install libgtk2.0-0: libcairo2 i386: i386 libpango1.0-0: libgdk-pixbuf2.0-0 i386: i386 libstdc ++ 6: i386

I followed these instructions:

4.0) Linux Installation

The AXE027 cable contains an internal electronic circuit, based upon an FTDI USB-to-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.

All three 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

4.2) Linux Patch Option 2 (recommended) Create a new udev rule, so that the modprobe rule is automatically applied every time the computer boots. Create a new file (e.g. using KWrite, gedit or similar text editor) named:

/etc/udev/rules.d/99-axe027.rules

To do this, open a Terminal console and then type:

sudo kwrite /etc/udev/rules.d/99-axe027.rules

Then enter the following text (note the last two lines below should be entered as one long line) and then save the file.

# /etc/udev/rules.d/99-axe027.rules
# contains axe027 udev rule to patch default
# FTDI product id to AXE027 product id (0xbd90)
SYSFS{idProduct}=="bd90",
SYSFS{idVendor}=="0403",
RUN+="/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403"

The new rule will then always be applied when the system boots. To immediately try out the new rule without rebooting open a Terminal console and then type:

(Original code)

sudo udevcontrol reload_rules

(My Code)

sudo udevadm control --reload-rules

Then, I tried to execute the LinAXEpad application, accessing to: VIEW>>OPTIONS (choose the microcontroller), and finally "click" on FIRMWARE

I got this:

Can't open port /dev/ttyUSB0 (err=2: No such file or directory)

What can I do?

Trying with LSUSB: http://www.subirimagenes.com/otros-lsusb-9076605.html

Trying with DMESG: http://www.subirimagenes.com/otros-dmesg-9076607.html

  • What if you list the /dev folder ? ttyUSBx should be there as soon as the cable is connected. – Pyrophorus Sep 17 '14 at 8:57
  • @Pyrophorus Here is a new picture of the /dev folder (cable connected) <subirimagenes.com/otros-screen-9076742.html>; – Falconunknown Sep 17 '14 at 10:35
  • IMO, the system detects correctly a new USB device (and it's name and so on), but don't understand what kind of device it is (no /dev/ttyUSBx created). I suspect your new rule don't work, and I would try to execute modprobe directly to see if any error happens. – Pyrophorus Sep 17 '14 at 10:50
  • @Pyrophorus How can I do that? Modprobe command have many parameters... Could you help me! Thks – Falconunknown Sep 17 '14 at 13:14
  • Well, you could try sudo modprobe -c to display the current configuration and see if your module is already loaded, and in your place, I would try sudo /sbin/modprobe ftdi_sio product=0xbd90 vendor=0x0403 too, to see what happens (note it is the command present in your rule, except the -q(iet) flag, we don't want of course). – Pyrophorus Sep 17 '14 at 13:24

dmesg gives you some useful tips (see the picture you posted).

  • Your rule for udev must be incorrect: see the lines where ftdi_sio tells the parameters are unknown/ignored. Anyway, loading this module has some result: your adapter is now known as a serial adapter and the ttyUSB0 created, but it is said the driver is experimental and you should ask linux-usb@vger.kernel.org to add your adapter to a correct driver (I would do that in your place, it's most probably the better way to go).

Now, about the permission denied, you could:

  • list the /dev folder with ls -l to find the group owning the ttyUSB0. (probably tty). It should have rw permission on it.
  • make the user running your app member of this group, for instance with sudo adduser theuser thegroup. It should fix the permission problem.

And BTW, when the output of a command like modprobe -c is too large, you can either pipe it to less or to grep:

sudo modprobe -c | less

sudo modprobe -c | grep ftdi_sio
  • Mmmmm @Pyrophorus, look at this <picaxeforum.co.uk/…;... It seems interesting – Falconunknown Sep 18 '14 at 10:01
  • Yes, it suggests to do what I explained in my answer, except the group to add your user is dialout not tty. I think the rule itself is incorrect because the paramters are ignored, but this don't prevent the driver to work. Good luck ! – Pyrophorus Sep 19 '14 at 7:50
  • Finally @Pyrophorus, after to fix the permission problem, I got "Hardware not found on /dev/ttyUSB0" message error on LinAXEpad (mode tab+firmware button)... About "picaxeforum" link", I tried with "ATTR" or "SYSFS" properties/attributes, and got the same message error. Ohhhh and about morprobe command (sudo modprobe -c | grep ftdi_sio) don't shows nothing (just asks my password) – Falconunknown Sep 19 '14 at 18:14
  • In this links <bbs.archlinux.org/viewtopic.php?id=175499>; or <leniwiec.org/en/2014/06/25/…; perhaps we got the answer... maybe – Falconunknown Sep 20 '14 at 2:34
  • Look at this <subirimagenes.com/otros-lastdmesg-9080672.html > But got the same error "Hardware not found on /dev/ttyUSB0"... I don't know what's wrong!! – Falconunknown Sep 20 '14 at 3:25

In recent kernels (definitely with 14.04 LTS), the ftdi_sio module no longer accepts the product and vendor options. Instead, you have to manually write the value to /sys/bus/usb-serial/drivers/ftdi_sdio/new_id. You can automate it using the following udev rule:

ACTION=add, ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bd90", RUN+="/sbin/modprobe", RUN+="/bin/sh -c 'echo 0403 bd90 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"
  1. Create a new rules file /etc/udev/rules.d/99-axe027.rules with the line above

  2. Reload the rules by running sudo udevadm control --reload. Or reboot.

  3. Unplug the device if plugged in.

  4. Plug the device in.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.