For dongle ZTE MF190, 6 interfaces are present and we shall use the interface ttyUSB4 for
modem channel.
But to not break the support of ZTE modems with 5 interfaces (which are using the 4th one
for PPP, like K3570), I decided finally to add a specific rule.
I added also a specific rule for the dongle ZTE MF668 as the modem channel is not on the
latest interface.
For Speedup dongles, I switched aux channel and modem channel (should solve the bug
#20553).
For Speedup cdma dongles, modem channel is set to ttyUSB0.
Philippe Nunes (4):
udevng.c: Switch aux channel and modem channel for Speedup dongles
udevng.c: Assign modem channel to ttyUSB0 for speedup cdma dongles
udev: Add rules to support ZTE MF668 dongle
udev: Add rules to support ZTE MF190 dongle
plugins/ofono.rules | 12 ++++++++++++
plugins/udevng.c | 13 +++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
Show replies by date
---
plugins/udevng.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 1365bd1..8578604 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -312,11 +312,11 @@ static gboolean setup_speedup(struct modem_info *modem)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
if (g_strcmp0(info->number, "01") == 0)
- aux = info->devnode;
- else if (g_strcmp0(info->number, "02") == 0)
mdm = info->devnode;
+ else if (g_strcmp0(info->number, "02") == 0)
+ aux = info->devnode;
else if (g_strcmp0(info->number, "03") == 0)
- mdm = info->devnode;
+ aux = info->devnode;
}
}
--
1.7.1
---
plugins/udevng.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 8578604..ae76317 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -311,7 +311,12 @@ static gboolean setup_speedup(struct modem_info *modem)
if (aux != NULL)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
- if (g_strcmp0(info->number, "01") == 0)
+ if (g_strcmp0(info->number, "00") == 0 &&
+ g_strcmp0(modem->driver,
+ "speedupcdma") == 0)
+ mdm = info->devnode;
+ else if (g_strcmp0(info->number, "01") == 0 &&
+ mdm == NULL)
mdm = info->devnode;
else if (g_strcmp0(info->number, "02") == 0)
aux = info->devnode;
--
1.7.1
---
plugins/ofono.rules | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index 30a1b7e..c7fac57 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -15,6 +15,15 @@ KERNEL=="shrm0", ENV{OFONO_DRIVER}="u8500"
LABEL="ofono_isi_end"
+SUBSYSTEM!="tty", GOTO="ofono_tty_end"
+KERNEL!="ttyUSB[0-9]*", GOTO="ofono_tty_end"
+
+# ZTE
+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0017",
ENV{ID_USB_INTERFACE_NUM}=="02", ENV{OFONO_LABEL}="modem"
+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0017",
ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_LABEL}="aux"
+
+LABEL="ofono_tty_end"
+
SUBSYSTEM!="usb", GOTO="ofono_end"
ENV{DEVTYPE}!="usb_device", GOTO="ofono_end"
--
1.7.1
---
plugins/ofono.rules | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index c7fac57..079db07 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -22,6 +22,9 @@ KERNEL!="ttyUSB[0-9]*", GOTO="ofono_tty_end"
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0017",
ENV{ID_USB_INTERFACE_NUM}=="02", ENV{OFONO_LABEL}="modem"
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0017",
ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_LABEL}="aux"
+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0124",
ENV{ID_USB_INTERFACE_NUM}=="04", ENV{OFONO_LABEL}="modem"
+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0124",
ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_LABEL}="aux"
+
LABEL="ofono_tty_end"
SUBSYSTEM!="usb", GOTO="ofono_end"
--
1.7.1