Moteino R4 USB FTDI drivers (FT231xs)

Started by ggallant, October 27, 2014, 08:22:32 PM

ggallant

I have  Moteinos with external USB device working. Purchased an R4 USB to act as the base station. Centos Linux does not detect the device when plugged in. Could try wife's Windows 8 machine to test that the R4 is alive but still need a Linux solution.

George

kobuki

Weird. Most linux distros come with a kernel that already has the modules for FTDI converters (among others). Do you see the moteinos with lsusb (post your lsusb output)? They should have the vendor:prod ID as 0403:6001. Your current kernel+module tree might not contain the necessary modules ATM. Please also post your OS version (cat /etc/issue; uname -a).

ggallant

The problem appears to be with recognizing the device ID. Device on (3,4) is the R4-USB. Device on (3,5) is the R4 with external USB converter. I am using CENTOS 6.5 on a Toshiba labtop and HP Desktops. All are up to date nightly. Following is output of lsusb.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 10f1:1a42 Importek
Bus 003 Device 002: ID 03f0:a407 Hewlett-Packard
Bus 003 Device 004: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 003 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

kobuki

Hm, well, you should try on the Windows 8 PC first if it's recognised and working so you can rule out a DOA Moteino. It could be a bad USB cable. Try another USB device with the same cable, use another port, etc. You could try cold rebooting the Linux box to re-init the PC hardware. I'm using a Moteino and another FTDI USB-serial interface 7x24 on a RHEL 6.5 kernel which is more or less the same as the Centos 6.5 one, no problems.

ggallant

I tried the R4-USB on a Windows 7 machine. At first it reported "Device is not configured correctly". After about 2 minutes a new driver was loaded and status changed to working correctly. Back on Centos, I added a udev rule for device 0403:6015 with device name "r4USBn". Plugging and unplugging the USB cable creates & removes "/dev/r4USB2". It has a major = 189 which is generic "USB Device". The Arduino IDE does not recognize the name. Changed name to ttyUSBn and Arduino allows me to select it but uploads fail.

Google search reveals others having similar problems, most in languages that I do not understand so I can't be sure of the actual messages. I plan to use a Raspberry Pi as the host. Perhaps it will have the proper drivers configured. Centos 7 is out which is another avenue to try.

Thanh Viet

It seems that I have a issue as well with the Moteino R4 USB. Plugged into my mac, it works well. Then I plugged it on my ThingBox (http://thethingbox.io) Raspberry, then I don't get any ttyUSBx...
pi@TheThingBox:~$ ls /dev/tty*
/dev/tty    /dev/tty13  /dev/tty19  /dev/tty24  /dev/tty3   /dev/tty35  /dev/tty40  /dev/tty46  /dev/tty51  /dev/tty57  /dev/tty62    /dev/ttyprintk
/dev/tty0   /dev/tty14  /dev/tty2   /dev/tty25  /dev/tty30  /dev/tty36  /dev/tty41  /dev/tty47  /dev/tty52  /dev/tty58  /dev/tty63
/dev/tty1   /dev/tty15  /dev/tty20  /dev/tty26  /dev/tty31  /dev/tty37  /dev/tty42  /dev/tty48  /dev/tty53  /dev/tty59  /dev/tty7
/dev/tty10  /dev/tty16  /dev/tty21  /dev/tty27  /dev/tty32  /dev/tty38  /dev/tty43  /dev/tty49  /dev/tty54  /dev/tty6   /dev/tty8
/dev/tty11  /dev/tty17  /dev/tty22  /dev/tty28  /dev/tty33  /dev/tty39  /dev/tty44  /dev/tty5   /dev/tty55  /dev/tty60  /dev/tty9
/dev/tty12  /dev/tty18  /dev/tty23  /dev/tty29  /dev/tty34  /dev/tty4   /dev/tty45  /dev/tty50  /dev/tty56  /dev/tty61  /dev/ttyAMA0

If I use Felix's FTDI adapter with a Moteino R4 or Mega, then it works well !
pi@TheThingBox:~$ ls /dev/tty*
/dev/tty    /dev/tty13  /dev/tty19  /dev/tty24  /dev/tty3   /dev/tty35  /dev/tty40  /dev/tty46  /dev/tty51  /dev/tty57  /dev/tty62    /dev/ttyUSB0
/dev/tty0   /dev/tty14  /dev/tty2   /dev/tty25  /dev/tty30  /dev/tty36  /dev/tty41  /dev/tty47  /dev/tty52  /dev/tty58  /dev/tty63    /dev/ttyprintk
/dev/tty1   /dev/tty15  /dev/tty20  /dev/tty26  /dev/tty31  /dev/tty37  /dev/tty42  /dev/tty48  /dev/tty53  /dev/tty59  /dev/tty7
/dev/tty10  /dev/tty16  /dev/tty21  /dev/tty27  /dev/tty32  /dev/tty38  /dev/tty43  /dev/tty49  /dev/tty54  /dev/tty6   /dev/tty8
/dev/tty11  /dev/tty17  /dev/tty22  /dev/tty28  /dev/tty33  /dev/tty39  /dev/tty44  /dev/tty5   /dev/tty55  /dev/tty60  /dev/tty9
/dev/tty12  /dev/tty18  /dev/tty23  /dev/tty29  /dev/tty34  /dev/tty4   /dev/tty45  /dev/tty50  /dev/tty56  /dev/tty61  /dev/ttyAMA0

Weird thing is that I had to install the FTDI Virtual Comm Port drivers on my Mac to get this adapter working.

ggallant

Thanks for verifying my problem. Sometimes I wonder if I create my own snafus!!

Thanh Viet

 :o

But we still haven't found a solution yet  :-\

Felix


ggallant

I did a minimal install of Centos 7 and the board is recognized with no configuration changes by me. At first glance, centos 7 is a big step down from centos 6 on the GUI!!!

ggallant

The problem seem to be isolated to the ftdi-sio driver. Centos6 does not include the latest in the 2.6 kernel. Supposedly I can force the update process to use the 3.1 kernel which does have support for the newer FTDI chips. I will look into building a local copy. In the meantime I am having success with:

modprobe -v ftdi-sio vendor=0x0403 product=0x6015

Saxx

I have the same issue. You may read about my experiences on my site http://www.borngeek.net/Projects/Wireless-temperature-sensors/Prototypes

I ended up with a separate FTDI adapter.

Felix

I've been reading some more on the topic. It sounds like the older FTDI driver v2.10.0.0 was not affected by the "anti-fake-chips" patches. Although like i've been saying I am running 2.12 and it's not having a problem with any of the FT231 or FT232 chips.

ggallant

My current solution is to install the 3.1 kernel in place of the standard 2.6 kernel  on Centos 6.6. The epel repository contains instructions for installing just the kernel. The problem appears to be that the ftdi_sio driver distributed with Centos 6 is not built from the current source.