1

I have a USB-RS232 converter with an FTDI FT232R chip (VID:PID=0403:6001) that is detected and mapped to /dev/ttyUSBx on boot of the RPi 3B, but does not map to /dev/ttyUSBx if it is simply plugged in (or unplugged/replugged).

Anyone seen this, or have any idea what to look at to debug? Any hints or help is greatly appreciated.

I've tried adding udev rules based on what I've seen on here and other places on the web, to no avail. No additional udev rules were in place when the information below was captured.

I have done

  • apt-get update
  • apt-get upgrade
  • apt-get dist-upgrade
  • rpi-update
  • multiple reboots

The info for my system

root@PI-Wiggs1:/home/owner# uname -a
Linux PI-Wiggs1 4.14.73-v7+ #1148 SMP Mon Oct 1 16:57:50 BST 2018 armv7l GNU/Linux

lsusb is the same both before and after the unplug (only shown once here)

root@PI-Wiggs1:/home/owner# lsusb -v

Bus 001 Device 005: 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 FT232R USB UART
  iSerial                 3 AI06JVSG
  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 FT232R USB UART
      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)

dmesg on boot shows USB-serial converter attaching to /dev/ttyUSB0

root@PI-Wiggs1:/home/owner# dmesg
[    2.081483] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
[    2.249063] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[    2.252015] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.254856] usb 1-1.3: Product: FT232R USB UART
[    2.257580] usb 1-1.3: Manufacturer: FTDI
[    2.260269] usb 1-1.3: SerialNumber: AI06JVSG
...
[    3.790404] usbcore: registered new interface driver usbserial
[    3.790467] usbcore: registered new interface driver usbserial_generic
[    3.790526] usbserial: USB Serial support registered for generic
...
[    3.838772] usbcore: registered new interface driver ftdi_sio
[    3.838843] usbserial: USB Serial support registered for FTDI USB Serial Device
[    3.839163] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[    3.839301] usb 1-1.3: Detected FT232RL
[    3.840604] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

After boot a driver is detected and assigned

root@PI-Wiggs1:/home/owner# cat /sys/kernel/debug/usb/devices
...
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=AI06JVSG
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

When I unplug and replug the USB cable ttyUSB0 is disconnected, but not reconnected

root@PI-Wiggs1:/home/owner# tail -f /var/log/messages
...
Oct  4 16:13:21 PI-Wiggs1 kernel: [  865.899279] usb 1-1.3: USB disconnect, device number 4
Oct  4 16:13:21 PI-Wiggs1 kernel: [  865.899917] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
Oct  4 16:13:21 PI-Wiggs1 kernel: [  865.900014] ftdi_sio 1-1.3:1.0: device disconnected
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.545201] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.703944] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.703957] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.703965] usb 1-1.3: Product: FT232R USB UART
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.703974] usb 1-1.3: Manufacturer: FTDI
Oct  4 16:13:26 PI-Wiggs1 kernel: [  870.703982] usb 1-1.3: SerialNumber: AI06JVSG

After the unplug/plug, Driver=(none)

root@PI-Wiggs1:/home/owner# cat /sys/kernel/debug/usb/devices
...
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  5 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=AI06JVSG
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

1 Answer 1

1

Just needed to do a little more looking. Didn't realize that VirtualHere (VH) was running on the Pi. It uses the USB ports in a different way. The /dev/ttyUSBx mapping on boot occurs before the VirtualHere service starts up. Once it was up and running plug and unplug works for VH, but no /dev/ttyUSBx mappings. Stop the VH server and the mapping resumes on unplug/plug.

1
  • As you've found your own answer you can accept your own answer as the answer Commented Jun 12, 2019 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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