consistent device name
Erez D
erez0001 at gmail.com
Wed Jan 5 15:21:36 IST 2011
On Wed, Jan 5, 2011 at 2:58 PM, Tzafrir Cohen <tzafrir at cohens.org.il> wrote:
> On Wed, Jan 05, 2011 at 02:25:39PM +0200, Erez D wrote:
> > HI
> >
> > I have 2 identical USB to Serial dongles
> >
> > If I connect them to an XP box, i get assigned a COM port according to
> the
> > usb port i connected to
> > If I connect them to a Linux Box, i get assigned a ttyUSBn port according
> to
> > the order i connected them
> >
> >
> > as i am not always aware of the order i connect them, and it is not
> uniquly
> > defined if the are both connected at boot time,
> > I get the device name swapped every reboot.
> >
> >
> > is there a way to assign a constant device name according to the USB port
> it
> > is connected to and not via the order it is connected
> > (under linux of course)
>
> Use the symlinks under /dev/serial/by-id rather than /dev/ttyUSBn
> directly.
>
> The problem is that the dongles are identical, so /dev/serial/by-id has
only one file which links to the last one inserted.
/dev/serial/by-path has different links, however they are not consistent
either, and change every time i remove and reinsert the dongle
thanks,
erez.
> Or figure out how they are generated from the udev rules, and make your own
> custom constant device names. At first glance this is
> /lib/udev/rules.d/60-persistent-serial.rules on my system.
>
> --
> Tzafrir Cohen | tzafrir at jabber.org | VIM is
> http://tzafrir.org.il | | a Mutt's
> tzafrir at cohens.org.il | | best
> tzafrir at debian.org | | friend
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110105/51042a6a/attachment.html>
More information about the Linux-il
mailing list