LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mapping USB Dev Files to Ports (https://www.linuxquestions.org/questions/linux-hardware-18/mapping-usb-dev-files-to-ports-168422/)

rg500g 04-10-2004 11:14 AM

Mapping USB Dev Files to Ports
 
I tried to search the forums for this, but USB kept coming up empty. I think I'm asking a question that's been asked a thousand times before, so forgive me. I did click the "Has this been asked?" button and got nothing informative.

I've got a UPS, a PDA cradle and a Logitech Bluetooth hub, all USB connected to SuSE Linux 9.0. SynCE and UPS monitoring software have config scripts that want a device file. This isn't as easy as mapping ttyS0 to COM1, so I'm screwed. I haven't a clue as to hot to figure out what device file name in /dev/usb maps to what physical USB port on my computer, so I can't configure Linux to talk to anything. It's noteworthy that the Bluetooth hub does a great job managing the bluetooth keyboard and mouse, but I'm sure that the hub masquerades itself as a generic HID device, and my kernel has HID support for USB so there you go. No BlueZz Bluetooth stack loaded, which is what I'm really after.

I execute usbview, and it clearly identifies the UPS and my Bluetooth hub (the cradle is an unknown device), but I can't read anything from the returned data that gives me any idea as to whether my UPS is on /dev/usb/USB0, dausb0, auer0, dc2XX0, ez0, or any 1,2,3 logical port sequence permutation of those files.

Basically, where can I find a doc that maps all this out and points me to tools I can use (that are more newbie friendly than usbview) to associate my USB connected devices with specific device files?:confused:

Simon Bridge 04-26-2004 08:53 PM

if you look in the /dev directory you'll probably see a load of ttyusbx, but how these get mapped depends on the drivers. If you are having trouble finding the device, do lsmod as root to make sure all the right usb modules are there.

I sympathise, man and info pages are not much help for usb.

dmesg will show you all the USB hubs and ports and what numbers they are assigned.

Google your query and there'll probably be an online book about it.

My camera, as an example, shows up as a mass storage device on /dev/sda with the mountpoint /mnt/camera, and it is plugged into one of the onboard ports, while the PDA seems to be /dev/ttyusb0

See what I mean.

I doupt there is systematic coding for the usb ports. Instead it will depend on the hardware it is connected to. You'll need the documentation that comes with the software - eg. synce has a great set of documentation that covers just about everything. gphoto helped me locate the camera even though I don't use gphoto. And so forth.

Simon

Simon Bridge 05-14-2004 05:33 PM

Quick note: look in your kernel documentation - usb_serial module description explains much

(xconfig>usb>usb-serial>help)

Simon


All times are GMT -5. The time now is 11:02 AM.