udev rules assign same port name for a modem with 4 ttyUSB ports

I have a dlink DW-157 3g dongle. I am trying to assign the same port to the dongle everytime it boots up by modifying the udev rules file. Since the dongle on boot boots up as a storage media, I have to enter the command below to eject and mount for modem mode and then other command below it to make use of the ttyUSB ports of the modem for running a dial up modem.

After entering these, sudo dmesg| grep ttyUSB appears as:

The actual port on which I can use the modem for dial up is ttyUSB1. So, I'm trying to assign ttyUSB1 to d_uart in my udev rules file:

But what happens is d_uart gets assigned to ttyUSB4. What do I do to assign it to the first port always (ttyUSB1 in this case) ?

Also, the output of the command for ttyUSB1,ttyUSB2,ttyUSB3 and ttyUSB4 for the comnand below:

is the same.

ATTRS{serial}=="3f980000.usb"

Also, output of command ls -l /dev/d_uart

lsusb output:

Output of udevadm info -n /dev/ttyUSB2:

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论