summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-05-09 12:32:53 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-05-09 14:45:12 +0200
commitcba3f7db657d53db910e725f95c258f4faabcbbd (patch)
treedbdcafc7eca6751ea3eb112a176ee231a0a5d423
parentd169c99dc960f02233f65b2fcfb702b76814594f (diff)
downloadModemManager-cba3f7db657d53db910e725f95c258f4faabcbbd.tar.gz
huawei: ignore ^HCSQ unsolicited messages
Newer Huawei modems use ^HCSQ to report per-interface signal quality values, but we don't know yet what each field means for each technology, so just ignore them for now. E.g.: ^HCSQ: "GSM", 53 ^HCSQ: "WCDMA", 26, 24, 43 ^HCSQ: "LTE", 40, 28, 216, 14 We also don't use this message to update current access technology information, as it is not detailed enough (e.g. WCDMA doesn't specify whether it's plain UMTS or HSDPA or HSPA+...)
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 22be4c72a..4a964d879 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -85,6 +85,7 @@ struct _MMBroadbandModemHuaweiPrivate {
GRegex *simst_regex;
GRegex *srvst_regex;
GRegex *stin_regex;
+ GRegex *hcsq_regex;
NdisdupSupport ndisdup_support;
};
@@ -2168,6 +2169,10 @@ set_ignored_unsolicited_events_handlers (MMBroadbandModemHuawei *self)
ports[i],
self->priv->stin_regex,
NULL, NULL, NULL);
+ mm_at_serial_port_add_unsolicited_msg_handler (
+ ports[i],
+ self->priv->hcsq_regex,
+ NULL, NULL, NULL);
}
}
@@ -2223,7 +2228,6 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
*/
self->priv->mode_regex = g_regex_new ("\\r\\n\\^MODE:\\s*(\\d*),?(\\d*)\\r+\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
-
self->priv->dsflowrpt_regex = g_regex_new ("\\r\\n\\^DSFLOWRPT:(.+)\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->boot_regex = g_regex_new ("\\r\\n\\^BOOT:.+\\r\\n",
@@ -2236,6 +2240,8 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->stin_regex = g_regex_new ("\\r\\n\\^STIN:.+\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+ self->priv->hcsq_regex = g_regex_new ("\\r\\n\\^HCSQ:.+\\r+\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->ndisdup_support = NDISDUP_SUPPORT_UNKNOWN;
}
@@ -2255,6 +2261,7 @@ finalize (GObject *object)
g_regex_unref (self->priv->simst_regex);
g_regex_unref (self->priv->srvst_regex);
g_regex_unref (self->priv->stin_regex);
+ g_regex_unref (self->priv->hcsq_regex);
G_OBJECT_CLASS (mm_broadband_modem_huawei_parent_class)->finalize (object);
}