Configuring serial ports to keep their ttys* location

Configuring serial ports to keep their ttys* location

Baruch Siach baruch at tkos.co.il
Tue Jul 13 13:26:50 IDT 2010


Hi Dotan,

On Tue, Jul 13, 2010 at 09:59:28AM +0300, Dotan Cohen wrote:
> On Ubuntu Linux we have many serial devices connected, they show in
> the udev log like this:
> 
> KERNEL[1279002550.149087] add
> /devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS4 (tty)
> UDEV_LOG=3
> ACTION=add
> DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS4
> SUBSYSTEM=tty
> DEVNAME=ttyS4
> SEQNUM=1212
> MAJOR=4
> MINOR=68
> 
> KERNEL[1279002550.149102] add
> /devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS5 (tty)
> UDEV_LOG=3
> ACTION=add
> DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS5
> SUBSYSTEM=tty
> DEVNAME=ttyS5
> SEQNUM=1213
> MAJOR=4
> MINOR=69
> 
> KERNEL[1279002550.149116] add
> /devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS6 (tty)
> UDEV_LOG=3
> ACTION=add
> DEVPATH=/devices/pci0000:00/0000:00:14.4/0000:03:06.0/tty/ttyS6
> SUBSYSTEM=tty
> DEVNAME=ttyS6
> SEQNUM=1214
> MAJOR=4
> MINOR=70
> 
> 
> The SEQNUM is _not_ constant from boot to boot, therefore configuring
> the mount point per SEQNUM does not work. I am not sure if the
> KERNEL[1279002550.*] number is unique, is it supposed to be?

Seems like a timestamp:

$ date +%s
1279016515

So, it is unique, but probably not what you are looking for.

> If so, which udev rule would configure the mount points to be as they are 
> now on next boot as well?

What's the output of

udevadm info -a -p $(udevadm info -q path -n /dev/ttyS4)
udevadm info -a -p $(udevadm info -q path -n /dev/ttyS5)
udevadm info -a -p $(udevadm info -q path -n /dev/ttyS6)

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the Linux-il mailing list