posts /

udev and the option umts 3G card #2

Posted Thu 20 Nov 2008 09:07:26 PM CET in

After some days of usage you find udev is ever more complicated to deal with than you initially thought. The inability to check for sysfs attributes more than one parent device away makes it difficult for my usage - so i made it 3 rules to set an appropriate symlink:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6000", \
ATTRS{product}=="Fusion UMTS GPRS WLAN", ENV{fusiongt}="yes"
SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="00", \
ENV{fusiongt}=="yes", ENV{fusiongt_primary}="yes"
SUBSYSTEMS=="tty", ENV{fusiongt_primary}=="yes", SYMLINK+="modem"

The first sets a environment variable if this run is on a Fusion Globetrotter Card. The second one only triggers on the first serial on the Fusion GT Card. And the last sets the symlink for the tty ...