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

2013-02-15 Thread Ben Chan
Thanks Aleksander.

I committed a a patch to the Chromium OS tree to enable EPS registration
check for the novatel-lte plugin. I'd like to see if you and Dan would like
to enable it for any LTE-capable modem by default. If so, I will submit a
follow-up patch to the modem code instead of the novatel-lte plugin.

Ben

On Thu, Feb 14, 2013 at 11:56 PM, Aleksander Morgado
aleksan...@lanedo.comwrote:


 
 
  Will you be able to test my patch v2 on some of the modems you
  mentioned?
 
  Sure, can do.
 
  The V2 patch doesn't seem to cause problems with the ADU960, but then
  again, I don't have access to the LTE networks it can use (ATT and
  Lightsquared).  After patching the code to unconditionally enable CEREG,
  the device responds correctly to CEREG requests:
 
  AT+CEREG=2
  OK
  AT+CEREG?
  +CEREG: 2,1
  OK
 
  when I'm registered on T-Mobile's GSM network.  So while I'd really like
  to have us try CEREG unconditionally if we can, I'm fine with the V2
  patch as it is.


 I just pushed the v2 patch now. Whenever we can test it properly I guess
 we can enable this by default, so not a big deal.

 Ben, will you send a patch to enable it in the novatel-lte plugin?

 --
 Aleksander

___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


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

2013-02-15 Thread Dan Williams
On Fri, 2013-02-15 at 09:20 -0800, Ben Chan wrote:
 Thanks Aleksander.
 
 
 I committed a a patch to the Chromium OS tree to enable EPS
 registration check for the novatel-lte plugin. I'd like to see if you
 and Dan would like to enable it for any LTE-capable modem by default.
 If so, I will submit a follow-up patch to the modem code instead of
 the novatel-lte plugin.

Yeah, I'd like to see it enabled by default if the modem has LTE
capability and an AT port.

Dan

 
 Ben
 
 On Thu, Feb 14, 2013 at 11:56 PM, Aleksander Morgado
 aleksan...@lanedo.com wrote:
 
 
 
  Will you be able to test my patch v2 on some of the modems
 you
  mentioned?
 
  Sure, can do.
 
  The V2 patch doesn't seem to cause problems with the ADU960,
 but then
  again, I don't have access to the LTE networks it can use
 (ATT and
  Lightsquared).  After patching the code to unconditionally
 enable CEREG,
  the device responds correctly to CEREG requests:
 
  AT+CEREG=2
  OK
  AT+CEREG?
  +CEREG: 2,1
  OK
 
  when I'm registered on T-Mobile's GSM network.  So while I'd
 really like
  to have us try CEREG unconditionally if we can, I'm fine
 with the V2
  patch as it is.
 
 
 
 I just pushed the v2 patch now. Whenever we can test it
 properly I guess
 we can enable this by default, so not a big deal.
 
 Ben, will you send a patch to enable it in the novatel-lte
 plugin?
 
 --
 Aleksander
 
 


___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


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

2013-02-12 Thread Ben Chan
Thanks Aleksander.  My patch has a typo bug
in unsolicited_registration_events_context_step where the eps_error variable
in UnsolicitedRegistrationEventsContext is not properly set to NULL after
the ownership of GError object pointed by eps_error is transfered. I've
submitted a revised patch.

- Ben

On Mon, Feb 11, 2013 at 11:47 PM, Aleksander Morgado
aleksan...@lanedo.comwrote:

 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
 lots of things. The idea is that plugins can specify whether they
 require CEREG by setting MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED to
 TRUE themselves, instead of automatically trying it when LTE support is
 found, right? I now wonder how other AT-controlled LTE modems out there,
 not just the Novatel LTE, handle this. Is anyone willing to give it a
 try with other LTE modems?


___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[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-broadband-modem.c   | 165 +++--
 src/mm-iface-modem-3gpp.c  |  51 -
 src/mm-iface-modem-3gpp.h  |  10 ++-
 src/mm-modem-helpers.c |  82 +++-
 src/mm-modem-helpers.h |   1 +
 src/tests/test-modem-helpers.c | 121 +++---
 7 files changed, 365 insertions(+), 68 deletions(-)

diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index aa82f0e..05be718 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -3984,6 +3984,7 @@ static void
 modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self,
 gboolean cs_supported,
 gboolean ps_supported,
+gboolean eps_supported,
 GAsyncReadyCallback callback,
 gpointer user_data)
 {
@@ -4138,6 +4139,7 @@ static void
 modem_3gpp_disable_unsolicited_registration_events (MMIfaceModem3gpp *self,
 gboolean cs_supported,
 gboolean ps_supported,
+gboolean eps_supported,
 GAsyncReadyCallback 
callback,
 gpointer user_data)
 {
@@ -4183,6 +4185,7 @@ static void
 modem_3gpp_enable_unsolicited_registration_events (MMIfaceModem3gpp *self,
gboolean cs_supported,
gboolean ps_supported,
+   gboolean eps_supported,
GAsyncReadyCallback 
callback,
gpointer user_data)
 {
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 3778b56..505c42a 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -86,6 +86,7 @@ enum {
 PROP_MODEM_3GPP_REGISTRATION_STATE,
 PROP_MODEM_3GPP_CS_NETWORK_SUPPORTED,
 PROP_MODEM_3GPP_PS_NETWORK_SUPPORTED,
+PROP_MODEM_3GPP_EPS_NETWORK_SUPPORTED,
 PROP_MODEM_CDMA_CDMA1X_REGISTRATION_STATE,
 PROP_MODEM_CDMA_EVDO_REGISTRATION_STATE,
 PROP_MODEM_CDMA_CDMA1X_NETWORK_SUPPORTED,
@@ -129,6 +130,7 @@ struct _MMBroadbandModemPrivate {
 MMModem3gppRegistrationState modem_3gpp_registration_state;
 gboolean modem_3gpp_cs_network_supported;
 gboolean modem_3gpp_ps_network_supported;
+gboolean modem_3gpp_eps_network_supported;
 /* Implementation helpers */
 GPtrArray *modem_3gpp_registration_regex;
 
@@ -3280,6 +3282,7 @@ registration_state_changed (MMAtSerialPort *port,
 gulong lac = 0, cell_id = 0;
 MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
 gboolean cgreg = FALSE;
+gboolean cereg = FALSE;
 GError *error = NULL;
 
 if (!mm_3gpp_parse_creg_response (match_info,
@@ -3288,6 +3291,7 @@ registration_state_changed (MMAtSerialPort *port,
   cell_id,
   act,
   cgreg,
+  cereg,
   error)) {
 mm_warn (error parsing unsolicited registration: %s,
  error  error-message ? error-message : (unknown));
@@ -3298,6 +3302,8 @@ registration_state_changed (MMAtSerialPort *port,
 /* Report new registration state */
 if (cgreg)
 mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP 
(self), state);
+else if (cereg)
+mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP 
(self), state);
 else
 mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP 
(self), state);
 
@@ -3484,12 +3490,16 @@ typedef struct {
 GSimpleAsyncResult *result;
 gboolean cs_supported;
 gboolean ps_supported;
+gboolean eps_supported;
 gboolean run_cs;
 gboolean run_ps;
+gboolean run_eps;
 gboolean running_cs;
 gboolean running_ps;
+gboolean running_eps;
 GError *cs_error;
 GError *ps_error;
+GError *eps_error;
 } RunRegistrationChecksContext;
 
 static void
@@ -3500,6 +3510,8 @@ run_registration_checks_context_complete_and_free 
(RunRegistrationChecksContext
 g_error_free (ctx-cs_error);
 if (ctx-ps_error)
 g_error_free (ctx-ps_error);
+if (ctx-eps_error)
+g_error_free (ctx-eps_error);