* [PATCH v3 1/5] udev: Add rules to support ZTE MF668 dongle
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
@ 2011-08-31 9:26 ` Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 2/5] udev: Add rules to support ZTE MF190 dongle Philippe Nunes
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2011-08-31 9:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 2/5] udev: Add rules to support ZTE MF190 dongle
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 1/5] udev: Add rules to support ZTE MF668 dongle Philippe Nunes
@ 2011-08-31 9:26 ` Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 3/5] udevng.c: tty assignment according OFONO_LABEL should take precedence Philippe Nunes
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2011-08-31 9:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 3/5] udevng.c: tty assignment according OFONO_LABEL should take precedence
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 1/5] udev: Add rules to support ZTE MF668 dongle Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 2/5] udev: Add rules to support ZTE MF190 dongle Philippe Nunes
@ 2011-08-31 9:26 ` Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 4/5] udev: Add rules to support Speedup 7300 dongle Philippe Nunes
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2011-08-31 9:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 4855 bytes --]
---
plugins/udevng.c | 61 +++++++++++++++++++++++++++++++++--------------------
1 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 1365bd1..e2a5059 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -235,6 +235,7 @@ static gboolean setup_sierra(struct modem_info *modem)
static gboolean setup_huawei(struct modem_info *modem)
{
const char *mdm = NULL, *pcui = NULL, *diag = NULL;
+ const char *default_pcui = NULL;
GSList *list;
DBG("%s", modem->syspath);
@@ -264,19 +265,24 @@ static gboolean setup_huawei(struct modem_info *modem)
if (mdm != NULL && pcui != NULL)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
- if (g_strcmp0(info->number, "00") == 0)
+ if (mdm == NULL && g_strcmp0(info->number, "00") == 0)
mdm = info->devnode;
- else if (g_strcmp0(info->number, "01") == 0)
- pcui = info->devnode;
- else if (g_strcmp0(info->number, "02") == 0)
- pcui = info->devnode;
- else if (g_strcmp0(info->number, "03") == 0)
- pcui = info->devnode;
- else if (g_strcmp0(info->number, "04") == 0)
- pcui = info->devnode;
+ else if (pcui == NULL) {
+ if (g_strcmp0(info->number, "01") == 0)
+ default_pcui = info->devnode;
+ else if (g_strcmp0(info->number, "02") == 0)
+ default_pcui = info->devnode;
+ else if (g_strcmp0(info->number, "03") == 0)
+ default_pcui = info->devnode;
+ else if (g_strcmp0(info->number, "04") == 0)
+ default_pcui = info->devnode;
+ }
}
}
+ if (pcui == NULL && default_pcui != NULL)
+ pcui = default_pcui;
+
if (mdm == NULL || pcui == NULL)
return FALSE;
@@ -291,7 +297,7 @@ static gboolean setup_huawei(struct modem_info *modem)
static gboolean setup_speedup(struct modem_info *modem)
{
- const char *aux = NULL, *mdm = NULL;
+ const char *aux = NULL, *mdm = NULL, *default_mdm = NULL;
GSList *list;
DBG("%s", modem->syspath);
@@ -311,15 +317,20 @@ 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 (aux == NULL && 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, "03") == 0)
- mdm = info->devnode;
+ else if (mdm == NULL) {
+ if (g_strcmp0(info->number, "02") == 0)
+ default_mdm = info->devnode;
+ else if (g_strcmp0(info->number, "03") == 0)
+ default_mdm = info->devnode;
+ }
}
}
+ if (mdm == NULL && default_mdm != NULL)
+ mdm = default_mdm;
+
if (aux == NULL || mdm == NULL)
return FALSE;
@@ -385,9 +396,10 @@ static gboolean setup_alcatel(struct modem_info *modem)
if (aux != NULL)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
- if (g_strcmp0(info->number, "03") == 0)
+ if (aux == NULL && g_strcmp0(info->number, "03") == 0)
aux = info->devnode;
- else if (g_strcmp0(info->number, "05") == 0)
+ else if (mdm == NULL &&
+ g_strcmp0(info->number, "05") == 0)
mdm = info->devnode;
}
}
@@ -425,9 +437,10 @@ static gboolean setup_novatel(struct modem_info *modem)
if (aux != NULL)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
- if (g_strcmp0(info->number, "00") == 0)
+ if (aux == NULL && g_strcmp0(info->number, "00") == 0)
aux = info->devnode;
- else if (g_strcmp0(info->number, "01") == 0)
+ else if (mdm == NULL &&
+ g_strcmp0(info->number, "01") == 0)
mdm = info->devnode;
}
}
@@ -465,9 +478,10 @@ static gboolean setup_nokia(struct modem_info *modem)
if (aux != NULL)
break;
} else if (g_strcmp0(info->interface, "10/0/0") == 0) {
- if (g_strcmp0(info->number, "02") == 0)
+ if (mdm == NULL && g_strcmp0(info->number, "02") == 0)
mdm = info->devnode;
- else if (g_strcmp0(info->number, "04") == 0)
+ else if (aux == NULL &&
+ g_strcmp0(info->number, "04") == 0)
aux = info->devnode;
}
}
@@ -505,13 +519,14 @@ static gboolean setup_telit(struct modem_info *modem)
if (aux != NULL)
break;
} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
- if (g_strcmp0(info->number, "00") == 0)
+ if (mdm == NULL && g_strcmp0(info->number, "00") == 0)
mdm = info->devnode;
else if (g_strcmp0(info->number, "01") == 0)
diag = info->devnode;
else if (g_strcmp0(info->number, "02") == 0)
gps = info->devnode;
- else if (g_strcmp0(info->number, "03") == 0)
+ else if (aux == NULL
+ && g_strcmp0(info->number, "03") == 0)
aux = info->devnode;
}
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 4/5] udev: Add rules to support Speedup 7300 dongle
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
` (2 preceding siblings ...)
2011-08-31 9:26 ` [PATCH v3 3/5] udevng.c: tty assignment according OFONO_LABEL should take precedence Philippe Nunes
@ 2011-08-31 9:26 ` Philippe Nunes
2011-08-31 9:26 ` [PATCH v3 5/5] udev: Add rules to support SpeedUp 9800 dongle Philippe Nunes
2011-10-26 13:21 ` [PATCH v3 0/5] udev rules update Guillaume Zajac
5 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2011-08-31 9:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 875 bytes --]
---
plugins/ofono.rules | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index 079db07..7f284d4 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -25,6 +25,10 @@ ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0017", ENV{ID_USB_INTERFACE_NUM}=="0
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"
+# SpeedUp 7300
+ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="00", ENV{OFONO_LABEL}="modem"
+ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_LABEL}="aux"
+
LABEL="ofono_tty_end"
SUBSYSTEM!="usb", GOTO="ofono_end"
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v3 5/5] udev: Add rules to support SpeedUp 9800 dongle
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
` (3 preceding siblings ...)
2011-08-31 9:26 ` [PATCH v3 4/5] udev: Add rules to support Speedup 7300 dongle Philippe Nunes
@ 2011-08-31 9:26 ` Philippe Nunes
2011-10-26 13:21 ` [PATCH v3 0/5] udev rules update Guillaume Zajac
5 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2011-08-31 9:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 875 bytes --]
---
plugins/ofono.rules | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index 7f284d4..9e7a651 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -29,6 +29,10 @@ ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0124", ENV{ID_USB_INTERFACE_NUM}=="0
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="00", ENV{OFONO_LABEL}="modem"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_LABEL}="aux"
+# SpeedUp 9800
+ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9800", ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_LABEL}="modem"
+ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9800", ENV{ID_USB_INTERFACE_NUM}=="02", ENV{OFONO_LABEL}="aux"
+
LABEL="ofono_tty_end"
SUBSYSTEM!="usb", GOTO="ofono_end"
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 0/5] udev rules update
2011-08-31 9:26 [PATCH v3 0/5] udev rules update Philippe Nunes
` (4 preceding siblings ...)
2011-08-31 9:26 ` [PATCH v3 5/5] udev: Add rules to support SpeedUp 9800 dongle Philippe Nunes
@ 2011-10-26 13:21 ` Guillaume Zajac
5 siblings, 0 replies; 7+ messages in thread
From: Guillaume Zajac @ 2011-10-26 13:21 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
Hi Denis and Marcel,
On 31/08/2011 11:26, Philippe Nunes wrote:
> The modification I did in udevng.c to prevent overiding of the OFONO_LABEL based assignment, could break the default assignment.
> I fixed this with this new patch.
>
> Philippe Nunes (5):
> udev: Add rules to support ZTE MF668 dongle
> udev: Add rules to support ZTE MF190 dongle
> udevng.c: tty assignment according OFONO_LABEL should take precedence
> udev: Add rules to support Speedup 7300 dongle
> udev: Add rules to support SpeedUp 9800 dongle
>
> plugins/ofono.rules | 20 ++++++++++++++++
> plugins/udevng.c | 61 +++++++++++++++++++++++++++++++-------------------
> 2 files changed, 58 insertions(+), 23 deletions(-)
>
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono
>
As we would need this update to make some CDMA dongles working to test
UIM implementation, do you plan to apply those patches?
Do you have another solution?
Thanks.
Kind regards,
Guillaume
^ permalink raw reply [flat|nested] 7+ messages in thread