Hello everyone,
I am using a BeagleBone Black to interface between a weather station and radio modem. I am using two USB to serial converters and am experiencing USB system crashes which I have not yet been able to solve. I am thinking there may be some type of a conflict with the drivers when using both adapters. Details below...
--Hardware--
I am using an FTDI CHIPI-X10 USB to RS232 Serial converter to connect with the radio modem and an FTDI USB-RS232-WE-1800-BT_0.0 Wire Ended USB to RS232 Serial converter to connect to the weather station. Both converters plug into a Tripp Lite U225-004-R 4-port USB hub, which is then connected to the BeagleBone Black USB connection.
Both the weather station and radio/modem are externally powered so the only USB power consumption is that of each of the converters and the 4-port hub. The hub was originally powered directly from the BeagleBone Black but I am now powering it externally.
I believe the BBB is a Revision B board but I will have to double check that. The board is powered from a 12 volt step down converter which I adjusted to 5 volt output. With the system powered I measure 4.98 volt to 5.00 volt with a multi-meter. I have not measured the current flow to the BBB, but I designed the power supply system, including the step down converter, to handle the anticipated load.
--Software--
I am running Debian 8 (Jessie) on the internal eMMC storage. The image was the newest when I downloaded it around May. The OS is up to date as of Monday using apt-get upgrade. The kernel has also been upgraded from 4.4.54-ti-r53 to 4.9.44-ti-r55 in the hopes of correcting the issue. I have disabled the software that directly talks to the radio modem, and am using a combination of a python script I wrote and minicom to read data from the weather station.
--Issue and Troubleshooting--
With both converters connected, when reading the 1Hz rate data sent from the weather station, the USB system will crash within 2 seconds to 2.5 hours with a ftdi_sio error shown in dmesg. The error most often is: "ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32". After upgrading the kernel the error was different, similar to "failed to get modem status: -71". As I have switched around the order in which the converters are plugged into the hub the ttyUSBx port the crash occurs on changes, but I believe it is always the one connected to the weather station as that is the one always being accessed for testing.
In my online research I have found many mention of the "usb_serial_generic_read_bulk_callback" fault in Raspberry Pi related discussions and the most often suggested and working fix is to add the parameter "dwc_otg.speed=1" to /boot/cmdline.txt which forces USB to revert back to USB1.1. Although I have no need for USB2.0 speeds, it appears this is not able to be done with the BBB, in addition to /boot/cmdline.txt not existing.
There are also many instances of current draw being too great and causing the issue. Though doubtful because of a <~200mA calculated current draw, I switched to externally powering the USB hub. After doing this I am no longer seeing the "-71" fault and only seeing the original "ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32" one.
When I was first building and testing the system on my bench I had what turns out to be the same issue, although I did not pursue it then. At the time I was using a Prolific chip based USB to Serial adapter for the radio modem which I suspected was the culprit. Once I replaced it with the CHIPI-X10 I had no further trouble until installing the entire system this weekend.
In my troubleshooting I have completely disconnected the CHIPI-X10, which is connected to the radio modem, and accessed the converter connected to the weather station. In this test I was able to read the data for nearly 24 hours without issue until I stopped it for more troubleshooting. I have not conducted a similar test with the adapters reversed, although I saw no signs of any issue during my earlier bench testing.
I have provided the system information below. The dmesg output was gathered after the crash occurred and I filtered it to show only USB related lines.
========
uname -a
========
Linux norman 4.9.44-ti-r55 #1 SMP PREEMPT Fri Aug 18 00:16:25 UTC 2017 armv7l GNU/Linux
========
lsusb
========
Bus 001 Device 004: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
========
lsusb -v
========
Bus 001 Device 004: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6015 Bridge(I2C/SPI/UART/FIFO)
bcdDevice 10.00
iManufacturer 1 FTDI
iProduct 2 Chipi-X
iSerial 3 FTV8G1V7
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 90mA
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 Chipi-X
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)
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
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 6.00
iManufacturer 1 FTDI
iProduct 2 USB-RS232 Cable
iSerial 3 FT0AMSW7
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 300mA
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-RS232 Cable
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)
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1a40 Terminus Technology Inc.
idProduct 0x0101 4-Port HUB
bcdDevice 1.11
iManufacturer 0
iProduct 1 USB 2.0 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x0000
Ganged power switching
Ganged overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0103 power enable connect
Port 3: 0000.0103 power enable connect
Port 4: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.09
iManufacturer 3 Linux 4.9.44-ti-r55 musb-hcd
iProduct 2 MUSB HDRC host driver
iSerial 1 musb-hdrc.1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 1
wHubCharacteristic 0x0011
Per-port power switching
No overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 5 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x02
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0507 highspeed power suspend enable connect
Device Status: 0x0001
Self Powered
========
dmesg (Only USB related items)
========
[ 24.112116] usbcore: registered new interface driver usbserial
[ 24.112211] usbcore: registered new interface driver usbserial_generic
[ 24.112320] usbserial: USB Serial support registered for generic
[ 24.164740] usbcore: registered new interface driver ftdi_sio
[ 24.164857] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 24.165130] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[ 24.165370] usb 1-1.2: Detected FT232RL
[ 24.196446] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 24.203043] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 24.203360] usb 1-1.3: Detected FT-X
[ 24.215399] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB1
...
[ 316.858089] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
A possible next step would be to unplug the adapter to the weather station and access only the radio modem to eliminate a possible issue with the CHIPI-X10 itself. To date I have only seen the issue arise when both adapters are connected to the BBB.
A current test I am running is with both adapters connected, but leaving the system sit and not accessing either connection. I anticipate this will not produce the either, but I've known my intuition to be wrong before. I'm also grasping for a solution.
Thank you in advance for any help, and please reply with any requests for additional information or troubleshooting steps you may have.