ublox: try to use AT+UACT? to query current bands

This commit is contained in:
Aleksander Morgado
2017-09-15 10:31:21 -07:00
parent 2d0b7b4ae0
commit 91f4ea5689
+22 -3
View File
@@ -179,24 +179,43 @@ load_supported_bands (MMIfaceModem *self,
/* Load current bands (Modem interface) */
static GArray *
load_current_bands_finish (MMIfaceModem *self,
load_current_bands_finish (MMIfaceModem *_self,
GAsyncResult *res,
GError **error)
{
const gchar *response;
MMBroadbandModemUblox *self = MM_BROADBAND_MODEM_UBLOX (_self);
const gchar *response;
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
if (!response)
return NULL;
if (self->priv->uact == FEATURE_SUPPORTED)
return mm_ublox_parse_uact_response (response, error);
return mm_ublox_parse_ubandsel_response (response, error);
}
static void
load_current_bands (MMIfaceModem *self,
load_current_bands (MMIfaceModem *_self,
GAsyncReadyCallback callback,
gpointer user_data)
{
MMBroadbandModemUblox *self = MM_BROADBAND_MODEM_UBLOX (_self);
g_assert (self->priv->uact != FEATURE_SUPPORT_UNKNOWN);
if (self->priv->uact == FEATURE_SUPPORTED) {
mm_base_modem_at_command (
MM_BASE_MODEM (self),
"+UACT?",
3,
FALSE,
(GAsyncReadyCallback)callback,
user_data);
return;
}
mm_base_modem_at_command (
MM_BASE_MODEM (self),
"+UBANDSEL?",