iurly
Posts: 19
Joined: Sun May 14, 2017 10:50 pm

USB device SOMETIMES not recognized at boot

Thu Aug 31, 2017 1:29 pm

Hi,

I'm seeing some weird issues with a CP210x connected to a port of the Raspberry PI 3:
After a powercycle, it sometimes happens (about 1% of the times?) that the device is not enumerated.
I just don'see it in dmesg. The red power LED is on, but lsusb just doesn't see it:

Code: Select all

pi@rpi3-10:/sys $ lsusb -tv
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Even if I try resetting the hub, I can't get much further:

Code: Select all

root@rpi3-10:/sys/bus/usb/drivers# echo 1-1:1.0 > hub/unbind 

pi@rpi3-10:/sys/bus/usb/drivers $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=/0p, 480M

root@rpi3-10:/sys/bus/usb/drivers/hub# echo 1-1:1.0 > bind

pi@rpi3-10:/sys/bus/usb/drivers/hub $ lsusb
Bus 001 Device 006: ID 18a5:0245 Verbatim, Ltd 
Bus 001 Device 005: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
So the other two devices get correctly detected but my CP210x doesn't.

After a software reboot, everything works just fine:

Code: Select all

pi@rpi3-10:/sys $ lsusb -tv
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
I haven't tried unplugging/replugging the device the last time around; I vaguely recall it worked the last time I tried it but I can't be 100% sure.

Notice how I have the following settings and kernel version:

Code: Select all

pi@rpi3-10:~ $ uname -a
Linux rpi3-10 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux

pi@rpi3-10:~ $ cat /proc/cmdline 
8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0x64aed3f3 smsc95xx.macaddr=B8:27:EB:AE:D3:F3 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait dwc_otg.nak_holdoff=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x7
The esoteric dwc_otg settings were necessary to fix some reliability issues when streaming data at 2.000.000 bps over the UART (the CP210x is a full-speed device).
See https://www.raspberrypi.org/documentati ... /README.md and https://bitcointalk.org/index.php?topic=843788.0

I haven't tested any other Full-Speed device but I might assume they may fall into the same category.

Any ideas?
Thanks

User avatar
DougieLawson
Posts: 36331
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: USB device SOMETIMES not recognized at boot

Thu Aug 31, 2017 4:57 pm

Grab a factory fresh SDCard, build a copy of Raspbian Stretch (or NOOBS 2.4.3) on it. Boot that and see what happens. Your current system is a bit ancient and there's a strong possiblity that new things in Stretch have fixed your failure.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Canedje
Posts: 263
Joined: Thu Mar 26, 2015 7:18 am

Re: USB device SOMETIMES not recognized at boot

Fri Sep 01, 2017 6:52 am

I'm not sure about the solution I tell now, but in the past I had the same problem.
In my case at the end it proved that the connector of the USB cable was not 100% right.
I did resolder the connector the USB connector from the cable. After that I had no problems anymore.

Return to “Troubleshooting”