Community
cancel
Showing results for 
Search instead for 
Did you mean: 
aedwa2
New Contributor III
4,179 Views

FTDI USB Driver "kernel-module-ftdi-sio" Edison does not assign ttyUSBx to a USB - RS422 FTDI cable

I want to use an FTDI USB to RS422 cable on Edison. The FTDI Linux driver instructions on ftdichip.com say that the drivers are built into the Linux kernel and that you should get an assignment to ttyUSB0 and that you can see that in dmesg. But they apparently are not on Edison so I have found instructions saying to install them.

I did this:

opkg install kernel-module-ftdi-sio

The result was an error

* copy_file_chunk: write: No space left on device.

I found that the process had inserted a file in /boot and that it was full.

/dev/mmcblk0p7 5862 5860 2 100% /boot

These files were in /boot. The first one was inserted by the opkg command

root@sledison:/boot# ls -lh

-rwxr-xr-x 1 root root 460.0K Mar 1 17:36 bzImage-3.10.17-yocto-standard

-r-xr-xr-x 1 root root 112.8K Jan 30 14:23 ldlinux.c32

-r-xr-xr-x 1 root root 58.5K Jan 30 14:23 ldlinux.sys

-rwxr-xr-x 1 root root 198 Jan 30 14:23 syslinux.cfg

-rwxr-xr-x 1 root root 5.1M Jan 30 14:23 vmlinuz

root@sledison:/boot#

I removed the image file and ran opkg command again and it looked like it ran.

opkg install http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0 http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0

 

_edison.ipk

 

Downloading http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0... http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0....

 

Installing kernel-module-ftdi-sio (3.10.17+git0+6ad20f049a_c03195ed6e-r0) to root...

Configuring kernel-module-ftdi-sio.

But when I run this

dmesg | grep FTDI

I get this only this:

[ 6.100522] usb 1-1: Manufacturer: FTDI

What I should get it this:

[10170.987708] USB Serial support registered for FTDI USB Serial Device

[10170.987915] ftdi_sio 9-1:1.0: FTDI USB Serial Device converter detected

[10170.991172] usb 9-1: FTDI USB Serial Device converter now attached to ttyUSB0

[10170.991219] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

Doing the same thing but grep for USB does not show any assignment to ttyUSB0 or any other ttyUSBx port.

I don't know what to do.

98 Replies
KEckh
Valued Contributor III
444 Views

it it were me, I would unplug the usb adapter, then plug it back in.

Then I would do: dmesg | tail -30

And see what messages were generated.

aedwa2
New Contributor III
444 Views

@Kurt Here is the result of what you suggested. Looks like the driver is not installed to me.

root@sledison:~# dmesg |tail -30

[ 5.967176] systemd-journald[105]: Received request to flush runtime journal from PID 1

[ 6.466146] EXT4-fs (mmcblk0p5): mounted filesystem without journal. Opts: discard,barrier=1,data=ordered,noauto_da_alloc

[ 8.168134] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

[ 8.262958]

[ 8.262958] Dongle Host Driver, version 1.141.59 (r)

[ 8.262958] Compiled in /data/jenkins_worker/workspace/edison-weekly/broadcom_cws/wlan/driver_bcm43x on Jan 30 2015 at 14:17:44

[ 8.262992] wl_android_wifi_on in

[ 8.263011] wifi_platform_set_power = 1

[ 8.839410] F1 signature OK, socitype:0x1 chip:0xa94c rev:0x2 pkg:0x0

[ 8.840922] DHD: dongle ram size is set to 524288(orig 524288) at 0x0

[ 8.843208] dhdsdio_download_firmware: firmware path=/etc/firmware/fw_bcmdhd.bin, nvram path=/etc/firmware/bcmdhd.cal

[ 9.086761] sdioh_request_buffer: [1] doing memory copy buf=f5dd4000, len=2037

[ 9.091048] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.

[ 9.251319] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)

[ 9.256677] wifi_platform_get_mac_addr

[ 9.256764] wifi_get_mac_addr_intel: unable to open /config/wifi/mac.txt

[ 9.261047] Firmware up: op_mode=0x0015, MAC=78:4b:87:aa:f3:4b

[ 9.285872] Firmware version = wl0: Aug 15 2014 15:09:17 version 6.20.190.2 (r497061) FWID 01-bb9bbd07

[ 9.286812] dhd_preinit_ioctls wl ampdu_hostreorder failed -23

[ 9.308201] EXT4-fs (mmcblk0p10): mounted filesystem with ordered data mode. Opts: discard,barrier=1,data=ordered,noauto_da_alloc

[ 9.385035] CFG80211-ERROR) wl_update_wiphybands : bw_cap failed, -23

[ 9.603776] CFGP2P-ERROR) wl_cfgp2p_add_p2p_disc_if : P2P interface registered

[ 9.639388] WLC_E_IF: NO_IF set, event Ignored

[ 10.871097] FAT-fs (mmcblk0p7): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

[ 115.379731] usb 1-1: new full-speed USB device number 2 using dwc3-host

[ 115.406119] usb 1-1: New USB device found, idVendor=0403, idProduct=6001

[ 115.406148] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 115.406169] usb 1-1: Product: USB-RS422 Cable

[ 115.406187] usb 1-1: Manufacturer: FTDI

[ 115.406205] usb 1-1: SerialNumber: FTXXD2DU

root@sledison:~#

aedwa2
New Contributor III
444 Views

I also ran this command:

root@sledison:~# opkg info kernel-module-ftdi-sio

Package: kernel-module-ftdi-sio

Version: 3.10.17+git0+6ad20f049a_c03195ed6e-r0

Depends: kernel-3.10.17-yocto-standard

Status: install user installed

Section: kernel

Architecture: edison

Maintainer: Poky <</span>mailto:poky@yoctoproject.org poky@yoctoproject.org>

MD5Sum: 38d0c9ec0356d537e77680a30782d4de

Size: 23326

Filename: kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0_edison.ipk

Source: git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=standard/base,meta;name=machine,meta file://defconfig file://upstream_to_edison.patch file://ftdi_sio.cfg file://enable_batman.cfg file://enable_cifs.cfg file://gspca_pac207_webcam.cfg file://enable_udl.cfg file://enable_cp210x.cfg file://enable_uvc.cfg

Description: ftdi-sio kernel module ftdi-sio kernel module; USB FTDI Serial

Converters Driver

Installed-Time: 1427831829

aedwa2
New Contributor III
444 Views

It says the driver is installed so I guess it just doesn't work? Anyone using this driver successfully?

KEckh
Valued Contributor III
444 Views

Maybe others can help. I don't have an RS422 adapter, so I have no idea if that makes a difference. I do have an FTDI RS232 based cable.

So I tried plugging it into my Mini breakout through an appropriate adapter.

I had a newer install which I had not previously installed the FTDI driver, so I did so:

root@edison_MP2:~# opkg install kernel-module-ftdi-sio

Installing kernel-module-ftdi-sio (3.10.17+git0+6ad20f049a_c03195ed6e-r0) to root...

Downloading http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0... http://repo.opkg.net/edison/repo/edison/kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0....

Configuring kernel-module-ftdi-sio.

I then plugged in the FTDI adapter. From dmesg:

[ 364.622971] usb 1-1: new full-speed USB device number 3 using dwc3-host

[ 364.650922] usb 1-1: New USB device found, idVendor=0403, idProduct=6001

[ 364.650954] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 364.650975] usb 1-1: Product: USB Serial Converter

[ 364.650994] usb 1-1: Manufacturer: FTDI

[ 364.651012] usb 1-1: SerialNumber: ftCB3Z2A

[ 364.669229] usbcore: registered new interface driver ftdi_sio

[ 364.669373] usbserial: USB Serial support registered for FTDI USB Serial Device

[ 364.669563] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected

[ 364.669798] usb 1-1: Detected FT232BM

[ 364.669823] usb 1-1: Number of endpoints 2

[ 364.669843] usb 1-1: Endpoint 1 MaxPacketSize 64

[ 364.669862] usb 1-1: Endpoint 2 MaxPacketSize 64

[ 364.669880] usb 1-1: Setting MaxPacketSize 64

[ 364.670529] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

from lsusb:

root@edison_MP2:~# lsusb

Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

root@edison_MP2:~#

root@edison_MP2:~# lsusb -v

Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Device Descriptor:

bLength 18

bDescriptorType 1

bcdUSB 1.10

bDeviceClass 0 (Defined at Interface level)

bDeviceSubClass 0

bDeviceProtocol 0

bMaxPacketSize0 8

idVendor 0x0403 Future Technology Devices International, Ltd

idProduct 0x6001 FT232 USB-Serial (UART) IC

bcdDevice 4.00

iManufacturer 1 FTDI

iProduct 2 USB Serial Converter

iSerial 3 ftCB3Z2A

bNumConfigurations 1

Configuration Descriptor:

bLength 9

bDescriptorType 2

wTotalLength 32

bNumInterfaces 1

bConfigurationValue 1

iConfiguration 0

bmAttributes 0xa0

(Bus Powered)

Remote Wakeup

MaxPower 44mA

Interface Descriptor:

bLength 9

bDescriptorType 4

bInterfaceNumber 0

bAlternateSetting 0

bNumEndpoints 2

bInterfaceClass 255 Vendor Specific Class

bInterfaceSubClass 255 Vendor Specific Subclass

bInterfaceProtocol 255 Vendor Specific Protocol

iInterface 2 USB Serial Converter

Endpoint Descriptor:

bLength 7

bDescriptorType 5

bEndpointAddress 0x81 EP 1 IN

bmAttributes 2

Transfer Type Bulk

Synch Type None

Usage Type Data

wMaxPacketSize 0x0040 1x 64 bytes

bInterval 0

Endpoint Descriptor:

bLength 7

bDescriptorType 5

bEndpointAddress 0x02 EP 2 OUT

bmAttributes 2

Transfer Type Bulk

Synch Type None

Usage Type Data

wMaxPacketSize 0x0040 1x 64 bytes

bInterval 0

Device Status: 0x0000

(Bus Powered)

Not sure what else I can contribute...

aedwa2
New Contributor III
444 Views

I find it curious that you were able to install the kernel-module-ftdi-sio without an error message. We tried this on two different Edison's, both the latest version at least in the sense that it was 3.10.17 and both failed until we deleted the image file inserted into boot.

Could that be part of the problem?

Where we fail is that this statement doesn't happen

usbcore: registered new interface driver ftdi_sio

 

But when we run our USB-RS232 device we get a similar statement

usbcore: registered new interface driver pl2303

 

Anyway, good hear that the driver does work. Thanks for that information.

 

KEckh
Valued Contributor III
444 Views

I find it curious that you were able to install the kernel-module-ftdi-sio without an error message. We tried this on two different Edison's, both the latest version at least in the sense that it was 3.10.17 and both failed until we deleted the image file inserted into boot.

Could that be part of the problem?

I should first note, that I am running my own build of the image, where I was experimenting with SPI to try to get around the issue with it's Power Management issues...

But the other thing is, how did you install the latest image? I used the: sudo ./flashall.sh

method. Why, because it was mentioned somewhere (release notes? or forum post?), that this would update the partitions on the Edison as to increase the size of the boot partition, as to fix some issues from the previous image where we were running out of space. If you have not tried this, I would suggest that you do and see if that helps.

Kurt

Matthias_H_Intel
Employee
444 Views

have you checked:

modinfo

dmesg

udevadm

aedwa2
New Contributor III
444 Views

That explains why you did not get the boot full error. Thank you for that information.

EDIT: The release notes do not mention an increase to the boot size. What is the size of your boot sector?

Allen

aedwa2
New Contributor III
444 Views

Regarding the two commands

root@sledison:~# udevadm

missing or unknown command

root@sledison:~# modinfo

modinfo: ERROR: missing module or filename.

So those were not run. I see that doing a flashall will overwrite all the setups and data on Edison. Will try but I sent an email to FTDI tech support. Perhaps they will reply.

Allen

KEckh
Valued Contributor III
444 Views

allene wrote:

That explains why you did not get the boot full error. Thank you for that information.

EDIT: The release notes do not mention an increase to the boot size. What is the size of your boot sector?

Allen

http://download.intel.com/support/edison/sb/edisonbsp_rn_332032007.pdf http://download.intel.com/support/edison/sb/edisonbsp_rn_332032007.pdf

Look at page 10:

Software Release v2 includes changes to the flash partitioning, which will increase the default size of the root file

system and should reduce miscellaneous failures that are caused by the lack of free space.

To take advantage of this improvement,you must flash the new software image (using the flashall.sh script

including in the reference image) to the device using the serial connection so that the solid state storage is

repartitioned.

aedwa2
New Contributor III
444 Views

I saw that, which is why I asked what the size of your boot sector was. I wasn't suggesting that it didn't increase, I just wanted verification and to know how much

KEckh
Valued Contributor III
444 Views

root@edison_MP2:~# df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/root 1458032 421844 951652 31% /

devtmpfs 491444 0 491444 0% /dev

tmpfs 491752 0 491752 0% /dev/shm

tmpfs 491752 504 491248 0% /run

tmpfs 491752 0 491752 0% /sys/fs/cgroup

systemd-1 5814 5352 462 92% /boot

systemd-1 1337936 26940 1294612 2% /home

tmpfs 491752 4 491748 0% /tmp

tmpfs 491752 0 491752 0% /var/volatile

/dev/mmcblk0p5 1003 19 913 2% /factory

/dev/mmcblk0p10 1337936 26940 1294612 2% /home

/dev/mmcblk0p7 5814 5352 462 92% /boot

aedwa2
New Contributor III
444 Views

That boot sector is slightly smaller than what I have.

root@sledison:~# dfFilesystem1K-blocksUsedAvailableUse%Mounted/dev/root4750803794445894087%/devtmpfs49141604914160%/devtmpfs49172804917280%/dev/shmtmpfs49172866844850441%/runtmpfs49172804917280%/sys/fs/cgroupsystemd-1586258602100%/bootsystemd-123373085813222627923%/hometmpfs49172844917240%/tmptmpfs49172804917280%/var/volatile/dev/mmcblk0p51003199132%/factory/dev/mmcblk0p1023373085813222627923%/home/dev/mmcblk0p7586258602100%/boot
KEckh
Valued Contributor III
444 Views

I am not sure it is the boot size that is the main issue. I think it may be the root partition. Mine is: 1458032 and yours is 475080

aedwa2
New Contributor III
444 Views

Just that the error message said the boot was full and it was in fact full.

KEckh
Valued Contributor III
444 Views

In that case I go back to my cheat sheet:

From there I have a link to: AlexT's document about updating the size of the boot

http://alextgalileo.altervista.org/blog/install-kernel-from-repo-onto-edison-official-image/ http://alextgalileo.altervista.org/blog/install-kernel-from-repo-onto-edison-official-image/

Mainly steps 1-3. (Note: his comment about later releases). However I did it anyway and now see my size of boot...

root@edison_MP2:~# df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/root 1458032 430012 943484 31% /

devtmpfs 491444 0 491444 0% /dev

tmpfs 491752 0 491752 0% /dev/shm

tmpfs 491752 496 491256 0% /run

tmpfs 491752 0 491752 0% /sys/fs/cgroup

systemd-1 32686 5352 27334 16% /boot

systemd-1 1337936 32300 1289252 2% /home

tmpfs 491752 4 491748 0% /tmp

tmpfs 491752 0 491752 0% /var/volatile

/dev/mmcblk0p5 1003 19 913 2% /factory

/dev/mmcblk0p10 1337936 32300 1289252 2% /home

/dev/mmcblk0p7 32686 5352 27334 16% /boot

root@edison_MP2:~#

aedwa2
New Contributor III
444 Views

I flashed Edison with with an image using the windows BAT file flashall.bat, clearing out everything. It does work but you need a file that you have to download*.

I was trying to duplicate what you initially did. I got the larger root partition like you did. I did not increase the boot as I wanted to duplicate what you did when you installed the FTDI driver. I got the same error message. Just like before, if I run opkg a second time, it completes without an error message. I did not remove any files, just ran opkg a second time.

KurtE, are you sure you didn't get an error message about boot full?

I have contacted FTDI and they have an Edison and will try and duplicate my issue.

EDIT: I notice from the link on installing image that it is filled with comments to ignore the errors, some of which are the ones I am concerned with

 

"Ignore the "Operation not permitted" message, it's harmless in our case."

 

Perhaps I should just ignore this rabbit hole???

 

*https://dl.dropboxusercontent.com/u/54378433/dfu-util/dfu-util.exe https://dl.dropboxusercontent.com/u/54378433/dfu-util/dfu-util.exe

MCara4
New Contributor III
444 Views

Hi allene,

can you see the ttyUSB0 port now?

I used the same procedure and I got the same error with a CP2102 and a FTDI chip. I cannot see the a ttyUSB0 serial port. Instead the pl2303 chip works well, ie I can see ttyUSB0, i think this driver is already loaded in the ww15 Edison kernel.

I think that in the case of CP2102 and FTDI chips the drivers aren't correctly installed. The correct procedure is this one:

unfortunately I wasn't able to adapt it to ww15 image as I wrote in this post:

What do you think?

Thanks

-massimo

KEckh
Valued Contributor III
228 Views

allene wrote:

I flashed Edison with with an image using the windows BAT file flashall.bat, clearing out everything. It does work but you need a file that you have to download*.

I was trying to duplicate what you initially did. I got the larger root partition like you did. I did not increase the boot as I wanted to duplicate what you did when you installed the FTDI driver. I got the same error message. Just like before, if I run opkg a second time, it completes without an error message. I did not remove any files, just ran opkg a second time.

KurtE, are you sure you didn't get an error message about boot full?

I have contacted FTDI and they have an Edison and will try and duplicate my issue.

EDIT: I notice from the link on installing image that it is filled with comments to ignore the errors, some of which are the ones I am concerned with

 

"Ignore the "Operation not permitted" message, it's harmless in our case."

 

Perhaps I should just ignore this rabbit hole???

 

*https://dl.dropboxusercontent.com/u/54378433/dfu-util/dfu-util.exe https://dl.dropboxusercontent.com/u/54378433/dfu-util/dfu-util.exe

Yes I am sure I did not get any errors when I installed it. The size and fullness of my boot partition was shown in the earlier posting after I did the install.

But again if you are running out of boot space, try doing the resize boot partition like I mentioned. what was(is) happening is the actual size the boot partition is created off of the size of the image instead of the size actually allocated for it. What the steps in Alex's blog does is to redo this partition to be the size actually allocated to it and as you can see in my previous posting, it is now much larger and is now only 16% full.

But again I don't have your cable, what I have is an FTDI rs232 cable, but my guess is it should work, as the FTDI USB info looked the same.

Reply