summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-04-30 16:23:23 -0500
committerMike Fiore <mfiore@multitech.com>2013-04-30 16:23:23 -0500
commitcb2255ea1d0d4e5d8d005fb286bc5d2e059af655 (patch)
treed352112a03c355b6297b31305e6b44bd2f93e227
parent9e0ea3e0e27fc4dcd9da578309aa230875640afb (diff)
udev: fix rules to correctly detect bt and ext_serial interfaces
-rw-r--r--multitech/recipes/udev/udev-165/mtocgd/corecdp.rules51
1 files changed, 44 insertions, 7 deletions
diff --git a/multitech/recipes/udev/udev-165/mtocgd/corecdp.rules b/multitech/recipes/udev/udev-165/mtocgd/corecdp.rules
index a9235e3..60189fb 100644
--- a/multitech/recipes/udev/udev-165/mtocgd/corecdp.rules
+++ b/multitech/recipes/udev/udev-165/mtocgd/corecdp.rules
@@ -1,20 +1,57 @@
-ACTION=="remove", GOTO="mts_end"
-SUBSYSTEM!="tty", GOTO="mts_end"
-KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyS*", GOTO="mts_end"
+ACTION=="remove", GOTO="corecdp_end"
+SUBSYSTEM!="tty", GOTO="corecdp_end"
+KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyS*", GOTO="corecdp_end"
+
+# use serial port by default, allow USB radios to overwrite link
+KERNEL=="ttyS1", SYMLINK+="modem0", OPTIONS+="link_priority=-1"
+KERNEL=="ttyS1", SYMLINK+="modem_at0", OPTIONS+="link_priority=-1"
SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}"
-ENV{ID_IFACE}=="", GOTO="mts_end"
+ENV{ID_IFACE}=="", GOTO="corecdp_end"
+
+# All modem ports
+# H5
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="00", SYMLINK+="modem0"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="02", SYMLINK+="modem1"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="04", SYMLINK+="modem2"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="06", SYMLINK+="modem3"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="08", SYMLINK+="modem4"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="0a", SYMLINK+="modem5"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="0c", SYMLINK+="modem6"
+# EV3
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="00", SYMLINK+="modem0"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="01", SYMLINK+="modem1"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="02", SYMLINK+="modem2"
+ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="03", SYMLINK+="modem3"
+# H4
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="00", SYMLINK+="modem0"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="01", SYMLINK+="modem1"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="02", SYMLINK+="modem2"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="03", SYMLINK+="modem3"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="04", SYMLINK+="modem4"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="05", SYMLINK+="modem5"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="06", SYMLINK+="modem6"
+# EV2
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="0028", SYMLINK+="modem$env{ID_PORT}"
+# AT Command ports
# H5: ttyACM0, ttyACM3
ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="00", SYMLINK+="modem_at0"
ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", ENV{ID_IFACE}=="06", SYMLINK+="modem_at1"
# EV3: ttyUSB2, ttyUSB3
ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="02", SYMLINK+="modem_at0"
ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1010", ENV{ID_IFACE}=="03", SYMLINK+="modem_at1"
+# H4: ttyUSB3, ttyUSB4, ttyUSB5
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="03", SYMLINK+="modem_at0"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="04", SYMLINK+="modem_at1"
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="683c", ENV{ID_IFACE}=="05", SYMLINK+="modem_at2"
+# EV2: ttyUSB0
+ATTRS{idVendor}=="1199", ATTRS{idProduct}=="0028", ENV{ID_PORT}=="0", SYMLINK+="modem_at0"
-# mtr revA: bluetooth on exar chip (ACM0, iface 0)
+# mtocgd3: bluetooth on exar chip (ACM0, iface 0)
ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt"
-# mtr revA: external serial on exar chip (ACM1, iface 2)
+
+# mtocgd3: external serial on exar chip (ACM0, iface 2)
ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial"
-LABEL="mts_end"
+LABEL="corecdp_end"