[PATCH] Huawei: Ignore unsolicited message ^EONS

Riccardo Vangelisti riccardo.vangelisti at sadel.it
Fri Mar 24 14:43:47 UTC 2017


Ops, sorry :)


Il 24/03/2017 15:28, Aleksander Morgado ha scritto:
> Hey Riccardo,
>
> On Fri, Mar 24, 2017 at 3:03 PM, Riccardo Vangelisti
> <riccardo.vangelisti at sadel.it> wrote:
>> Hi, I've found an unsolicited message (^EONS) that broke the incoming voice
>> call in Huawei ME909s-120 modules.
>> This patch can fix it (simply ignore it).
>>
> Could you make sure the patch applies in top of git master and re-send
> it in a way I can easily import it? (e.g. git send-email or git
> format-patch)
>
> it's currently giving me an error when applying:
>
> $ git am /home/aleksander/\[PATCH\]\ Huawei\:\ Ignore\ unsolicited\
> message\ \^EONS.eml
> Applying: Huawei: Ignore unsolicited message ^EONS
> error: corrupt patch at line 16
> Patch failed at 0001 Huawei: Ignore unsolicited message ^EONS
> The copy of the patch that failed is found in: .git/rebase-apply/patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".

-------------- next part --------------
From 97891e3eea4d5c25d1e185193e24b5387892673d Mon Sep 17 00:00:00 2001
From: Riccardo Vangelisti <riccardo.vangelisti at sadel.it>
Date: Fri, 24 Mar 2017 15:35:25 +0100
Subject: [PATCH] Huawei: Ignore unsolicited message ^EONS

---
 plugins/huawei/mm-broadband-modem-huawei.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 0e375e1..4b6ba90 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -110,6 +110,7 @@ struct _MMBroadbandModemHuaweiPrivate {
     GRegex *cend_regex;
     GRegex *ddtmf_regex;
     GRegex *cschannelinfo_regex;
+    GRegex *eons_regex;
 
     /* Regex to ignore */
     GRegex *boot_regex;
@@ -3149,6 +3150,12 @@ set_voice_unsolicited_events_handlers (MMBroadbandModemHuawei *self,
             port,
             self->priv->cschannelinfo_regex,
             NULL, NULL, NULL);
+
+        /* Ignore this message (Huawei ME909s-120 firmware. 23.613.61.00.00) */
+        mm_port_serial_at_add_unsolicited_msg_handler (
+            port,
+            self->priv->eons_regex,
+            NULL, NULL, NULL);
     }
 
     g_list_free_full (ports, (GDestroyNotify)g_object_unref);
@@ -4474,6 +4481,13 @@ mm_broadband_modem_huawei_init (MMBroadbandModemHuawei *self)
     self->priv->cschannelinfo_regex = g_regex_new ("\\r\\n\\^CSCHANNELINFO:\\s*(\\d+),(\\d+)\\r\\n",
                                                     G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
 
+    /* Voice: Unknown message that's broke ATA command
+     * <CR><LF>^EONS:<type><CR><LF>
+     */
+    self->priv->eons_regex = g_regex_new ("\\r\\n\\^EONS:\\s*(\\d+)\\r\\n",
+                                                    G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+
+
 
     self->priv->ndisdup_support = FEATURE_SUPPORT_UNKNOWN;
     self->priv->rfswitch_support = FEATURE_SUPPORT_UNKNOWN;
@@ -4529,6 +4543,7 @@ finalize (GObject *object)
     g_regex_unref (self->priv->cend_regex);
     g_regex_unref (self->priv->ddtmf_regex);
     g_regex_unref (self->priv->cschannelinfo_regex);
+    g_regex_unref (self->priv->eons_regex);
 
     if (self->priv->syscfg_supported_modes)
         g_array_unref (self->priv->syscfg_supported_modes);
-- 
2.11.0



More information about the ModemManager-devel mailing list