Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
1) Does the device boot up in CFUN=1 mode already? This could be determined via minicom/screen without MM running. If it does (my 8775 modules do) then we could avoid this issue by having the startup code check AT+CFUN? before doing AT+CFUN=1 explicitly. I will try to implement this, in some way so that plugins can enable/disable this behaviour (Wavecom plugin will also use it) Cheers! -- Aleksander ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
On Mon, 2011-05-23 at 07:58 +0200, Gerd Bavendiek wrote: Am 22.05.2011 00:44, schrieb Aleksander Morgado: Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Minor fix in the previous patch, please use the one here instead. I updated the package in my ppa with your patch. Gerd, can you test the new one? I did so. Unfortunately it did not work. That is strange... Could you get modem-manager debug logs with both the version in the PPA and the previous version you tested with (the one that worked) Cheers, The log from the second package Pantelis provided is in mm-nok.log. CFUN=1 is being sent in line 159: 159 modem-manager[1836]: debug [1306051422.154203] [mm-at-serial-port.c:298] debug_log(): (ttyUSB2): -- 'AT+CFUN=1CR' 160 modem-manager[1836]: debug [1306051422.202208] [mm-at-serial-port.c:298] debug_log(): (ttyUSB2): -- 'CRLFOKCRLF' 161 modem-manager[1836]: debug [1306051424.232337] [mm-serial-port.c:798] mm_serial_port_close(): (ttyUSB2) device open count is 0 (close) 162 modem-manager[1836]: info [1306051424.232506] [mm-serial-port.c:811] mm_serial_port_close(): (ttyUSB2) closing serial port... 163 modem-manager[1836]: info [1306051424.232828] [mm-serial-port.c:834] mm_serial_port_close(): (ttyUSB2) serial port closed As written earlier, I've copied /usr/sbin/modem-manager and /usr/lib/ModemManager/libmm-plugin-sierra.so from the first package Pantelis provided. I now copied these two files in place and rebooted. As you will see in mm-ok.log, I got a working connection. I suggested to Aleksander on IRC to do two things... 1) Does the device boot up in CFUN=1 mode already? This could be determined via minicom/screen without MM running. If it does (my 8775 modules do) then we could avoid this issue by having the startup code check AT+CFUN? before doing AT+CFUN=1 explicitly. 2) Sierra documentation implies that their CFUN variant takes an additional optional reset parameter. Can you try (again using minicom/screen or whatever) the following? AT+CFUN=1,0 AT+CFUN=1,1 and look for which one does *not* cause the reset, and we could use that one for Sierra. But in the end I think (1) is the better choice. Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
Am 20.05.2011 12:38, schrieb Pantelis Koukousoulas: On Fri, May 20, 2011 at 12:59 PM, Aleksander Morgado aleksan...@lanedo.com wrote: Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Minor fix in the previous patch, please use the one here instead. I updated the package in my ppa with your patch. Gerd, can you test the new one? I did so. Unfortunately it did not work. The details: I removed the hold and finally installed ii modemmanager 0.4+git.20110124t203624.00b6cce-2ubuntu3~pkt1 D-Bus service for managing modems Right ? What debug information do you need ? I copied /usr/sbin/modem-manager and /usr/lib/ModemManager/libmm-plugin-sierra.so from your first working package to be able to revert. Should that be sufficient ? Kind regards Gerd -- Gerd Bavendiek Linux Users check out: gerd.bavend...@googlemail.com http://linos.wordpress.com ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Minor fix in the previous patch, please use the one here instead. I updated the package in my ppa with your patch. Gerd, can you test the new one? I did so. Unfortunately it did not work. That is strange... Could you get modem-manager debug logs with both the version in the PPA and the previous version you tested with (the one that worked) Cheers, -- Aleksander ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
On Thu, May 19, 2011 at 11:00 PM, Gerd Bavendiek gerd.bavend...@googlemail.com wrote: I have a ID 1199:6832 Sierra Wireless, Inc. MC8780 Device. Unfortunately NetworkManager in Ubuntu 9.10 Karmic was the last version I could use the device with. I recently checked Ubuntu 11.04 Natty (coming with NetworkManager version 0.8.3.998). This too does not work, forcing me to stay with Karmic. [...] All the details are here: [...] Is there anything I can do (besides from learning to hack at NetworkManager ...) ? Hi, I 'm not a NetworkManager dev, just a fellow ubuntu user :) From a cursory reading of the bug reports you cited it seems like some sierra modems crash when ModemManager sends CFUN=1 to them. Can you help verify if this is indeed the case with yours as well? I put a version of natty's modemmanager with the attached patch applied in my ppa. So, the only thing you need to do to test is: sudo add-apt-repository ppa:pktoss/ppa sudo apt-get update sudo apt-get install modemmanager restart networkmanager/modemmanager or to be 100% sure you can just reboot. Test to see if your device works now sudo add-apt-repository -r ppa:pktoss/ppa sudo apt-get update (The last 2 steps are in order to remove my ppa to avoid it breaking your system with my other experimental stuff). Alternatively you can just build modemmanager with the attached patch applied by yourself. If the patched modemmanager works, then please say it so that the appropriate quirk for your device can be added. Thanks, Pantelis Index: modemmanager-0.4+git.20110124t203624.00b6cce/plugins/mm-modem-sierra-gsm.c === --- modemmanager-0.4+git.20110124t203624.00b6cce.orig/plugins/mm-modem-sierra-gsm.c 2011-05-20 08:23:29.908008899 +0300 +++ modemmanager-0.4+git.20110124t203624.00b6cce/plugins/mm-modem-sierra-gsm.c 2011-05-20 08:32:49.606784301 +0300 @@ -638,6 +638,32 @@ } static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ +/* gobject does not like to just have get_property and seems to + * to not honour our overriden properties ... keep this as an empty + * func around */ +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ +/* At least some Sierra modems go down if you send a power up command */ +switch (prop_id) { +case MM_GENERIC_GSM_PROP_POWER_UP_CMD: +g_value_set_string (value, ); +break; +case MM_GENERIC_GSM_PROP_POWER_DOWN_CMD: +g_value_set_string (value, ); +break; +default: +break; +} +} + +static void mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -653,5 +679,16 @@ gsm_class-get_access_technology = get_access_technology; gsm_class-get_sim_iccid = get_sim_iccid; gsm_class-do_disconnect = do_disconnect; + +object_class-get_property = get_property; +object_class-set_property = set_property; + +g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_POWER_UP_CMD, + MM_GENERIC_GSM_POWER_UP_CMD); + +g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_POWER_DOWN_CMD, + MM_GENERIC_GSM_POWER_DOWN_CMD); } ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
From a cursory reading of the bug reports you cited it seems like some sierra modems crash when ModemManager sends CFUN=1 to them. Can you help verify if this is indeed the case with yours as well? So it really seems that not only Wavecom modems get a whole software restart (including USB stack) when they get AT+CFUN=1. The thing is, is removing the power-up command a solution for *all* Sierra modems or are there any Sierra modems that really need the power-up command? If so, we'll probably need to disable the power-up only for specific models, like the one reported in the bug; or the other way around, enable it only for only some specific models. I put a version of natty's modemmanager with the attached patch applied in my ppa. So, the only thing you need to do to test is: Wasn't that patch already applied to Ubuntu's MM? According to the logs in https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/459052 that was written by Alexander Sack long ago, and possibly applied in Ubuntu... (comment #7?) -- Aleksander ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
On Fri, May 20, 2011 at 10:10 AM, Aleksander Morgado aleksan...@lanedo.com wrote: From a cursory reading of the bug reports you cited it seems like some sierra modems crash when ModemManager sends CFUN=1 to them. Can you help verify if this is indeed the case with yours as well? So it really seems that not only Wavecom modems get a whole software restart (including USB stack) when they get AT+CFUN=1. The thing is, is removing the power-up command a solution for *all* Sierra modems or are there any Sierra modems that really need the power-up command? If so, we'll probably need to disable the power-up only for specific models, like the one reported in the bug; or the other way around, enable it only for only some specific models. From reading the cited bug reports and from general instict I would think that probably some of them need CFUN=1 and others crash when they get it so the best thing to do is enable it selectively. (We can start from this USBID and expand). Unfortunately I don't have the device myself, so I can't test. Wasn't that patch already applied to Ubuntu's MM? According to the logs in https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/459052 that was written by Alexander Sack long ago, and possibly applied in Ubuntu... (comment #7?) It was probably applied to ubuntu once but somehow it got dropped (I think during the karmic - lucid transition if I read well). In the current version (natty) there is no such patch from what I could see. In any case, a distro-local patch is really a bad idea for solving this type of problems, especially when you have such a friendly and responsive upstream like in this case. Unfortunately I don't have any modemmanager experience or time to implement the quirk the right way, so if someone can start from the previous attached patch and fix the problem correctly, it would be great :) Thanks, Pantelis ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
From a cursory reading of the bug reports you cited it seems like some sierra modems crash when ModemManager sends CFUN=1 to them. Can you help verify if this is indeed the case with yours as well? So it really seems that not only Wavecom modems get a whole software restart (including USB stack) when they get AT+CFUN=1. The thing is, is removing the power-up command a solution for *all* Sierra modems or are there any Sierra modems that really need the power-up command? If so, we'll probably need to disable the power-up only for specific models, like the one reported in the bug; or the other way around, enable it only for only some specific models. From reading the cited bug reports and from general instict I would think that probably some of them need CFUN=1 and others crash when they get it so the best thing to do is enable it selectively. (We can start from this USBID and expand). Unfortunately I don't have the device myself, so I can't test. Wasn't that patch already applied to Ubuntu's MM? According to the logs in https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/459052 that was written by Alexander Sack long ago, and possibly applied in Ubuntu... (comment #7?) It was probably applied to ubuntu once but somehow it got dropped (I think during the karmic - lucid transition if I read well). In the current version (natty) there is no such patch from what I could see. In any case, a distro-local patch is really a bad idea for solving this type of problems, especially when you have such a friendly and responsive upstream like in this case. Unfortunately I don't have any modemmanager experience or time to implement the quirk the right way, so if someone can start from the previous attached patch and fix the problem correctly, it would be great :) Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Cheers! -- Aleksander From a91835798a7d7a5fffddb905e71b45178ef05ebf Mon Sep 17 00:00:00 2001 From: Aleksander Morgado aleksan...@lanedo.com Date: Fri, 20 May 2011 11:46:32 +0200 Subject: [PATCH] sierra: avoid sending power-up command to MC8780 Fixes LP#459052 Based on a patch developed by Alexander Sack --- plugins/mm-modem-sierra-gsm.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c index d4636d7..163263d 100644 --- a/plugins/mm-modem-sierra-gsm.c +++ b/plugins/mm-modem-sierra-gsm.c @@ -609,6 +609,44 @@ simple_connect (MMModemSimple *simple, /*/ static void +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ +/* Do nothing... see set_property() in parent, which also does nothing */ +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ +switch (prop_id) { +case MM_GENERIC_GSM_PROP_POWER_UP_CMD: { +guint16 product_id = 0; + +g_object_get (object, + MM_MODEM_HW_PID, product_id, + NULL); + +/* Some Sierra modems do a full software reset (including + * USB stack) with AT+CFUN=1, so try to avoid that. + * - MC8780 (0x6832) + * */ +if (product_id == 0x6832) +g_value_set_string (value, ); +else +g_value_set_string (value, +CFUN=1); +break; +} +default: +break; +} +} + +static void modem_init (MMModem *modem_class) { modem_class-grab_port = grab_port; @@ -646,6 +684,9 @@ mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass) mm_modem_sierra_gsm_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (object_class, sizeof (MMModemSierraGsmPrivate)); +object_class-get_property = get_property; +object_class-set_property = set_property; + object_class-dispose = dispose; gsm_class-do_enable_power_up_done = real_do_enable_power_up_done; gsm_class-set_allowed_mode = set_allowed_mode; -- 1.7.4.1 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
Unfortunately I don't have any modemmanager experience or time to implement the quirk the right way, so if someone can start from the previous attached patch and fix the problem correctly, it would be great :) Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Minor fix in the previous patch, please use the one here instead. Cheers, -- Aleksander From d76e86d336f090a45a66159944e4993c1269 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado aleksan...@lanedo.com Date: Fri, 20 May 2011 11:46:32 +0200 Subject: [PATCH] sierra: avoid sending power-up command to MC8780 Fixes LP#459052 Based on a patch developed by Alexander Sack --- plugins/mm-modem-sierra-gsm.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c index d4636d7..6e4f318 100644 --- a/plugins/mm-modem-sierra-gsm.c +++ b/plugins/mm-modem-sierra-gsm.c @@ -609,6 +609,44 @@ simple_connect (MMModemSimple *simple, /*/ static void +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ +/* Do nothing... see set_property() in parent, which also does nothing */ +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ +switch (prop_id) { +case MM_GENERIC_GSM_PROP_POWER_UP_CMD: { +guint product_id = 0; + +g_object_get (object, + MM_MODEM_HW_PID, product_id, + NULL); + +/* Some Sierra modems do a full software reset (including + * USB stack) with AT+CFUN=1, so try to avoid that. + * - MC8780 (0x6832) + * */ +if (product_id == 0x6832) +g_value_set_string (value, ); +else +g_value_set_string (value, +CFUN=1); +break; +} +default: +break; +} +} + +static void modem_init (MMModem *modem_class) { modem_class-grab_port = grab_port; @@ -646,6 +684,9 @@ mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass) mm_modem_sierra_gsm_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (object_class, sizeof (MMModemSierraGsmPrivate)); +object_class-get_property = get_property; +object_class-set_property = set_property; + object_class-dispose = dispose; gsm_class-do_enable_power_up_done = real_do_enable_power_up_done; gsm_class-set_allowed_mode = set_allowed_mode; -- 1.7.4.1 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: 1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
On Fri, May 20, 2011 at 12:59 PM, Aleksander Morgado aleksan...@lanedo.com wrote: Attached a patch which should do AT+CFUN=1 only if product ID is not 0x6832. Can you guys test it? Minor fix in the previous patch, please use the one here instead. I updated the package in my ppa with your patch. Gerd, can you test the new one? Thanks, Pantelis ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
1199:6832 Sierra Wireless, Inc. MC8780 not working with NetworkManager 0.8.3.998 / ModemManager 0.4
Hi, sorry to bother you with a user problem. I have a ID 1199:6832 Sierra Wireless, Inc. MC8780 Device. Unfortunately NetworkManager in Ubuntu 9.10 Karmic was the last version I could use the device with. I recently checked Ubuntu 11.04 Natty (coming with NetworkManager version 0.8.3.998). This too does not work, forcing me to stay with Karmic. From the status of the various bugs I got the idea that no one seems to care. Maybe only few users are affected. All the details are here: https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/784573 or https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/459052 or https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/376361 Is there anything I can do (besides from learning to hack at NetworkManager ...) ? Thanks Gerd -- Gerd Bavendiek Linux Users check out: gerd.bavend...@googlemail.com http://linos.wordpress.com ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list