From 345922caa10fc86dad181ccd83239af1f43fd30e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 15 Oct 2019 10:40:11 +0200 Subject: simtech: handle non-standard '+CRING' URCs The SIM7600E ends up emitting these URCs with too many s, and the generic +CRING handler doesn't catch them, interfering with other actions, e.g.: $ sudo mmcli --call 1 --accept error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response '+CRING: VOICE +CRING: VOICE'' --- plugins/simtech/mm-modem-helpers-simtech.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'plugins/simtech/mm-modem-helpers-simtech.c') diff --git a/plugins/simtech/mm-modem-helpers-simtech.c b/plugins/simtech/mm-modem-helpers-simtech.c index 5926c44f..331853d8 100644 --- a/plugins/simtech/mm-modem-helpers-simtech.c +++ b/plugins/simtech/mm-modem-helpers-simtech.c @@ -148,3 +148,16 @@ out: return TRUE; } + +/*****************************************************************************/ + +/* + * Using TWO instead of one... + * +CRING: VOICE + */ +GRegex * +mm_simtech_get_cring_urc_regex (void) +{ + return g_regex_new ("(?:\\r)+\\n\\+CRING:\\s*(\\S+)(?:\\r)+\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); +} -- cgit v1.2.3-70-g09d2