udev rules update
cover udev rules update
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(-)
PATCH 1/4 udevng.c: Switch aux channel and modem channel for Speedup dongles
--- plugins/udevng.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
plugins/udevng.c +3 -3
@@ -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; } }
Signature · 1 line
1.7.1
PATCH 2/4 udevng.c: Assign modem channel to ttyUSB0 for speedup cdma dongles
In reply to Philippe Nunes--- plugins/udevng.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
plugins/udevng.c +6 -1
@@ -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;
Signature · 1 line
1.7.1
PATCH 3/4 udev: Add rules to support ZTE MF668 dongle
In reply to Philippe Nunes--- plugins/ofono.rules | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
plugins/ofono.rules +9 -0
@@ -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"
Signature · 1 line
1.7.1
PATCH 4/4 udev: Add rules to support ZTE MF190 dongle
In reply to Philippe Nunes--- plugins/ofono.rules | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
plugins/ofono.rules +3 -0
@@ -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"
Signature · 1 line
1.7.1