I'm using a WNR3500L in a lab environment where I have 7 FTDI usb->serial devices sitting off of a usb-hub connected to the WRN3500L. Everything is working ok except that the devices are moving around based on which device gets enumerated 1st. Since I'm using ser2net I'd like to have each device enumerate to a constant name based on the port of the usb hub that it is connected to so I can directly map devices by name. Any help? I've seen a lot about hotplug scripts or udev rules, has anyone done anything like this?
Date: 02 May 2011 21:50
Number of posts: 6
RSS: New posts
Right. Can't do it. Not easily at least. You said it accurately right here: "the devices are moving around based on which device gets enumerated 1st."
That's the main reason why we enhanced the USB disk hotplug code to use labels instead of usb location.
You are going to have to write a cumbersome script to parse /proc/bus/usb/devices if you want names according to port (or something else) instead of enumeration order. When/if you figure it out, remember to make a writeup with example script/code and upload it to the documentation page.
Have a look with "lsusb -v" (using a PC or Optware's lsusb). If the FTDI silicons are programmed with different serial numbers (as opposed to constant PID/VID), it might be easier for you to obtain a fixed order of devices.
Bummer. I guess I'll try to write up a script that identifies the location and symlinks a controlled name to the corresponding ttyUSBx. Any links with good information about deciphering /proc/bus/usb/devices and how it relates to physical location? Otherwise I'll muddle through it on my own :)
@Rasky: Unfortunately the devices I'm hooking up are custom circuit boards and they don't have different serial number programmed in to the FTDI chips
Could you give any quick tips for getting the usbserial devices working? I've got one plugged into my ASUS RT-N17 but can't figure out what /dev to open to talk to it. I tried loading the usbserial and ftdi_sio modules manually and still I don't see an entry in /dev that makes sense. Thanks for any tips.
@purdueee as far as I can tell, there is no way a USB host chip can discern between physical USB ports, it is a basic design decision of USB. It's the USB devices that should expose a way to identify themselves. If you have identical devices that did not use different serial numbers (as specified in the USB standard), you are out of luck.