telit: fix AT#BND parsing for LE910C1-EUX
Some modems, like LE910C1-EUX, express the LTE part of #BND output in HEX format, but currently the MM parser for such case is limited to modems that have "ext_4g_bands". This commits use the new MMTelitModel info to decide how to parse #BND command output. Fixes #487
This commit is contained in:

committed by
Aleksander Morgado

parent
30a35e6dc3
commit
c208d33e5b
@@ -563,8 +563,15 @@ telit_get_4g_mm_bands (GMatchInfo *match_info,
|
||||
gchar *match_str = NULL;
|
||||
guint64 value;
|
||||
gchar **tokens = NULL;
|
||||
gboolean hex_format = FALSE;
|
||||
gboolean ok;
|
||||
|
||||
match_str = g_match_info_fetch_named (match_info, "Bands4GDec");
|
||||
if (!match_str) {
|
||||
match_str = g_match_info_fetch_named (match_info, "Bands4GHex");
|
||||
hex_format = match_str != NULL;
|
||||
}
|
||||
|
||||
match_str = g_match_info_fetch_named (match_info, "Bands4G");
|
||||
if (!match_str || match_str[0] == '\0') {
|
||||
g_set_error (&inner_error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
"Could not find 4G band flags from response");
|
||||
@@ -575,7 +582,10 @@ telit_get_4g_mm_bands (GMatchInfo *match_info,
|
||||
tokens = g_strsplit (match_str, "-", -1);
|
||||
|
||||
/* If this is a range, get upper threshold, which contains the total supported mask */
|
||||
if (!mm_get_u64_from_str (tokens[1] ? tokens[1] : tokens[0], &value)) {
|
||||
ok = hex_format?
|
||||
mm_get_u64_from_hex_str (tokens[1] ? tokens[1] : tokens[0], &value):
|
||||
mm_get_u64_from_str (tokens[1] ? tokens[1] : tokens[0], &value);
|
||||
if (!ok) {
|
||||
g_set_error (&inner_error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
"Could not parse 4G band mask from string: '%s'", match_str);
|
||||
goto out;
|
||||
@@ -608,7 +618,7 @@ telit_get_ext_4g_mm_bands (GMatchInfo *match_info,
|
||||
gchar *match_str_ext = NULL;
|
||||
guint64 value;
|
||||
|
||||
match_str = g_match_info_fetch_named (match_info, "Bands4G");
|
||||
match_str = g_match_info_fetch_named (match_info, "Bands4GHex");
|
||||
if (!match_str || match_str[0] == '\0') {
|
||||
g_set_error (&inner_error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
"Could not find 4G band hex mask flag from response");
|
||||
@@ -673,6 +683,7 @@ common_parse_bnd_response (const gchar *response,
|
||||
gboolean modem_is_3g,
|
||||
gboolean modem_is_4g,
|
||||
gboolean modem_alternate_3g_bands,
|
||||
gboolean modem_has_hex_format_4g_bands,
|
||||
gboolean modem_ext_4g_bands,
|
||||
LoadBandsType load_type,
|
||||
gpointer log_object,
|
||||
@@ -684,16 +695,25 @@ common_parse_bnd_response (const gchar *response,
|
||||
GRegex *r;
|
||||
|
||||
if (!modem_ext_4g_bands) {
|
||||
static const gchar *load_bands_regex[] = {
|
||||
[LOAD_BANDS_TYPE_SUPPORTED] = "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>[0-9\\-,]*)\\))?(,\\s*\\((?P<Bands4G>[0-9\\-,]*)\\))?",
|
||||
[LOAD_BANDS_TYPE_CURRENT] = "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?(,\\s*(?P<Bands4G>\\d+))?",
|
||||
};
|
||||
if (modem_has_hex_format_4g_bands) {
|
||||
static const gchar *load_bands_regex[] = {
|
||||
[LOAD_BANDS_TYPE_SUPPORTED] = "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>[0-9\\-,]*)\\))?(,\\s*\\((?P<Bands4GHex>[0-9A-F\\-,]*)\\))?",
|
||||
[LOAD_BANDS_TYPE_CURRENT] = "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?(,\\s*(?P<Bands4GHex>[0-9A-F]+))?",
|
||||
};
|
||||
r = g_regex_new (load_bands_regex[load_type], G_REGEX_RAW, 0, NULL);
|
||||
|
||||
} else {
|
||||
static const gchar *load_bands_regex[] = {
|
||||
[LOAD_BANDS_TYPE_SUPPORTED] = "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>[0-9\\-,]*)\\))?(,\\s*\\((?P<Bands4GDec>[0-9\\-,]*)\\))?",
|
||||
[LOAD_BANDS_TYPE_CURRENT] = "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?(,\\s*(?P<Bands4GDec>\\d+))?",
|
||||
};
|
||||
r = g_regex_new (load_bands_regex[load_type], G_REGEX_RAW, 0, NULL);
|
||||
}
|
||||
|
||||
r = g_regex_new (load_bands_regex[load_type], G_REGEX_RAW, 0, NULL);
|
||||
} else {
|
||||
static const gchar *load_bands_regex_hex[] = {
|
||||
[LOAD_BANDS_TYPE_SUPPORTED] = "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>[0-9\\-,]*)\\))?(,\\s*\\((?P<Bands4G>[0-9A-F]+)\\))?(,\\s*\\((?P<Bands4GExt>[0-9A-F]+)\\))?",
|
||||
[LOAD_BANDS_TYPE_CURRENT] = "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?(,\\s*(?P<Bands4G>[0-9A-F]+))?(,\\s*(?P<Bands4GExt>[0-9A-F]+))?",
|
||||
[LOAD_BANDS_TYPE_SUPPORTED] = "#BND:\\s*\\((?P<Bands2G>[0-9\\-,]*)\\)(,\\s*\\((?P<Bands3G>[0-9\\-,]*)\\))?(,\\s*\\((?P<Bands4GHex>[0-9A-F]+)\\))?(,\\s*\\((?P<Bands4GExt>[0-9A-F]+)\\))?",
|
||||
[LOAD_BANDS_TYPE_CURRENT] = "#BND:\\s*(?P<Bands2G>\\d+)(,\\s*(?P<Bands3G>\\d+))?(,\\s*(?P<Bands4GHex>[0-9A-F]+))?(,\\s*(?P<Bands4GExt>[0-9A-F]+))?",
|
||||
};
|
||||
|
||||
r = g_regex_new (load_bands_regex_hex[load_type], G_REGEX_RAW, 0, NULL);
|
||||
@@ -746,6 +766,7 @@ mm_telit_parse_bnd_query_response (const gchar *response,
|
||||
gboolean modem_is_3g,
|
||||
gboolean modem_is_4g,
|
||||
gboolean modem_alternate_3g_bands,
|
||||
gboolean modem_has_hex_format_4g_bands,
|
||||
gboolean modem_ext_4g_bands,
|
||||
gpointer log_object,
|
||||
GError **error)
|
||||
@@ -753,6 +774,7 @@ mm_telit_parse_bnd_query_response (const gchar *response,
|
||||
return common_parse_bnd_response (response,
|
||||
modem_is_2g, modem_is_3g, modem_is_4g,
|
||||
modem_alternate_3g_bands,
|
||||
modem_has_hex_format_4g_bands,
|
||||
modem_ext_4g_bands,
|
||||
LOAD_BANDS_TYPE_CURRENT,
|
||||
log_object,
|
||||
@@ -765,6 +787,7 @@ mm_telit_parse_bnd_test_response (const gchar *response,
|
||||
gboolean modem_is_3g,
|
||||
gboolean modem_is_4g,
|
||||
gboolean modem_alternate_3g_bands,
|
||||
gboolean modem_has_hex_format_4g_bands,
|
||||
gboolean *modem_ext_4g_bands,
|
||||
gpointer log_object,
|
||||
GError **error)
|
||||
@@ -773,6 +796,7 @@ mm_telit_parse_bnd_test_response (const gchar *response,
|
||||
return common_parse_bnd_response (response,
|
||||
modem_is_2g, modem_is_3g, modem_is_4g,
|
||||
modem_alternate_3g_bands,
|
||||
modem_has_hex_format_4g_bands,
|
||||
*modem_ext_4g_bands,
|
||||
LOAD_BANDS_TYPE_SUPPORTED,
|
||||
log_object,
|
||||
|
@@ -34,6 +34,7 @@ GArray *mm_telit_parse_bnd_query_response (const gchar *response,
|
||||
gboolean modem_is_3g,
|
||||
gboolean modem_is_4g,
|
||||
gboolean modem_alternate_3g_bands,
|
||||
gboolean modem_has_hex_format_4g_bands,
|
||||
gboolean modem_ext_4g_bands,
|
||||
gpointer log_object,
|
||||
GError **error);
|
||||
@@ -42,6 +43,7 @@ GArray *mm_telit_parse_bnd_test_response (const gchar *response,
|
||||
gboolean modem_is_3g,
|
||||
gboolean modem_is_4g,
|
||||
gboolean modem_alternate_3g_bands,
|
||||
gboolean modem_has_hex_format_4g_bands,
|
||||
gboolean *modem_ext_4g_bands,
|
||||
gpointer log_object,
|
||||
GError **error);
|
||||
|
@@ -57,6 +57,13 @@ private_free (Private *priv)
|
||||
g_slice_free (Private, priv);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_bnd_4g_format_hex (MMBaseModem *self,
|
||||
const gchar *revision)
|
||||
{
|
||||
return mm_telit_model_from_revision (revision) == MM_TELIT_MODEL_LE910C1;
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_alternate_3g_band (MMSharedTelit *self,
|
||||
Private *priv)
|
||||
@@ -221,6 +228,7 @@ load_supported_bands_ready (MMBaseModem *self,
|
||||
mm_iface_modem_is_3g (MM_IFACE_MODEM (self)),
|
||||
mm_iface_modem_is_4g (MM_IFACE_MODEM (self)),
|
||||
priv->alternate_3g_bands,
|
||||
is_bnd_4g_format_hex (self, priv->software_package_version),
|
||||
&priv->ext_4g_bands,
|
||||
self,
|
||||
&error);
|
||||
@@ -326,6 +334,7 @@ load_current_bands_ready (MMBaseModem *self,
|
||||
mm_iface_modem_is_3g (MM_IFACE_MODEM (self)),
|
||||
mm_iface_modem_is_4g (MM_IFACE_MODEM (self)),
|
||||
priv->alternate_3g_bands,
|
||||
is_bnd_4g_format_hex (self, priv->software_package_version),
|
||||
priv->ext_4g_bands,
|
||||
self,
|
||||
&error);
|
||||
|
@@ -39,6 +39,7 @@ typedef struct {
|
||||
gboolean modem_is_3g;
|
||||
gboolean modem_is_4g;
|
||||
gboolean modem_alternate_3g_bands;
|
||||
gboolean modem_has_4g_bands_hex_format;
|
||||
gboolean modem_ext_4g_bands;
|
||||
guint mm_bands_len;
|
||||
MMModemBand mm_bands [MAX_BANDS_LIST_LEN];
|
||||
@@ -46,14 +47,14 @@ typedef struct {
|
||||
|
||||
static BndResponseTest supported_band_mapping_tests [] = {
|
||||
{
|
||||
"#BND: (0-3)", TRUE, FALSE, FALSE, FALSE, FALSE, 4,
|
||||
"#BND: (0-3)", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, 4,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
MM_MODEM_BAND_G850 }
|
||||
},
|
||||
{
|
||||
"#BND: (0-3),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, 7,
|
||||
"#BND: (0-3),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 7,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
@@ -63,7 +64,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_UTRAN_8 }
|
||||
},
|
||||
{
|
||||
"#BND: (0,3),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, 7,
|
||||
"#BND: (0,3),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 7,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
@@ -73,7 +74,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_UTRAN_8 }
|
||||
},
|
||||
{
|
||||
"#BND: (0,2),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, 6,
|
||||
"#BND: (0,2),(0,2,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 6,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_G850,
|
||||
@@ -82,7 +83,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_UTRAN_8 }
|
||||
},
|
||||
{
|
||||
"#BND: (0,2),(0-4,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, 7,
|
||||
"#BND: (0,2),(0-4,5,6)", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 7,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_G850,
|
||||
@@ -92,7 +93,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_UTRAN_8 }
|
||||
},
|
||||
{
|
||||
"#BND: (0-3),(0,2,5,6),(1-1)", TRUE, TRUE, TRUE, FALSE, FALSE, 8,
|
||||
"#BND: (0-3),(0,2,5,6),(1-1)", TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, 8,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
@@ -103,7 +104,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_EUTRAN_1 }
|
||||
},
|
||||
{
|
||||
"#BND: (0),(0),(1-3)", TRUE, TRUE, TRUE, FALSE, FALSE, 5,
|
||||
"#BND: (0),(0),(1-3)", TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, 5,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_UTRAN_1,
|
||||
@@ -111,13 +112,13 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_EUTRAN_2 }
|
||||
},
|
||||
{
|
||||
"#BND: (0),(0),(1-3)", FALSE, FALSE, TRUE, FALSE, FALSE, 2,
|
||||
"#BND: (0),(0),(1-3)", FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, 2,
|
||||
{ MM_MODEM_BAND_EUTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_2 }
|
||||
},
|
||||
/* 3G alternate band settings: default */
|
||||
{
|
||||
"#BND: (0),(0,2,5,6,12,25)", FALSE, TRUE, FALSE, FALSE, FALSE, 5,
|
||||
"#BND: (0),(0,2,5,6,12,25)", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, 5,
|
||||
{ MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_UTRAN_5,
|
||||
MM_MODEM_BAND_UTRAN_8,
|
||||
@@ -126,7 +127,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
},
|
||||
/* 3G alternate band settings: alternate */
|
||||
{
|
||||
"#BND: (0),(0,2,5,6,12,13)", FALSE, TRUE, FALSE, TRUE, FALSE, 4,
|
||||
"#BND: (0),(0,2,5,6,12,13)", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, 4,
|
||||
{ MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_UTRAN_3,
|
||||
MM_MODEM_BAND_UTRAN_5,
|
||||
@@ -136,7 +137,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
* 168695967: 0xA0E189F: 0000 1010 0000 1110 0001 1000 1001 1111
|
||||
*/
|
||||
{
|
||||
"#BND: (0-5),(0),(1-168695967)", TRUE, FALSE, TRUE, FALSE, FALSE, 17,
|
||||
"#BND: (0-5),(0),(1-168695967)", TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, 17,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
@@ -157,7 +158,7 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
},
|
||||
/* 4G ext band settings: devices such as LN920 */
|
||||
{
|
||||
"#BND: (0),(0),(1003100185A),(42)", FALSE, TRUE, TRUE, FALSE, TRUE, 13,
|
||||
"#BND: (0),(0),(1003100185A),(42)", FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, 13,
|
||||
{ MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_2,
|
||||
MM_MODEM_BAND_EUTRAN_4,
|
||||
@@ -171,6 +172,22 @@ static BndResponseTest supported_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_EUTRAN_41,
|
||||
MM_MODEM_BAND_EUTRAN_66,
|
||||
MM_MODEM_BAND_EUTRAN_71 }
|
||||
},
|
||||
/* 4G band in hex format: devices such as LE910C1-EUX */
|
||||
{
|
||||
"#BND: (0),(0,5,6,13,15,23),(80800C5)", TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, 11,
|
||||
{
|
||||
MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_UTRAN_3,
|
||||
MM_MODEM_BAND_UTRAN_8,
|
||||
MM_MODEM_BAND_EUTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_3,
|
||||
MM_MODEM_BAND_EUTRAN_7,
|
||||
MM_MODEM_BAND_EUTRAN_8,
|
||||
MM_MODEM_BAND_EUTRAN_20,
|
||||
MM_MODEM_BAND_EUTRAN_28 }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -189,6 +206,7 @@ test_parse_supported_bands_response (void)
|
||||
supported_band_mapping_tests[i].modem_is_3g,
|
||||
supported_band_mapping_tests[i].modem_is_4g,
|
||||
supported_band_mapping_tests[i].modem_alternate_3g_bands,
|
||||
supported_band_mapping_tests[i].modem_has_4g_bands_hex_format,
|
||||
&modem_ext_4g_bands,
|
||||
NULL,
|
||||
&error);
|
||||
@@ -205,18 +223,18 @@ test_parse_supported_bands_response (void)
|
||||
|
||||
static BndResponseTest current_band_mapping_tests [] = {
|
||||
{
|
||||
"#BND: 0", TRUE, FALSE, FALSE, FALSE, FALSE, 2,
|
||||
"#BND: 0", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, 2,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS }
|
||||
},
|
||||
{
|
||||
"#BND: 0,5", TRUE, TRUE, FALSE, FALSE, FALSE, 3,
|
||||
"#BND: 0,5", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 3,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_UTRAN_8 }
|
||||
},
|
||||
{
|
||||
"#BND: 1,3", TRUE, TRUE, FALSE, FALSE, FALSE, 5,
|
||||
"#BND: 1,3", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 5,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_PCS,
|
||||
MM_MODEM_BAND_UTRAN_1,
|
||||
@@ -224,38 +242,38 @@ static BndResponseTest current_band_mapping_tests [] = {
|
||||
MM_MODEM_BAND_UTRAN_5 }
|
||||
},
|
||||
{
|
||||
"#BND: 2,7", TRUE, TRUE, FALSE, FALSE, FALSE, 3,
|
||||
"#BND: 2,7", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, 3,
|
||||
{ MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_G850,
|
||||
MM_MODEM_BAND_UTRAN_4 }
|
||||
},
|
||||
{
|
||||
"#BND: 3,0,1", TRUE, TRUE, TRUE, FALSE, FALSE, 4,
|
||||
"#BND: 3,0,1", TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, 4,
|
||||
{ MM_MODEM_BAND_PCS,
|
||||
MM_MODEM_BAND_G850,
|
||||
MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_1 }
|
||||
},
|
||||
{
|
||||
"#BND: 0,0,3", TRUE, FALSE, TRUE, FALSE, FALSE, 4,
|
||||
"#BND: 0,0,3", TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, 4,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_EUTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_2 }
|
||||
},
|
||||
{
|
||||
"#BND: 0,0,3", FALSE, FALSE, TRUE, FALSE, FALSE, 2,
|
||||
"#BND: 0,0,3", FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, 2,
|
||||
{ MM_MODEM_BAND_EUTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_2 }
|
||||
},
|
||||
/* 3G alternate band settings: default */
|
||||
{
|
||||
"#BND: 0,12", FALSE, TRUE, FALSE, FALSE, FALSE, 1,
|
||||
"#BND: 0,12", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, 1,
|
||||
{ MM_MODEM_BAND_UTRAN_6 }
|
||||
},
|
||||
/* 3G alternate band settings: alternate */
|
||||
{
|
||||
"#BND: 0,12", FALSE, TRUE, FALSE, TRUE, FALSE, 4,
|
||||
"#BND: 0,12", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, 4,
|
||||
{ MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_UTRAN_3,
|
||||
MM_MODEM_BAND_UTRAN_5,
|
||||
@@ -265,7 +283,7 @@ static BndResponseTest current_band_mapping_tests [] = {
|
||||
* 168695967: 0xA0E189F: 0000 1010 0000 1110 0001 1000 1001 1111
|
||||
*/
|
||||
{
|
||||
"#BND: 5,0,168695967", TRUE, FALSE, TRUE, FALSE, FALSE, 17,
|
||||
"#BND: 5,0,168695967", TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, 17,
|
||||
{ MM_MODEM_BAND_EGSM,
|
||||
MM_MODEM_BAND_DCS,
|
||||
MM_MODEM_BAND_PCS,
|
||||
@@ -286,7 +304,7 @@ static BndResponseTest current_band_mapping_tests [] = {
|
||||
},
|
||||
/* 4G ext band settings: devices such as LN920 */
|
||||
{
|
||||
"#BND: 0,0,1003100185A,42", FALSE, TRUE, TRUE, FALSE, TRUE, 13,
|
||||
"#BND: 0,0,1003100185A,42", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, 13,
|
||||
{ MM_MODEM_BAND_UTRAN_1,
|
||||
MM_MODEM_BAND_EUTRAN_2,
|
||||
MM_MODEM_BAND_EUTRAN_4,
|
||||
@@ -317,6 +335,7 @@ test_parse_current_bands_response (void)
|
||||
current_band_mapping_tests[i].modem_is_3g,
|
||||
current_band_mapping_tests[i].modem_is_4g,
|
||||
current_band_mapping_tests[i].modem_alternate_3g_bands,
|
||||
supported_band_mapping_tests[i].modem_has_4g_bands_hex_format,
|
||||
current_band_mapping_tests[i].modem_ext_4g_bands,
|
||||
NULL,
|
||||
&error);
|
||||
|
Reference in New Issue
Block a user