simtech: handle non-standard '+CRING' URCs

The SIM7600E ends up emitting these URCs with too many <CR>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''
This commit is contained in:
Aleksander Morgado
2019-10-15 10:40:11 +02:00
parent 395b22178c
commit 345922caa1
4 changed files with 92 additions and 0 deletions

View File

@@ -148,3 +148,16 @@ out:
return TRUE;
}
/*****************************************************************************/
/*
* Using TWO <CR> instead of one...
* <CR><CR><LF>+CRING: VOICE<CR><CR><LF>
*/
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);
}