Udev rule for HSDPA modem

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

 



Hello

I hope this is the correct list to ask this. I am not subscribed, so add
me to cc.

HSDPA modem (usb_serial+option modules) creates three ttyUSB devices.
The first one is the modem interface used for ppp connection. How to
write udev rule which will match to the first ttyUSB device? E.g. if the
devices are ttyUSB1, ttyUSB2 and ttyUSB3, how to create e.g. symlinks
modem0, modem1 and modem2, then it would be guaranteed that the modem0
device would be the first one.

I tried the above rule, but it's problem is that it match only ttyUSB0
and that is not always the HSDPA modem device.

ACTION=="add", \
KERNEL=="ttyUSB0", \
SUBSYSTEMS=="usb", \
ATTRS{idVendor}=="12d1", \
ATTRS{idProduct}=="1003", \
SYMLINK+="modem", \
RUN+="/tmp/udev_test.sh"

Rule below will match all ttyUSB* devices and then the udev_test.sh will
run several times. I would want to run it only once for the first ttyUSB
of the modem.

ACTION=="add", \
KERNEL=="ttyUSB*", \
...
...

-- 
Best Regards, Jar
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux