This sounds like a job for UDEV. I have (among other USB devices) a PalmOne Tungsten T5 which uses two usb-serial ports when plugged in, and two usb-storage devices when in "Drive mode". With udev I can create symlinks (and specific device nodes) to which the T5 is connected. Below are lines in /etc/udev/rules.d/10-udev.rules related to my T5. More info on udev can be found here: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
<CODE> BUS="usb-serial", ID="ttyUSB1", DRIVER="visor", OWNER="jonatan", NAME="% k", SYMLINK="pilot pilot1" BUS="usb-serial", ID="ttyUSB0", DRIVER="visor", OWNER="jonatan", NAME="% k", SYMLINK="pilot0" BUS="scsi", DRIVER="sd", SYSFS{model}="G3", SYSFS{vendor}="M-System", SYMLINK="Tungsten0" BUS="scsi", DRIVER="sd", SYSFS{model}="SD512", SYSFS{vendor}="Toshiba", SYMLINK="Tungsten1" </CODE> This creates /dev/pilot, /dev/pilot1, /dev/pilot0 linked to /dev/ttyUSB1 and /dev/ttyUSB0 respectively when the T5 is in "normal mode", and /dev/Tungsten0, /dev/Tungsten1 linked to /dev/sd?1 when the T5 is in "drive mode". Hope this helps! Jonatan On Tue, 2005-05-31 at 03:47 -0400, Greg Lee wrote: > Okay, would you case to enlighten me on how a script would do this? > > Greg > > > -----Original Message----- > > From: karthik.bala [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, May 31, 2005 3:37 AM > > To: 'Greg Lee'; linux-usb-users@lists.sourceforge.net > > Subject: RE: [Linux-usb-users] Assigning devices to > > particular device node > > > > > > A simple script will do that !! :) > > > > Karthik bala guru > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Greg Lee > > Sent: Tuesday, May 31, 2005 4:19 PM > > To: linux-usb-users@lists.sourceforge.net > > Subject: [Linux-usb-users] Assigning devices to particular device node > > > > > > Is it possible to assign USB devices to a particular device > > node? For example, if I want a usbserial based device that > > is plugged into USB port 2 to appear at /dev/usb/ttyUSB1 > > always, even if there is no /dev/usb/ttyUSB0 device, is this > > possible and if so, how? > > > > TIA. > > > > Greg Lee > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Yahoo. > > Introducing Yahoo! Search Developer Network - Create apps > > using Yahoo! Search APIs Find out how you can build Yahoo! > > directly into your own Applications - visit > > http://developer.yahoo.net/?fr=fad-ysdn-ostg-q22005 > > _______________________________________________ > > Linux-usb-users@lists.sourceforge.net > > To unsubscribe, use the last form field at: > > https://lists.sourceforge.net/lists/listinfo/linux-usb-users > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Linux-usb-users@lists.sourceforge.net > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-users ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users