From 840b2de96469a9aecc6646c149cf962cad03a1a8 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 24 Nov 2014 20:53:23 +0100 Subject: [PATCH] huawei: expect 'modem' and 'pcui' in ^GETPORTMODE responses Newer huawei modems, like the E3372, use the following ^GETPORTMODE response format: ^GETPORTMODE: TYPE: WCDMA: ,pcui:1,modem:2,ncm:3,mass:4,mass_two:5, This patch updates the parser that looks for the control TTY (pcui) and data TTY (modem). https://bugs.freedesktop.org/show_bug.cgi?id=86658 --- plugins/huawei/mm-plugin-huawei.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/huawei/mm-plugin-huawei.c b/plugins/huawei/mm-plugin-huawei.c index 30b1847..22c03de 100644 --- a/plugins/huawei/mm-plugin-huawei.c +++ b/plugins/huawei/mm-plugin-huawei.c @@ -159,6 +159,10 @@ getportmode_ready (MMPortSerialAt *port, cache_port_mode (device, response, "MDM:", TAG_HUAWEI_MODEM_PORT); cache_port_mode (device, response, "NDIS:", TAG_HUAWEI_NDIS_PORT); cache_port_mode (device, response, "DIAG:", TAG_HUAWEI_DIAG_PORT); + /* GETPORTMODE response format in newer devices... (e.g. E3372) */ + cache_port_mode (device, response, "pcui:", TAG_HUAWEI_PCUI_PORT); + cache_port_mode (device, response, "modem:", TAG_HUAWEI_MODEM_PORT); + g_object_set_data (G_OBJECT (device), TAG_GETPORTMODE_SUPPORTED, GUINT_TO_POINTER (TRUE)); /* Mark port as being AT already */ -- 2.1.3