Can't identify Physical USB ports for devices attached before power up.
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't identify Physical USB ports for devices attached before power up.
Does anyone know of a way to get Linux (Debian Stretch) to check if there are any USB devices connected to it? Specifically if the devices have been attached from power up. The devices in question are a pair of Nano compatibles. If I plug them in after the system (RPi) is powered up, all is fine and I can see what ports they are attached to.
However, if they are plugged into the RPi before power up, there is no indication. Perhaps there is a way to get Linux to re-boot (re-power) the USB ports.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
with plugging in the Nanos after the RPI has powered up:
Bus 001 Device 012: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 013: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I'm not sure of the Nano manufacturer but they were bought through buyapi.ca and are listed as "ATMEGA328P-20AU Arduino Compatible Nano V3.0 R3 Board" I am using a Raspberry Pi 3 Model B and am powering it with a 3 ampere 5 volt power supply.
I just tried a reboot with just a single Nano attached, and get the same situation. Only after I disconnect and reconnect the Nano is it seen.
pi@raspberrypi:~ $ lsusb
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ lsusb
Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I too suspect that the issue is the bus is being read before enough time has passed on power up.
Could indeed be power/current issue.
Could be you need to put in a wait timer to scan usb at some place on boot.
Thanks. I'm not sure how to do that, but it seems to be worthwhile checking out. If the RPi tests for them before they are alive, it seems likely they would be overlooked. I'll also try to get power to the Nanos sooner. Right now, power is supplied by the USB bus. If I powered them directly from the power supply (at the same time the RPi is powered up) they may be awake in time.
Moved: This thread is more suitable in <Linux - Embedded & Single-board computer> and has been moved accordingly to help your thread/question get the exposure it deserves.
I had been considering that a power-up race condition was my issue, but even with the two Nano’s powered-up in advance of the RPi boot they are still not identified (lsusb).
However, in looking (read “with open eyes”) at the dmesg output I find that the RPi has been reporting an “error -32” when attempting to connect to them. Would you know where to find these error codes?
[ 1.121548] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.361811] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 1.361826] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.681576] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.811984] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 1.812025] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.001576] usb 1-1.5: new full-speed USB device number 4 using dwc_otg
[ 2.101542] usb 1-1.5: device descriptor read/64, error -32
[ 2.321548] usb 1-1.5: device descriptor read/64, error -32
[ 2.551627] usb 1-1.5: new full-speed USB device number 5 using dwc_otg
[ 2.651596] usb 1-1.5: device descriptor read/64, error -32
[ 2.871550] usb 1-1.5: device descriptor read/64, error -32
[ 2.991653] usb 1-1-port5: attempt power cycle
[ 3.651630] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[ 4.097919] usb 1-1.5: device not accepting address 6, error -32
[ 4.191621] usb 1-1.5: new full-speed USB device number 7 using dwc_otg
[ 4.637116] usb 1-1.5: device not accepting address 7, error -32
[ 4.637293] usb 1-1-port5: unable to enumerate USB device
The problem seems to be corrected as you did to insert it later. Many Pi users report same problem. One web page suggested that once the usb port gets to an overcurrent you do need to power back down.
I don't know how your powered test was set up.
It may be possible to re-power or re-scan usb bus after boot.
The last time I tested. I had a 5V 3A power supply on the RPi and a separate 6V 2A supply on the nano(s), and it still failed (first with 2 Nanos then with a single Nano). Gonna take a look through a Python USB library on the weekend and see if it has anything to help.
So… I don’t have a root cause, but I might have a culprit. I have repeated my testing on:
• Arduino Uno
• Arduino Micro
• Adafruit Trinket
• Adafruit Pro Trinket
• OSEPP FTDI adapter
And all operated correctly. Which is to say, the RPi found them on boot up. No extra power supplies were necessary. Another POI, an OSEPP Nano also failed to be recognized on boot up. So, it may be a Nano issue. I will acquire an authentic Nano to test and let everyone know.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.