On Tue, 2005-05-31 at 09:06 -0400, Greg Lee wrote: > Jonathon - > > Thanks for pointing UDEV out, however, I don't think I can use it because I > must run a 2.4 kernel (no support yet for the chip I am using on 2.6). In > addition, I don't think it would help me since the main problem is that the > USB devices do not appear to the bus at the same time. This means > sometimes the device plugged into port 1 will appear after the device > plugged into port 2. Since the ttyUSBx device nodes are assigned by order > of appearance this means I cannot rely on the device nodes to tell me which > slot the device is plugged into.
Actually udev can create device nodes based on device information such as USB ID or type of device or port it was plugged in to. This doesn't help if you don't use 2.6 anyway. What device are you using? I'm asking because I'm interested in buying a usb-serial adapter myself that will work with Linux. Jonatan > > Any other suggestions? Are there some scripts that are run at device > insertion time/power-on time that could be used to create symlinks based on > parsing information available in /proc/bus/usb/devices? > > Greg > > > -----Original Message----- > > From: Jonatan Åkerlind [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, May 31, 2005 7:42 AM > > To: linux-usb-users@lists.sourceforge.net > > Cc: Greg Lee > > Subject: RE: [Linux-usb-users] Assigning devices to > > particular device node > > > > > > 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 -- Jonatan Åkerlind ------------------------------------------------------- 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