ketan985
January 3rd, 2013, 06:20 AM
I have a modem with 16 ports using for sending SMS.
When it's connected to my Linux machine, I get 16 ports from ttyUSB0 to ttyUSB15. Currently if I remove this modem and attached another it,I get it 16 ports from ttyUSB0 to ttyUSB15.
How can I reserve first 16 ports for specific vendor with creating udev file, so when I remove this modem it and insert another one, it is assigned from ttyUSB16 onwards?
My udev rule file Contents are as follows, which is working but port number changes everytime I replug
Name=="Future Technology Devices International,Ltd",SUBSYSTEMS=="usb", ATTRS{idProduct}=="6011", ATTRS{idVendor}=="0403", SYMLINK="Ketan%b", KERNEL=="ttyUSB[0-15]*", MODE="0666", SYMLINK+="ttyUSB1",
Output
ls -l /dev/K*
lrwxrwxrwx 1 root root 7 2013-01-08 15:09 /dev/Ketan-8.1 -> ttyUSB1
lrwxrwxrwx 1 root root 7 2013-01-08 15:09 /dev/Ketan-8.2 -> ttyUSB5
lrwxrwxrwx 1 root root 8 2013-01-08 15:09 /dev/Ketan-8.3 -> ttyUSB11
lrwxrwxrwx 1 root root 8 2013-01-08 15:09 /dev/Ketan-8.4 -> ttyUSB12
Here ports are 16 but they are divided in Group of four. ttyUSB 1,5,11,12 Values are changing every time I Plug modem.
How I assign fix numbers to that ports ??
When it's connected to my Linux machine, I get 16 ports from ttyUSB0 to ttyUSB15. Currently if I remove this modem and attached another it,I get it 16 ports from ttyUSB0 to ttyUSB15.
How can I reserve first 16 ports for specific vendor with creating udev file, so when I remove this modem it and insert another one, it is assigned from ttyUSB16 onwards?
My udev rule file Contents are as follows, which is working but port number changes everytime I replug
Name=="Future Technology Devices International,Ltd",SUBSYSTEMS=="usb", ATTRS{idProduct}=="6011", ATTRS{idVendor}=="0403", SYMLINK="Ketan%b", KERNEL=="ttyUSB[0-15]*", MODE="0666", SYMLINK+="ttyUSB1",
Output
ls -l /dev/K*
lrwxrwxrwx 1 root root 7 2013-01-08 15:09 /dev/Ketan-8.1 -> ttyUSB1
lrwxrwxrwx 1 root root 7 2013-01-08 15:09 /dev/Ketan-8.2 -> ttyUSB5
lrwxrwxrwx 1 root root 8 2013-01-08 15:09 /dev/Ketan-8.3 -> ttyUSB11
lrwxrwxrwx 1 root root 8 2013-01-08 15:09 /dev/Ketan-8.4 -> ttyUSB12
Here ports are 16 but they are divided in Group of four. ttyUSB 1,5,11,12 Values are changing every time I Plug modem.
How I assign fix numbers to that ports ??