Re: [MM] Question regarding minimum probing time in MMPluginManager

2013-06-28 Thread Ben Chan
on of N port probes. A more generic solution would be adding a hook in the plugin to decide whether or not to end the probing process after each port probe finishes. How do you think? Thanks, Ben On Fri, Jun 28, 2013 at 12:13 AM, Aleksander Morgado wrote: > >> The following code in M

[MM] Question regarding minimum probing time in MMPluginManager

2013-06-27 Thread Ben Chan
ng we have a way to specify in the plugin), once all port probes finish, should MMPluginManager proceed without waiting for the minimum probing time to expire? Is there a potential downside? The obvious upside is cutting the modem startup time. Thanks, Ben __

[MM] [PATCH] altair-lte: propagate error when load_{supported, current}_bands fails

2013-06-27 Thread Ben Chan
This patch fixes a potential crash when MMIfaceModem::load_current_bands_ready() dereferences a NULL GError pointer, which happens when the altair-lte plugin fails to load the current bands but does not propagate the error. It also fixes a similar issue with the plugin fails to load the supported b

[MM] [PATCH] novatel-lte: propagate error when load_current_bands fails

2013-06-27 Thread Ben Chan
This patch fixes the following crash when MMIfaceModem::load_current_bands_ready() dereferences a NULL GError pointer, which happens when the novatel-lte plugin fails to load the current bands but does not propagate the error. Thread 0 *CRASHED* ( SIGSEGV @ 0x ) 0x7f04d6c89c36 [ModemMan

[MM] [PATCH] altair-lte: avoid sending ATZ when enabling the modem

2013-06-26 Thread Ben Chan
This patch prevents an ATZ command, which causes the modem to reboot, from being sent to the modem when the modem is being enabled. --- plugins/altair/mm-broadband-modem-altair-lte.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/plugins/altair/mm-broadband-modem-altair-lte.c b/plugin

[mobile-broadband-provider-info PATCH] in: add "mtnl.net" APN for MTNL

2013-06-23 Thread Ben Chan
--- serviceproviders.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/serviceproviders.xml b/serviceproviders.xml index 6809f90..d68b55b 100644 --- a/serviceproviders.xml +++ b/serviceproviders.xml @@ -5305,6 +5305,16 @@ conceived.

[mobile-broadband-provider-info PATCH] se: add Teliasonera

2013-06-23 Thread Ben Chan
--- serviceproviders.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/serviceproviders.xml b/serviceproviders.xml index 6809f90..42912fb 100644 --- a/serviceproviders.xml +++ b/serviceproviders.xml @@ -9214,6 +9214,16 @@ conceived. + + Teliasonera +

Re: [MM] [PATCH] novatel-lte: increase number of retries for connection status checks

2013-05-28 Thread Ben Chan
Sounds good to me. Changed to 60s. Ben On Tue, May 28, 2013 at 12:47 AM, Aleksander Morgado wrote: > On 28/05/13 06:04, Ben Chan wrote: > > 60s seems a bit excessive as users most likely give up earlier. Revised > > the patch to have a 30s timeout. > > > > Remember

[MM] [PATCH v3] novatel-lte: increase number of retries for connection status checks

2013-05-28 Thread Ben Chan
This patch increases the number of retries, from 4 to 60, for connection status check during a connection / disconnection request, which handles some scenario when the connection / disconnection request takes more than 5 seconds to complete. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c |

Re: [MM] [PATCH] novatel-lte: increase number of retries for connection status checks

2013-05-27 Thread Ben Chan
60s seems a bit excessive as users most likely give up earlier. Revised the patch to have a 30s timeout. Thanks, Ben On Mon, May 27, 2013 at 12:52 AM, Aleksander Morgado wrote: > On 26/05/13 08:45, Ben Chan wrote: > > This patch increases the number of retries, from 4 to 10, for c

[MM] [PATCH v2] novatel-lte: increase number of retries for connection status checks

2013-05-27 Thread Ben Chan
This patch increases the number of retries, from 4 to 30, for connection status check during a connection / disconnection request, which handles some scenario when the connection / disconnection request takes more than 5 seconds to complete. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c |

[MM] [PATCH v2] novatel-lte: normalize QMI status when included in DBus error message

2013-05-27 Thread Ben Chan
This patches normalize a response for the AT$NWQMISTATUS command, by replacing white-space characters with a space, before the response is included in a DBus error message. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c | 33 --- 1 file changed, 29 insertions(+), 4 delet

[MM] [PATCH] novatel-lte: increase number of retries for connection status checks

2013-05-25 Thread Ben Chan
This patch increases the number of retries, from 4 to 10, for connection status check during a connection / disconnection request, which handles some scenario when the connection / disconnection request takes more than 5 seconds to complete. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c |

[MM] [PATCH] novatel-lte: normalize QMI status when included in DBus error message

2013-05-25 Thread Ben Chan
This patches normalize a response for the AT$NWQMISTATUS command, by replacing white-space characters with a space, before the response is included in a DBus error message. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c | 41 ++- 1 file changed, 32 insertions(+), 9 delet

[MM] [PATCH] novatel: fix invalid comparison of unsigned expression

2013-05-20 Thread Ben Chan
This patch fixes the following invalid comparison of unsigned expression: novatel/mm-plugin-novatel.c:148:29: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] if (ctx->nwdmat_retries >= 0) { ~~~ ^ ~ Bug reported on ht

[MM] [PATCH] device: check for NULL driver in add_port_driver

2013-05-17 Thread Ben Chan
This patch fixes a crash in MMDevice::add_port_driver() due to g_str_equal() dereferencing a NULL driver returned by mm_device_utils_get_port_driver(). Bug reported on https://code.google.com/p/chromium/issues/detail?id=241823 --- src/mm-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --gi

Re: [MM][PATCH] remove comparison of unsigned expression >= 0

2013-05-06 Thread Ben Chan
Hi Aleksander / Dan, I've rebased Yunlian's original patch to MM HEAD: https://mail.gnome.org/archives/networkmanager-list/2013-May/msg00026.html Could you please take another look? Thanks, Ben On Tue, Apr 30, 2013 at 1:34 PM, Ben Chan wrote: > I fixed the cid check in a

[MM] [PATCH v2] sierra: remove comparison of unsigned expression >= 0

2013-05-06 Thread Ben Chan
This patch removes an unnecessary check of unsigned expression >= 0, which also fixes the following clang warnings: sierra/mm-broadband-modem-sierra.c:570:18: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] mode >= 0 && ^

Re: [MM] [PATCH] broadband-bearer: fix cid check in disconnect_3gpp

2013-05-01 Thread Ben Chan
Aleksander / Dan, is this the right fix? Thanks, Ben On Tue, Apr 30, 2013 at 12:54 PM, Ben Chan wrote: > A value 0 is used to denote an invalid/uninitialized CID. This patch > fixes a CID check in disconnect_3gpp() of MMBroadbandBearer such that it > disables all PDP contexts via A

Re: [MM][PATCH] remove comparison of unsigned expression >= 0

2013-04-30 Thread Ben Chan
: > On 29/04/13 18:23, Ben Chan wrote: > > How about the cid case? cid == 0 seems to be an invalid value? > > > > Ah, true, cid == 0 wouldn't make sense there. > > -- > Aleksander > ___ networkmanager-list mailing li

[MM] [PATCH] broadband-modem: update signal quality normalization

2013-04-30 Thread Ben Chan
This patch updates normalize_ciev_cind_signal_quality() in MMBroadbandModem to remove an unnecessary check on 'quality >= 0' and also makes sure the normalized signal quality is capped at 100 when no maximum is specified. This is revised from a patch originally authored by Yunlian Jiang . Bug rep

Re: [MM] [PATCH] iface-modem-3gpp: handle non-deferrable registration state updates

2013-04-30 Thread Ben Chan
+Dan On Tue, Apr 30, 2013 at 1:03 PM, Ben Chan wrote: > Hi Aleksander / Dan, > > Would a transition from 'registered' to 'idle'/'searching' considered a > 'service' loss from the connection manager's perspective (e.g. the service &g

Re: [MM] [PATCH] iface-modem-3gpp: handle non-deferrable registration state updates

2013-04-30 Thread Ben Chan
nge may not necessarily mean that the service disappears. But I guess such a glitch can be smoothed out in the connection manager layer instead of the modem manager layer. I'm happy to update the logic as suggested if that's the expected behavior. Thanks, Ben On Tue, Apr 30

[MM] [PATCH] broadband-bearer: fix cid check in disconnect_3gpp

2013-04-30 Thread Ben Chan
A value 0 is used to denote an invalid/uninitialized CID. This patch fixes a CID check in disconnect_3gpp() of MMBroadbandBearer such that it disables all PDP contexts via AT+CGACT=0 when no specific CID is used (i.e. cid == 0). --- src/mm-broadband-bearer.c | 2 +- 1 file changed, 1 insertion(+),

Re: [MM][PATCH] remove comparison of unsigned expression >= 0

2013-04-29 Thread Ben Chan
How about the cid case? cid == 0 seems to be an invalid value? On Apr 28, 2013 10:55 PM, "Aleksander Morgado" wrote: > On 27/04/13 08:00, Ben Chan wrote: > > [Ben] Aleksander, do you think the original code was meant to check > > "quality > 0"? > > &

Re: [MM][PATCH] remove comparison of unsigned expression >= 0

2013-04-26 Thread Ben Chan
switch (mode) { > case 0: > diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c > index 292420c..fcaad56 100644 > --- a/src/mm-broadband-bearer.c > +++ b/src/mm-broadband-bearer.c > @@ -1508,9 +1508,7 @@ disconnect_3gpp (MMBroadbandBe

[MM] [PATCH] qcdm: remove unnecessary NULL check on free()

2013-04-24 Thread Ben Chan
This patch removes a few unnecessary NULL checks on free(), which also fixes the following clang warnings: result.c:59:27: error: if statement has empty body [-Werror,-Wempty-body] if (v->u.u8_array); ^ result.c:59:27: note: put the semicolon on a separate line to

Re: [MM] [PATCH] bearer: allow specifying default IP family for bearers

2013-04-22 Thread Ben Chan
Thanks. Submitted a revised patch. - Ben On Mon, Apr 22, 2013 at 12:42 AM, Aleksander Morgado wrote: > On 04/22/2013 03:50 AM, Ben Chan wrote: > > This patch adds a 'bearer-default-ip-family' property to MMBearer, which > > specifies the default IP family to use for

[MM] [PATCH v2] bearer: allow specifying default IP family for bearers

2013-04-22 Thread Ben Chan
This patch adds a 'bearer-default-ip-family' property to MMBearer, which specifies the default IP family to use for a bearer when no explicit value is given via the simple connect properties. The default IP family is set to IPv4 in MMBearer but can be overridden by a MMBearer subclass, which allows

[MM] [PATCH] bearer: allow specifying default IP family for bearers

2013-04-21 Thread Ben Chan
This patch adds a 'bearer-default-ip-family' property to MMBearer, which specifies the default IP family to use for a bearer when no explicit value is given via the simple connect properties. The default IP family is set to IPv4 in MMBearer but can be overridden by a MMBearer subclass, which allows

[MM] [PATCH] device: handle NULL returned by g_udev_device_get_driver() gracefully

2013-04-10 Thread Ben Chan
This patch fixes a crash in mm_device_grab_port() when doing a string comparison on a NULL returned by g_udev_device_get_driver(). Thread 0 *CRASHED* ( SIGSEGV @ 0x ) 0x76b760b4 [libc-2.15.so] - strcmp.c:38 strcmp 0x76c66a7d [libglib-2.0.so.0.3200.4

[MM] [PATCH] broadband-bearer: handle NULL and character escaping of APN value

2013-04-04 Thread Ben Chan
--- src/mm-broadband-bearer.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index c34867d..fe894c9 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -753,7 +753,7 @@ find_cid_ready (MMBaseMo

[MM] [PATCH] serial,blacklist: fix file mode (0755 -> 0644)

2013-04-04 Thread Ben Chan
--- src/77-mm-usb-device-blacklist.rules | 0 src/mm-at-serial-port.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/77-mm-usb-device-blacklist.rules mode change 100755 => 100644 src/mm-at-serial-port.c diff --git a/src/77-mm-usb-device-black

Re: [MM][PATCH v4] altair-lte: initial altair lte plugin

2013-04-03 Thread Ben Chan
Hi Ori I guess the copyright note in mm-broadband-bearer-altair-lte.c may simply be "Copyright (C) 2013 Altair Semiconductor" as it's a new file, right? - Ben On Wed, Apr 3, 2013 at 4:56 AM, Aleksander Morgado wrote: > On 04/02/2013 01:57 AM, Ori Inbar wrote: > > Hel

[MM] [PATCH] broadband-modem: fix enable flag in UnsolicitedRegistrationEventsContext

2013-03-05 Thread Ben Chan
--- src/mm-broadband-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 9d127c9..b3ec35a 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -3712,7 +3712,7 @@ unsolicited_registration_events_con

[MM] [PATCH] iface-modem-3gpp: handle non-deferrable registration state updates

2013-03-04 Thread Ben Chan
This patch changes MMIfaceModem3gpp to differentiate between deferrable and non-deferrable 3GPP registration state updates. Periodic or unsolicited registration state updates are deferrable, while internal updates, e.g. due to modem being disabled, are non-deferrable. --- src/mm-iface-modem-3gpp.c

[MM] [PATCH] broadband-modem: fix disabling of unsolicited registration events

2013-03-04 Thread Ben Chan
--- src/mm-broadband-modem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 9f45904..9d127c9 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -3924,7 +3924,7 @@ unsolicited_registration_even

Re: [MM] [PATCH v2] iface-modem-3gpp: clear deferred registration state update when disabling

2013-03-01 Thread Ben Chan
Yep, that should work. On Fri, Mar 1, 2013 at 12:18 AM, Aleksander Morgado wrote: > On 03/01/2013 09:06 AM, Ben Chan wrote: > > > > > > > > On Thu, Feb 28, 2013 at 11:46 PM, Aleksander Morgado > > mailto:aleksan...@lanedo.com>> wrote: > > &

Re: [MM] [PATCH v2] iface-modem-3gpp: clear deferred registration state update when disabling

2013-03-01 Thread Ben Chan
On Thu, Feb 28, 2013 at 11:46 PM, Aleksander Morgado wrote: > On 02/28/2013 08:11 PM, Ben Chan wrote: > > --- > > src/mm-iface-modem-3gpp.c | 15 +++ > > 1 file changed, 15 insertions(+) > > > > I pushed it after modifying it to include the > clea

[MM] [PATCH v2] iface-modem-3gpp: clear deferred registration state update when disabling

2013-02-28 Thread Ben Chan
--- src/mm-iface-modem-3gpp.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index fa8da1a..2430056 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -1325,6 +1325,18 @@ periodic_registration_check_

Re: [MM] [PATCH] iface-modem-3gpp: clear deferred registration state update when disabling

2013-02-28 Thread Ben Chan
One question inline On Feb 28, 2013 12:23 AM, "Aleksander Morgado" wrote: > > On 02/27/2013 11:04 PM, Ben Chan wrote: > > --- > > src/mm-iface-modem-3gpp.c | 18 +- > > 1 file changed, 17 insertions(+), 1 deletion(-) > > When I reviewed yo

[MM] [PATCH] iface-modem-3gpp: clear deferred registration state update when disabling

2013-02-27 Thread Ben Chan
--- src/mm-iface-modem-3gpp.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index fa8da1a..3f3a803 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -1325,6 +1325,18 @@ periodic_r

Re: [MM] [PATCH] iface-modem: fix modem state consolidation upon bearer disconnection

2013-02-20 Thread Ben Chan
Thanks! One more question that comes to my mind. Could it be possible that there is no subsystem? If that's the case, the modem state will be in the "unknown" state. Is that what we want? Ben On Wed, Feb 20, 2013 at 12:17 AM, Aleksander Morgado wrote: > On 02/20/2013 07:22

Re: [MM] [PATCH] iface-modem: fix invalid modem state consolidation

2013-02-19 Thread Ben Chan
I've found a bug in this patch and submitted a fix. Upon the disconnection of bearers, the consolidation of modem state shouldn't take the curent state into account, but simply goes through all subsystems. Thanks, Ben On Thu, Jan 24, 2013 at 12:12 AM, Aleksander Morgado wrote: > O

[MM] [PATCH] iface-modem: fix modem state consolidation upon bearer disconnection

2013-02-19 Thread Ben Chan
Patch "iface-modem: fix invalid modem state consolidation" (commit 69aff6183a9e6532b4074c89831d6dcfa81ddcce) incorrectly consolidates the modem state upon the disconnection of a bearer. The modem state remains 'connected' after the last bearer is disconnected. This patch fixes that. --- src/mm-ifa

Re: [MM] [PATCH v3] iface-modem-3gpp: defer registration state update when registration is lost

2013-02-15 Thread Ben Chan
I've rebased patch v3 on top of HEAD, so that patch v4 can be applied cleanly on HEAD. Dan, how do you think about the timeout? Thanks, Ben On Thu, Feb 14, 2013 at 11:48 PM, Aleksander Morgado wrote: > > Looks better now. > > Dan, any further comments? You were concerned about

[MM] [PATCH v4] iface-modem-3gpp: defer registration state update when registration is lost

2013-02-15 Thread Ben Chan
This patch defers the update of 3GPP registration state by 15 seconds when the registration state changes from 'registered' (home / roaming) to 'searching'. This allows a temporary loss of 3GPP registration to recover itself when relying on ModemManager to explicitly disconnect and reconnect to the

Re: [MM] [PATCH 2/2] novatel-lte: skip soft reset if modem is newly plugged in

2013-02-15 Thread Ben Chan
think it's better/safer to soft reset the modem after disabling/re-enabling it, we can reset the hotplugged value. - Ben On Fri, Feb 15, 2013 at 1:21 AM, Aleksander Morgado wrote: > Hey Ben, > > Some thoughts about this patch (which is already merged). > > On 01/18

Re: [MM] [PATCH] modem: use +CEREG to determine EPS network registration status

2013-02-15 Thread Ben Chan
f the novatel-lte plugin. Ben On Thu, Feb 14, 2013 at 11:56 PM, Aleksander Morgado wrote: > > >>> > >>> > >>> Will you be able to test my patch v2 on some of the modems you > >>> mentioned? > >> > >> Sure, can do. > > > &

Re: [MM] [PATCH] iface-modem-3gpp: defer registration state update when registration is lost

2013-02-14 Thread Ben Chan
Thanks Aleksander. Submitted patch v3. On Thu, Feb 14, 2013 at 2:01 AM, Aleksander Morgado wrote: > On 02/12/2013 02:18 AM, Ben Chan wrote: > > This patch defers the update of 3GPP registration state by 15 seconds > > when the registration state changes from 'registered'

[MM] [PATCH v3] iface-modem-3gpp: defer registration state update when registration is lost

2013-02-14 Thread Ben Chan
This patch defers the update of 3GPP registration state by 15 seconds when the registration state changes from 'registered' (home / roaming) to 'searching'. This allows a temporary loss of 3GPP registration to recover itself when relying on ModemManager to explicitly disconnect and reconnect to the

Re: [MM] [PATCH] modem: use +CEREG to determine EPS network registration status

2013-02-12 Thread Ben Chan
patch. - Ben On Mon, Feb 11, 2013 at 11:47 PM, Aleksander Morgado wrote: > On 02/11/2013 07:44 PM, Ben Chan wrote: > > Aleksander and Dan, > > > > How do you feel about this patch? > > > > > Doesn't look bad, but I really need to read it carefully as it changed

[MM] [PATCH v2] modem: use +CEREG to determine EPS network registration status

2013-02-12 Thread Ben Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default. --- This revised patch fixes a bug in the previous patch

[MM] [PATCH] iface-modem-3gpp: defer registration state update when registration is lost

2013-02-11 Thread Ben Chan
This patch defers the update of 3GPP registration state by 15 seconds when the registration state changes from 'registered' (home / roaming) to 'searching'. This allows a temporary loss of 3GPP registration to recover itself when relying on ModemManager to explicitly disconnect and reconnect to the

[MM] [PATCH] modem: use +CEREG to determine EPS network registration status

2013-02-06 Thread Ben Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default. --- src/mm-broadband-modem-qmi.c | 3 + src/mm-broad

[MM] [PATCH] iface-modem: add a missing step increment in interface_initialization_step

2013-01-30 Thread Ben Chan
--- src/mm-iface-modem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 10144aa..722664c 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -3979,6 +3979,8 @@ interface_initialization_step (InitializationContext *ctx)

[MM] [PATCH] novatel-lte: use +CFUN=4 for power down

2013-01-30 Thread Ben Chan
--- plugins/novatel/mm-broadband-modem-novatel-lte.c | 26 1 file changed, 26 insertions(+) diff --git a/plugins/novatel/mm-broadband-modem-novatel-lte.c b/plugins/novatel/mm-broadband-modem-novatel-lte.c index d32c397..9a21c4b 100644 --- a/plugins/novatel/mm-broadband-m

[MM] [PATCH] novatel-lte: retry $NWQMISTATUS check upon error during disconnect

2013-01-30 Thread Ben Chan
$NWQMISTATUS sometimes returns 'ERROR'. This patch modifies the Novatel LTE plugin to retry $NWQMISTATUS (up to 5 times) to determine if the disconnect operation succeeds. It also changes the plugin to assume that the disconnect operation succeeds if $NWQMISTATUS fails to report the current connect

[MM] [PATCH] iface-modem: rearrange initialization steps

2013-01-24 Thread Ben Chan
This patch rearranges the initialization steps in MMIfaceModem such that the following SIM related operations happen at the end of the initialization: - INITIALIZATION_STEP_UNLOCK_REQUIRED - INITIALIZATION_STEP_SIM - INITIALIZATION_STEP_OWN_NUMBERS The rationale of this change is that

[MM] [PATCH] iface-modem: fix invalid modem state consolidation

2013-01-23 Thread Ben Chan
This patch fixes get_current_consolidated_state() in MMIfaceModem to avoid invalid state transitions, e.g. from 'enabling' to 'disabled'. https://code.google.com/p/chromium-os/issues/detail?id=38173 --- src/mm-iface-modem.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) di

Re: [MM] [PATCH] iface-modem,iface-modem-simple: log time taken for succeeded operations

2013-01-21 Thread Ben Chan
Submitted a revised patch. On Mon, Jan 21, 2013 at 8:39 PM, Ben Chan wrote: > There may be better ways to collect this kind of performance data than > outputting them to ModemManager log. Is there a commonly used method > for ModemManager to report performance metrics in a way that ot

[MM] [PATCH v2] modem: log time taken for succeeded operations

2013-01-21 Thread Ben Chan
This patch logs the time taken for succeeded initialization, enabling, disabling, connection, and disconnection operations, which helps evaluate how to optimize modem plugins. --- libmm-glib/mm-common-helpers.c |7 +++ libmm-glib/mm-common-helpers.h |2 ++ src/mm-broadband-modem.c

Re: [MM] [PATCH] iface-modem,iface-modem-simple: log time taken for succeeded operations

2013-01-21 Thread Ben Chan
There may be better ways to collect this kind of performance data than outputting them to ModemManager log. Is there a commonly used method for ModemManager to report performance metrics in a way that other tools can collect and analyze them? - Ben On Mon, Jan 21, 2013 at 8:30 PM, Ben Chan

[MM] [PATCH] iface-modem, iface-modem-simple: log time taken for succeeded operations

2013-01-21 Thread Ben Chan
This patch logs the time taken for succeeded initialization, enabling, disabling, connection, and disconnection operations, which helps evaluate how to optimize modem plugins. --- libmm-glib/mm-common-helpers.c |7 +++ libmm-glib/mm-common-helpers.h |2 ++ src/mm-iface-modem-simple.c

[MM] [PATCH 2/2] novatel-lte: skip soft reset if modem is newly plugged in

2013-01-17 Thread Ben Chan
Soft resetting a Novatel LTE modem can a significant amount of time (3-4 seconds). If the modem is newly plugged in, skip the unnecessary soft reset when enabling the modem. --- plugins/novatel/mm-broadband-modem-novatel-lte.c | 108 ++ 1 files changed, 108 insertions(+), 0 de

[MM] [PATCH 1/2] core: add 'hotplugged' flag to indicate if modem is newly plugged in

2013-01-17 Thread Ben Chan
This patch adds a 'hotplugged' flag to MMBaseModem to indicate if a modem is newly plugged in. A plugin can use this information to determine if, for example, the modem needs to be soft reset using the ATZ command. Dan Williams contributed the idea of implementation. --- src/mm-base-modem.c |

[MM] [PATCH] iface-modem: schedule signal quality check more often initially

2013-01-17 Thread Ben Chan
This patch modifies MMIfaceModem to schedule the periodic signal quality check with a period of 3s instead of 30s (up to 5 periods) initially until a non-zero signal quality value is obtained and then switch back to the 30s period. --- src/mm-iface-modem.c | 36 +-

Re: [MM/QMI] Unable to select firmware when there is no SIM

2013-01-07 Thread Ben Chan
The patch addresses the firmware selection issue I mentioned. I think it can be pushed as it is. Thanks! On Mon, Jan 7, 2013 at 10:55 PM, Aleksander Morgado wrote: > On 07/01/13 23:34, Ben Chan wrote: > > Thanks for the patch and it works. > > > > Oh; cool. Not

Re: [MM/QMI] Unable to select firmware when there is no SIM

2013-01-07 Thread Ben Chan
Thanks for the patch and it works. - Ben On Mon, Jan 7, 2013 at 1:26 PM, Aleksander Morgado wrote: > On 07/01/13 19:53, Ben Chan wrote: > > Do you have any preference/suggestion on how we should approach this > > problem? I guess we may need to add additional checks in the co

Re: [MM/QMI] Unable to select firmware when there is no SIM

2013-01-07 Thread Ben Chan
Do you have any preference/suggestion on how we should approach this problem? I guess we may need to add additional checks in the code where it currently assumes a modem object in a fully initialized state. - Ben On Sun, Jan 6, 2013 at 3:10 AM, Aleksander Morgado wrote: > Hey hey

[MM/QMI] Unable to select firmware when there is no SIM

2013-01-04 Thread Ben Chan
CDMA firmware. Is it possible to continue the initialization of the modem and firmware interface when the SIM check fails? Thanks, Ben ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: [MM] [PATCH v2] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
Thanks for the notes. Submitted patch v3. - Ben On Thu, Jan 3, 2013 at 3:58 PM, Aleksander Morgado wrote: > > > +static GList * > > +scan_networks_finish (MMIfaceModem3gpp *self, > > + GAsyncResult *res, > > + GError **e

[MM] [PATCH v3] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
--- plugins/novatel/mm-broadband-modem-novatel-lte.c | 102 +- src/mm-iface-modem.c | 20 src/mm-iface-modem.h |3 + 3 files changed, 124 insertions(+), 1 deletions(-) diff --git a/plugins/novatel/mm-broadband

[MM] [PATCH v2] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
--- plugins/novatel/mm-broadband-modem-novatel-lte.c | 72 +- src/mm-iface-modem.c | 20 ++ src/mm-iface-modem.h |3 + 3 files changed, 94 insertions(+), 1 deletions(-) diff --git a/plugins/novatel/mm-broadban

Re: [MM] [PATCH] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
On Thu, Jan 3, 2013 at 1:37 PM, Aleksander Morgado wrote: > > > > Also, based on my experiments, the modem sometimes seems to hang > when > > > running AT+COPS=?. This patch avoids AT+COPS=? from being issued > when > > > the modem is in LTE mdoe. > > > > From what I can see, it al

Re: [MM] [PATCH] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
On Thu, Jan 3, 2013 at 1:17 PM, Aleksander Morgado wrote: > On 03/01/13 20:13, Ben Chan wrote: > > Also, based on my experiments, the modem sometimes seems to hang when > > running AT+COPS=?. This patch avoids AT+COPS=? from being issued when > > the modem is in LTE mdoe. &g

Re: [MM] [PATCH] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
Also, based on my experiments, the modem sometimes seems to hang when running AT+COPS=?. This patch avoids AT+COPS=? from being issued when the modem is in LTE mdoe. On Thu, Jan 3, 2013 at 11:10 AM, Ben Chan wrote: > In LTE mode, AT+COPS=? simply replies "OK" (confirmed with the m

Re: [MM] [PATCH] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-03 Thread Ben Chan
In LTE mode, AT+COPS=? simply replies "OK" (confirmed with the modem vendor) - Ben On Thu, Jan 3, 2013 at 7:46 AM, Aleksander Morgado wrote: > AT+COPS=? ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnom

[MM] [PATCH] iface-modem-3gpp, iface-modem-cdma: check for deallocated RegistrationCheckContext

2013-01-03 Thread Ben Chan
This patch fixes a crash in periodic_registration_checks_ready() due to access of an already deallocated RegistrationCheckContext. Thread 0 *CRASHED* ( SIGSEGV @ 0x ) 0x7fc344d355cd [ModemManager] - mm-iface-modem-cdma.c:1112 periodic_registration_checks_ready 0x7fc3449ea

[MM] [PATCH] iface-modem, novatel-lte: disable network scan in LTE mode

2013-01-02 Thread Ben Chan
--- plugins/novatel/mm-broadband-modem-novatel-lte.c | 73 +- src/mm-iface-modem.c | 20 ++ src/mm-iface-modem.h |3 + 3 files changed, 95 insertions(+), 1 deletions(-) diff --git a/plugins/novatel/mm-broadban

Re: [MM] [PATCH v2] serial-port: avoid opening a serial port that has been disposed

2012-12-12 Thread Ben Chan
Thanks for the patches! Ben On Wed, Dec 12, 2012 at 3:59 AM, Aleksander Morgado wrote: > > > Aleksander, thanks for the patch. I've been running suspend/resume test > > with the patch. Seems like those glib warnings (and the crash) are gone > > except for the follo

Re: [MM] [PATCH v2] serial-port: avoid opening a serial port that has been disposed

2012-12-03 Thread Ben Chan
Aleksander, thanks for the patch. I've been running suspend/resume test with the patch. Seems like those glib warnings (and the crash) are gone except for the following: (ModemManager:2858): GLib-GObject-WARNING **: gsignal.c:2576: instance `0x78624028' has no handler with id `148

Re: [MM] [PATCH v2] serial-port: avoid opening a serial port that has been disposed

2012-11-29 Thread Ben Chan
The crash happens to be a reuse of an already disposed MMSerialPort object. I'm now tracing the new/dispose paths. Ben /* Don't read any input if the current command isn't done being sent yet */ info = g_queue_peek_nth (priv->queue, 0); 49f60: 6940

Re: [MM] [PATCH v2] serial-port: avoid opening a serial port that has been disposed

2012-11-27 Thread Ben Chan
Yes, it's related to the data_available (mm-serial-port.c:767) crash ( crosbug.com/35391). I'm running suspend/resume stress test with ModemManager under valgrind. Thanks, Ben On Tue, Nov 27, 2012 at 1:13 PM, Aleksander Morgado wrote: > On 11/27/2012 09:39 PM, Ben Chan wrote: >

[MM] [PATCH v2] serial-port: avoid opening a serial port that has been disposed

2012-11-27 Thread Ben Chan
--- src/mm-serial-port.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 0a8820d..a33c745 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -69,6 +69,7 @@ static guint signals[LAST_SIGNAL] = { 0 };

Re: [MM] [PATCH] serial-port: avoid opening a serial port that has been disposed

2012-11-27 Thread Ben Chan
to check inside mm_serial_port_open(). How do you think? I can revise the patch if that makes sense. Thanks, Ben On Tue, Nov 27, 2012 at 12:03 PM, Dan Williams wrote: > On Tue, 2012-11-27 at 10:57 -0800, Ben Chan wrote: > > --- > > src/mm-serial-port.c |7 +++ >

[MM] [PATCH] serial-port: avoid opening a serial port that has been disposed

2012-11-27 Thread Ben Chan
--- src/mm-serial-port.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 0a8820d..dee2fec 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -849,6 +849,13 @@ mm_serial_port_open (MMSerialPort *self, GErr

[MM] [PATCH v2] broadband-modem: check for NULL response in parse_caps_{cpin, cgmm, gcap}

2012-11-26 Thread Ben Chan
--- src/mm-broadband-modem.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 9161c82..174de9d 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -435,10 +435,13 @@ parse_caps_gcap (MM

[MM] [PATCH] broadband-modem: check for NULL response in parse_caps_cpin and parse_caps_cgmm

2012-11-26 Thread Ben Chan
--- src/mm-broadband-modem.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 9161c82..070526f 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -465,6 +465,9 @@ parse_caps_cpin (MMBaseMode

Re: [MM] [PATCH] novatel-lte: use $NWMDN to read own number when +CNUM fails

2012-11-05 Thread Ben Chan
.$NWMDN seems to always behave properly, so that this patch uses it as a fallback. And also because $NWMDN only returns one number, I still try +CNUM first when possible. Thanks, Ben On Mon, Nov 5, 2012 at 4:48 AM, Aleksander Morgado wrote: > On 04/11/12 02:00, Ben Chan wrote: > > +CNUM m

[MM] [PATCH] novatel-lte: use $NWMDN to read own number when +CNUM fails

2012-11-03 Thread Ben Chan
+CNUM may return ERROR when the modem fails to read the own numbers from the SIM card or when the SIM card hasn't been activated. Use $NWMDN to read the MDN as a fallback, which distinguishes these two cases. --- plugins/novatel/mm-broadband-modem-novatel-lte.c | 103 ++ 1 fil

[MM PATCH] novatel-lte: increase the wait after SIM unlock to 3 seconds

2012-10-31 Thread Ben Chan
After repeated stress tests on a few Novatel E362 modems and SIM cards, it is revealed that a 3-second wait after SIM unlock is necessary for reliably reading ICCID and IMSI through the SIM interface. --- plugins/novatel/mm-broadband-modem-novatel-lte.c |4 ++-- 1 files changed, 2 insertions(+

[MM PATCH] iface-modem: load own numbers after SIM initialization

2012-10-31 Thread Ben Chan
In 3GPP, own numbers are loaded from the SIM card, the loading of own numbers should be scheduled after the SIM card is ready. --- src/mm-iface-modem.c | 34 +- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/mm-iface-modem.c b/src/mm-iface-mo

[MM PATCH 1/2] novatel-lte: handle $NWQMISTATUS responses for firmware 4.08

2012-10-18 Thread Ben Chan
In firmware 4.08, the $NWQMISTATUS command returns different values for QMI state to indicate the current connection state. This patch modifies the code to handle $NWQMISTATUS responses in firmware 1.41 and 4.08. --- plugins/novatel/mm-broadband-bearer-novatel-lte.c | 24 +++- 1

[MM PATCH 2/2] novatel-lte: retry $NWQMISTATUS upon an unknown error during connecting

2012-10-18 Thread Ben Chan
The $NWQMISTATUS command sometimes replies an ERROR shortly after calling the $NWQMICONNECT command, but then replies the proper QMI status if we retry it. This behavior is observed on an E362 modem with 4.08 firmware. (ttyUSB0): --> 'AT$NWQMICONNECT=,,"",,,"",""' (ttyUSB0): <-- 'OK'

Re: [PATCH] icera: improve parsing of access technologies in %NWSTATE response

2012-10-16 Thread Ben Chan
real issue in crosbug.com/33483 is that nwstate_to_act doesn't handle HSPA+, so I think we can fix it as follows: Thanks, Ben >From f90c8bea9dae89aceb6d7d0cf037cbc4bc73d2df Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Tue, 16 Oct 2012 00:55:40 -0700 Subject: [PATCH] icera: parse HSPA+

[PATCH] icera: improve parsing of access technologies in %NWSTATE response

2012-10-15 Thread Ben Chan
--- plugins/icera/mm-broadband-modem-icera.c | 40 +++--- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c index db70252..8267ba6 100644 --- a/plugins/icera/mm-broadband-m

Re: [MM] glib assertions

2012-09-22 Thread Ben Chan
> FYI, while running suspend/resume stress tests on various modems, MM > gives a few glib assertion warnings. I'm going to run gdb to get a > backtrace, but wonder if you know where the issue could potentially > be. > > (ModemManager:648): GLib-GIO-CRITICAL **: > g_dbus_connection_emit_signal: ass

[MM] glib assertions

2012-09-22 Thread Ben Chan
= 0x r15 = 0x rip = 0x7fcfddd69fa9 rsp = 0x7fff300c42d0 rbp = 0x Found by: call frame info Thanks, Ben ___ networkmanager-list mailing list networkmanager-list@gnome.org https://ma

[MM] [PATCH] broadband-modem: disconnect bearers only if the bearer list still exists

2012-09-22 Thread Ben Chan
This patch fixes a crash when MMBroadbandModem tries to access an already cleared bearer list during the disabling steps. Thread 0 *CRASHED* ( SIGSEGV @ 0x ) 0x7f6eed4c40a3 [ModemManager] - mm-bearer-list.c:259 mm_bearer_list_disconnect_all_bearers 0x7f6eed4cd6f8 [M

  1   2   >