modem-helpers: Add regex to parse CBM out of the serial stream
This will allow us to fetch cell broadcast messages. Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
committed by
Aleksander Morgado
parent
1fb74f266f
commit
8cb68e87d8
@@ -968,6 +968,16 @@ mm_3gpp_cds_regex_get (void)
|
||||
NULL);
|
||||
}
|
||||
|
||||
GRegex *
|
||||
mm_3gpp_cbm_regex_get (void)
|
||||
{
|
||||
/* +CBM: <length><CR><LF><PDU> */
|
||||
return g_regex_new ("\\r\\n\\+CBM:\\s*(\\d+)\\r\\n(.*)\\r\\n",
|
||||
G_REGEX_RAW | G_REGEX_OPTIMIZE,
|
||||
0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/* AT+WS46=? response parser
|
||||
*
|
||||
|
||||
@@ -142,6 +142,7 @@ GRegex *mm_3gpp_cgev_regex_get (void);
|
||||
GRegex *mm_3gpp_cusd_regex_get (void);
|
||||
GRegex *mm_3gpp_cmti_regex_get (void);
|
||||
GRegex *mm_3gpp_cds_regex_get (void);
|
||||
GRegex *mm_3gpp_cbm_regex_get (void);
|
||||
|
||||
/* AT+WS46=? response parser: returns array of MMModemMode values */
|
||||
GArray *mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||
|
||||
Reference in New Issue
Block a user