Due to hardware layout issues, USB port 1 on an embedded device is experiencing grave difficulties. Therefore, I would like users to use USB port 2 instead. Is there anyway to check which port an external USB device is connected to?

Please note, the embedded device is running a minimal Linux Kernel and does not possess some tools / does not support some commands such as lsusb


Try exploring /sys/bus/usb/devices/.

  • When connected to usb port 1,it creates the directory /sys/bus/usb/devices/usb2/2-1 and when connected to port 2, it creates /sys/bus/usb/devices/usb1/1-1 – H_squared Feb 11 '15 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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