[PATCH] huawei: ignore ^DSDORMANT unsolicited messages
Dan Williams
dcbw at redhat.com
Tue Aug 27 07:53:42 PDT 2013
On Tue, 2013-08-27 at 00:48 -0700, Ben Chan wrote:
> This patch addresses the following issue I ran into:
>
> 2013-08-21T13:52:21.315616+00:00 localhost ModemManager[4033]: <warn>
> Couldn't parse ^RFSWITCH response:
> '^DSDORMANT:0#015#012#015#012#015#012^RFSWITCH:1,1'
> 2013-08-21T13:52:21.315656+00:00 localhost ModemManager[4033]:
> Couldn't reload current power state: Couldn't parse ^RFSWITCH
> response: '^DSDORMANT:0#015#012#015#012#015#012^RFSWITCH:1,1'
At some point though, we'll probably want an 'active' property on the
bearer which follows the dormancy. You'll see that on a lot of phones
at least, where the icon changes depending on whether the data
connection is dormant or not.
Dan
> Thanks,
> Ben
>
> On Tue, Aug 27, 2013 at 12:44 AM, Ben Chan <benchan at chromium.org> wrote:
> > ---
> > plugins/huawei/mm-broadband-modem-huawei.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
> > index 7f760f3..fffbc9b 100644
> > --- a/plugins/huawei/mm-broadband-modem-huawei.c
> > +++ b/plugins/huawei/mm-broadband-modem-huawei.c
> > @@ -90,6 +90,7 @@ struct _MMBroadbandModemHuaweiPrivate {
> > GRegex *csnr_regex;
> > GRegex *cusatp_regex;
> > GRegex *cusatend_regex;
> > + GRegex *dsdormant_regex;
> > GRegex *simst_regex;
> > GRegex *srvst_regex;
> > GRegex *stin_regex;
> > @@ -2939,6 +2940,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
> > NULL, NULL, NULL);
> > mm_at_serial_port_add_unsolicited_msg_handler (
> > ports[i],
> > + self->priv->dsdormant_regex,
> > + NULL, NULL, NULL);
> > + mm_at_serial_port_add_unsolicited_msg_handler (
> > + ports[i],
> > self->priv->simst_regex,
> > NULL, NULL, NULL);
> > mm_at_serial_port_add_unsolicited_msg_handler (
> > @@ -3034,6 +3039,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
> > G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> > self->priv->cusatend_regex = g_regex_new ("\\r\\n\\+CUSATEND\\r\\n",
> > G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> > + self->priv->dsdormant_regex = g_regex_new ("\\r\\n\\^DSDORMANT:.+\\r\\n",
> > + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> > self->priv->simst_regex = g_regex_new ("\\r\\n\\^SIMST:.+\\r\\n",
> > G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
> > self->priv->srvst_regex = g_regex_new ("\\r\\n\\^SRVST:.+\\r\\n",
> > @@ -3072,6 +3079,7 @@ finalize (GObject *object)
> > g_regex_unref (self->priv->csnr_regex);
> > g_regex_unref (self->priv->cusatp_regex);
> > g_regex_unref (self->priv->cusatend_regex);
> > + g_regex_unref (self->priv->dsdormant_regex);
> > g_regex_unref (self->priv->simst_regex);
> > g_regex_unref (self->priv->srvst_regex);
> > g_regex_unref (self->priv->stin_regex);
> > --
> > 1.8.3.1
> >
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
More information about the ModemManager-devel
mailing list