Alcatel X200 troubleshooting



I just spent a day chasing a troublesome adapter supplied by a local
carrier (Euskaltel in Spain), identified by usb ID 1bbb:f000, and
after the usb_modeswitch trick, by 1bbb:0017. This is identified by
another people as an Alcatel X200 series. It was not recognized by
Network Manager most of the times, throwing the following message on
syslog:

hp NetworkManager: <WARN>  user_list_connections_cb(): Couldn't
retrieve connections: Did not receive a reply. Possible causes
include: the remote application did not send a reply, the message bus
security policy blocked the reply, the reply timeout expired, or the
network connection was broken..

By activating debug mode in modem manager, my conclusion was that too
much time was wasted by testing the six! serial ports this device was
opening, for GSM capabilities (only the fourth and sixth were
capable). So, the solution seemed to be to ignore the first four ports
when testing this particular device.
Looking at mailing lists, I thought the solution was to write a udev
rule assigning the value ID_MM_DEVICE_IGNORE to skip the non
GSM-capable ports, but apparently this value is only to ignore entire
devices, not individual ports.

Then I grabbed the source (ModemManager-0.4) and looked for a way to
do this, but none was obvious for me. So I made a few changes to the
source (patch attached) to include awareness of a new value,
ID_MM_PORT_IGNORE. The changes were done only to the longcheer and
generic plugins (those were the ones activated in this case). With
this, and the proper udev rule (also included in the patch)
recognition by Network Manager is almost instantaneous and flawless.

Please tell me is there is another way to do this or if my solution is
of interest to anyone.


Regards,
Javier.
diff -ru ModemManager-0.4/plugins/77-mm-longcheer-port-types.rules modemmanager-0.4/plugins/77-mm-longcheer-port-types.rules
--- ModemManager-0.4/plugins/77-mm-longcheer-port-types.rules	2010-06-16 19:33:09.000000000 +0200
+++ modemmanager-0.4/plugins/77-mm-longcheer-port-types.rules	2011-04-16 08:38:45.000000000 +0200
@@ -171,6 +171,11 @@
 ATTRS{idProduct}=="0000", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}="1"
 ATTRS{idProduct}=="0000", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
 ATTRS{idProduct}=="0000", ENV{ID_MM_LONGCHEER_TAGGED}="1"
+# Alcatel One Touch X200s
+ATTRS{idProduct}=="0017", ENV{.MM_USBIFNUM}=="*5", ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}="1"
+ATTRS{idProduct}=="0017", ENV{.MM_USBIFNUM}=="*3", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
+ATTRS{idProduct}=="0017", ENV{.MM_USBIFNUM}=="*[012]", ENV{ID_MM_PORT_IGNORE}="1"
+ATTRS{idProduct}=="0017", ENV{ID_MM_LONGCHEER_TAGGED}="1"
 
 GOTO="mm_longcheer_port_types_end"
 
diff -ru ModemManager-0.4/plugins/mm-plugin-generic.c modemmanager-0.4/plugins/mm-plugin-generic.c
--- ModemManager-0.4/plugins/mm-plugin-generic.c	2010-06-16 19:33:09.000000000 +0200
+++ modemmanager-0.4/plugins/mm-plugin-generic.c	2011-04-16 01:28:03.000000000 +0200
@@ -85,6 +85,8 @@
     port = mm_plugin_base_supports_task_get_port (task);
     if (strcmp (g_udev_device_get_subsystem (port), "tty"))
         return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
+    if (g_udev_device_get_property_as_boolean (port, "ID_MM_PORT_IGNORE"))
+        return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
 
     if (mm_plugin_base_get_cached_port_capabilities (base, port, &cached)) {
         level = get_level_for_capabilities (cached);
diff -ru ModemManager-0.4/plugins/mm-plugin-longcheer.c modemmanager-0.4/plugins/mm-plugin-longcheer.c
--- ModemManager-0.4/plugins/mm-plugin-longcheer.c	2010-06-16 19:33:09.000000000 +0200
+++ modemmanager-0.4/plugins/mm-plugin-longcheer.c	2011-04-16 01:05:24.000000000 +0200
@@ -86,6 +86,8 @@
     /* Longcheer and TAMobile */
     if (vendor != 0x1c9e && vendor != 0x1bbb)
         return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
+    if (g_udev_device_get_property_as_boolean (port, "ID_MM_PORT_IGNORE"))
+        return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
 
     if (mm_plugin_base_get_cached_port_capabilities (base, port, &cached)) {
         level = get_level_for_capabilities (cached);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]