diff options
author | Daniele Palmas <dnlplm@gmail.com> | 2016-10-10 14:42:45 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-10-11 10:16:24 +0200 |
commit | 6f11ff10cd8da2d431eb9596185ccb577356c6ab (patch) | |
tree | 50ae8ac54bc8d7bce2eb8fc4b7c342a875390593 /plugins/telit/mm-modem-helpers-telit.c | |
parent | d5cfad49d879a21f5f05eaa14fa5d19f12241dda (diff) |
telit: fix supported and current bands query with GE910
GE910 is a 2g only modem and when queried for bands it returns
only a 2g set of bands:
--> 'AT#BND=?<CR>'
<-- '<CR><LF>#BND: (0-3)<CR><LF><CR><LF>OK<CR><LF>'
Current regex fails, since it considers the 3g bands block mandatory.
A similar problem happens for current bands.
This patch modifies the regular expressions for properly
supporting GE910 and updates tests.
Diffstat (limited to 'plugins/telit/mm-modem-helpers-telit.c')
-rw-r--r-- | plugins/telit/mm-modem-helpers-telit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/telit/mm-modem-helpers-telit.c b/plugins/telit/mm-modem-helpers-telit.c index d71a712f..665668f5 100644 --- a/plugins/telit/mm-modem-helpers-telit.c +++ b/plugins/telit/mm-modem-helpers-telit.c @@ -162,9 +162,9 @@ mm_telit_parse_csim_response (const guint step, return retries; } -#define SUPP_BAND_RESPONSE_REGEX "#BND:\\s*\\((?P<Bands2G>.*)\\),\\s*\\((?P<Bands3G>.*)\\)" +#define SUPP_BAND_RESPONSE_REGEX "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>.*)\\))?" #define SUPP_BAND_4G_MODEM_RESPONSE_REGEX "#BND:\\s*\\((?P<Bands2G>.*)\\),\\s*\\((?P<Bands3G>.*)\\),\\s*\\((?P<Bands4G>\\d+-\\d+)\\)" -#define CURR_BAND_RESPONSE_REGEX "#BND:\\s*(?P<Bands2G>\\d+),\\s*(?P<Bands3G>\\d+)" +#define CURR_BAND_RESPONSE_REGEX "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?" #define CURR_BAND_4G_MODEM_RESPONSE_REGEX "#BND:\\s*(?P<Bands2G>\\d+),\\s*(?P<Bands3G>\\d+),\\s*(?P<Bands4G>\\d+)" /*****************************************************************************/ |