On Tue, 20 Jun 2006 14:35:28 -0500 Ken Cobler wrote:

> This might be off topic, but, I have been scouring the web with little 
> luck in finding what I am looking for.
> 
> USB enumeration and mapping to dev fs.  Can this be controlled in some 
> way (through a script) ?

You don't say what kernel version you are using, but devfs is
deprecated and there are patches around that remove it from the
latest kernel tree.

For 2.6.recent, what you want to use is called 'udev'.
It comes with most current Linux distros.  You can add rules
to it for device naming if you need to do that.

See http://www.reactivated.net/writing_udev_rules.html
and http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html


> The problem:  I have an application I have developed that requires two 
> USB HID devices.  Based upon which USB port the device is physically 
> plugged into, the device may appear as /dev/usb/hid/hid0 or 
> /dev/usb/hid/hid1.
> 
> It would be easier for configuration to mandate that the first device be 
> plugged into port /dev/usb/hid0, and the second device plugged into port 
> /dev/usb/hid1.
> 
> However, since I cannot control users, they may plug the devices in 
> different ports and still expect the software to find the device.
> 
> I also experience this problem with printers.  When I have 2 USB printer 
> hooked up to a computer, first printer is /dev/usb/lp0, the second 
> printer is /dev/usb/lp1.   If the application is expecting to print 
> something on the first printer, I need the printer to be connected to 
> /dev/usb/lp0.  But, depending on how the user configures the printers to 
> the computer, the correct printer may or may not be /dev/usb/lp0.
> 
> Any suggestions ?
> 
> Ken Cobler

---
~Randy


_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to