Changes between Version 26 and Version 27 of USB


Ignore:
Timestamp:
12/04/2025 05:21:57 PM (39 hours ago)
Author:
Ryan Erbstoesser
Comment:

add otg cable adapter troubleshooting

Legend:

Unmodified
Added
Removed
Modified
  • USB

    v26 v27  
    393393echo "1bc7 110a" > /sys/bus/usb/drivers/qmi_wwan/new_id
    394394}}}
     395
     396= USB Device / Adapter Troubleshooting
     397
     398Some basic troubleshooting steps to make sure you have a proper OTG-to-Host cable (Micro-B to Type-A adapter) and then VBUS.
     399
     400The ID pin on OTG to Host cable (provided in our dev-kits) is grounded where-as the pin is floating on an OTG to device cable. Some devices like USB headphones are a USB device requiring an OTG to Host cable. When the ID pin is grounded the USB host controller will enumerate on the bus (regardless of having an actual USB device plugged in) and you first should verify that you see this occur.
     401
     402{{{
     403# start out by enabling kernel messages to the console so we can see the enumeration occur
     404echo 8 > /proc/sys/kernel/printk
     405}}}
     406{{{
     407# now with no cable plugged into the OTG connector
     408lsusb
     409Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
     410Bus 001 Device 002: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
     411Bus 001 Device 003: ID 0424:2740 Microchip Technology, Inc. (formerly SMSC) Hub Controller
     412^^^ the first device is the controller for USB1 which goes to the USB hub (not the front panel connector)
     413^^^ there is only one 1d6b:0002 device enumerated which is USB1 as the USB2 root hub should not yet be enumerated
     414}}}
     415
     416{{{
     417# now plug in the OTG to host cable (without anything plugged into the other end) and you should see the USB host controller enumerate because the ID pin gets grounded
     418[  152.460804] ci_hdrc ci_hdrc.0: EHCI Host Controller
     419[  152.465742] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2
     420[  152.485200] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
     421[  152.490877] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
     422[  152.499172] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
     423[  152.500834] systemd-journald[147]: sd-device: Failed to chase symlinks in "/sys/dev/char/189:128".
     424[  152.506424] usb usb2: Product: EHCI Host Controller
     425[  152.515775] systemd-journald[147]: sd-device: Failed to chase symlinks in "/sys/dev/char/189:128".
     426[  152.520279] usb usb2: Manufacturer: Linux 6.12.0-00037-g7a3ed01ed94e ehci_hcd
     427[  152.520286] usb usb2: SerialNumber: ci_hdrc.0
     428[  152.529855] systemd-journald[147]: sd-device: Failed to chase symlinks in "/sys/dev/char/189:128".
     429[  152.537747] hub 2-0:1.0: USB hub found
     430[  152.553610] hub 2-0:1.0: 1 port detected
     431^^^ the controller enumerates
     432^^^ if this does not occur then you have a faulty/incompatible OTG-to-Host cable that doesn't GND the ID pin or there is a fault with the Gateworks board
     433
     434lsusb
     435Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
     436Bus 001 Device 002: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
     437Bus 001 Device 003: ID 0424:2740 Microchip Technology, Inc. (formerly SMSC) Hub Controller
     438Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
     439^^^ now we have both 1d6b:0002 root hubs
     440}}}
     441
     442{{{
     443# now, plug a USB device into the type-A socket on the OTG-to-Host cable and it should enumerate; here is a Gateworks JTAG adapter:
     444[  778.779644] usb 2-1: Manufacturer: Gateworks
     445[  778.779651] usb 2-1: SerialNumber: GW16042-D4
     446[  778.824160] usbcore: registered new interface driver usbserial_generic
     447[  778.830994] usbserial: USB Serial support registered for generic
     448[  778.849159] usbcore: registered new interface driver ftdi_sio
     449[  778.855051] usbserial: USB Serial support registered for FTDI USB Serial Device
     450[  778.862576] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
     451[  778.869425] usb 2-1: Detected FT2232H
     452[  778.873673] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
     453[  778.881092] ftdi_sio 2-1:1.1: FTDI USB Serial Device converter detected
     454[  778.887940] usb 2-1: Detected FT2232H
     455[  778.892161] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1
     456^^^ if you see no device enumerate then we need to question of VBUS is getting enabled; you can check this with a voltmeter or use a device that has an LED on it indicating bus voltage such as a Gateworks JTAG adapter which has a green LED on it indicating vbus is present
     457
     458lsusb
     459Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
     460Bus 001 Device 002: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
     461Bus 001 Device 003: ID 0424:2740 Microchip Technology, Inc. (formerly SMSC) Hub Controller
     462Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
     463Bus 002 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
     464}}}