Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i'm using Linux (similar to ubuntu, 2.6.38) and connect multiple network adapters via USB.
i want to find the USB number of where the adapter is currently connected.
- usb-serial devices, for instance, have ttyUSB handlers so i can used udevadm to get its USB location (e.g. '/devices/pci0000:00/0000:00:17.0/0000:01:00.0/0000:02:02.3/usb1/1-1/1-1:1.0/ttyUSB0')
- ethernet devices (and USB-to-ETH adapters) has the 'device' node in /sys/class/net/ethN/device which refers to the device filesystem.

i'm searching for another tricky way to find the same thing for a WiFi USB-dongle i connect.
The WiFi is based on ralink, and i'm using the rt5370sta.ko module to make it work.
so it works, and creates the ra0 interface, but i don't find a way to get it's USB number.

i tried searching ra0 in /sys/devices, but all i get is /sys/devices/virtual/net/ra0 which doesn't help a lot.

is there an offline solution that doesn't require checking dmesg/udev (i less prefer these kind of solutions)?

share|improve this question
    
Will lsusb do? –  terdon Jan 14 '13 at 11:32
    
i can't identify which ra is which when i have more then 1 –  RoeeK Jan 14 '13 at 11:48

1 Answer 1

lsusb | grep ralink or lsusb | grep rt5370 should print the info about the ralink dongle. If that doesn't

return anythin do lsusb | less and go through the list manually...

share|improve this answer
    
in this way, if (and probably will) i have 2 dongles of the same chip then i'll have ra0 and ra1. i can't use lsusb to understand which is which. –  RoeeK Jan 15 '13 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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