4
votes

I have connected a android mobile phone to the Odroid through usb.

Now when I do 'lsusb' on Odroid then I get following output..

Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 0424:2514
Bus 001 Device 004: ID 0bdb:190d
Bus 001 Device 005: ID 1004:618e

sys/bus/usb/devices list down as follows,

usb1
1-0:1.0
usb2
2-0:1.0
1-1
1-1:1.0
1-1.1
1-1.1:1.0
1-1.1:1.1
1-1.1:1.2
1-1.1:1.3
1-1.1:1.4
1-1.1:1.5

Now i needed to know which one is built-in and which one is connected one...?

manually checking vendor-id and product id, I could tell that the last one in the lsusb is my android phone and similarly checking the "uevent" file inside "2-0:1.0" directory.

Programmatically i am parsing bDeviceClass, product, idVendor, product, manufacturer and other things to get the info.

But is there any flag or some extra info in files which tells me which usb is connected and which usb is built-in ?

Hope my question is clear.

1
Do you get anything on lsusb -v? - bgs
did u find any solution to this issue.plz help me - Neha Shukla

1 Answers

2
votes

You can use output from dmesg to find out which is the connected one

   $ dmesg | grep usb
    [225415.950096] usb 1-1: new high speed USB device using ehci_hcd and address 10
    [225416.104344] usb 1-1: New USB device found, idVendor=0fce, idProduct=2149
    [225416.104358] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [225416.104369] usb 1-1: Product: SEMC HSUSB Device
    [225416.104376] usb 1-1: Manufacturer: SEMC
    [225416.104383] usb 1-1: SerialNumber: 43423531315133584454
    [225416.109151] scsi7 : usb-storage 1-1:1.1
    [226418.198922] usb 1-1: USB disconnect, address 10