Cinterion plugin (in)compatibilities

Colin Helliwell colin.helliwell at ln-systems.com
Tue Feb 14 09:51:54 UTC 2017


> On 14 February 2017 at 09:30 Aleksander Morgado <aleksander at aleksander.es> wrote:
> 
> On Tue, Feb 14, 2017 at 10:10 AM, Colin Helliwell
> 
> <colin.helliwell at ln-systems.com> wrote:
> 
> > >
> > ...
> > 
> > > I'm not confident of correctly interpreting the regex in smong_query_ready() (let alone fixing it properly!), but I wonder if the SMONG problem is that it's getting an additional CRLF. The response to the command is
> > > 
> > > GPRS MonitorBCCH G PBCCH PAT MCC MNC NOM TA RAC # Cell #
> > 
> > Sorry, that should be
> > 'GPRS MonitorBCCH G PBCCH PAT MCC MNC NOM TA RAC # Cell # 44 1 - - 234 10 - - - OK'
> 
> Could you apply this change and retry?
> 
> diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c
> b/plugins/cinterion/mm-broadband-modem-cinterion.c
> index e82f78ae..33758840 100644
> --- a/plugins/cinterion/mm-broadband-modem-cinterion.c
> +++ b/plugins/cinterion/mm-broadband-modem-cinterion.c
> @@ -677,7 +677,7 @@ smong_query_ready (MMBroadbandModemCinterion *self,
>  */
>  regex = g_regex_new (".*GPRS Monitor\\r\\n"
>  "BCCH\\s*G.*\\r\\n"
> 
> -   "(\\d*)\\s*(\\d*)\\s*", 0, 0, NULL);
> +   "\\s*(\\d*)\\s*(\\d*)\\s*", 0, 0, NULL);
> if (g_regex_match_full (regex, response, strlen (response), 0, 0,
> &match_info, NULL)) {
> gchar *gprs_status;
> MMModemAccessTechnology act;
> 

Still reporting as invalid reply, I'm afraid.

> Best thing would be to split this parsing out into its own helper
> method, and add unit tests for it.
> 
> --
> Aleksander
> https://aleksander.es
> 
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


More information about the ModemManager-devel mailing list