[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Stic device naming with udev, help please



On Sat, Nov 15, 2008 at 07:21:59 -0600, Nate Bargmann wrote:
> * Rob Starling [2008 Nov 15 03:10 -0600]:

[...]

> > try naming them something interesting so you're not competing
> > with the auto-generated numbered ones.  (you didn't remove the
> > existing rules, did you?)
> > 
> > "tty_dongleA" and "tty_dongleB" maybe?
> 
> That seemed like a good idea.  So I modified my rules file as follows:
> 
> # Setup Prolific Technology Inc. USB-Serial Controller dongles for statice names
> KERNEL=="ttyUSB0", SUBSYSTEMS=="usb-serial", ATTRS{busnum}=="6", ATTRS{devnum}=="3", DRIVERS=="pl2303", SYMLINK+="tty_dgl0"
> KERNEL=="ttyUSB1", SUBSYSTEMS=="usb-serial", ATTRS{busnum}=="7", ATTRS{devnum}=="5", DRIVERS=="pl2303", SYMLINK+="tty_dgl1"
> 
> and no symlinks were created although /dev/ttyUSB0 and /dev/ttyUSB1
> exist and they came up in the order that I want (probably will change
> on the next restart).

I would try it like this:

KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{busnum}=="6", ATTRS{devnum}=="3", SYMLINK+="tty_dgl0"
KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{busnum}=="7", ATTRS{devnum}=="5", SYMLINK+="tty_dgl1"

After you change the rules, restart udev (!) and test what happens:

udevtest $(udevinfo --query=path --name /dev/usb/ttyUSB0) | grep -E 'get_name|symlink'

If this is OK then you can try if it also works during boot.

I have no experience with usb serial modems; there might be a more
robust way to ensure deterministic identification, but I need to see the
full "udevinfo -a ..." output to come up with further proposals.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


Reply to: