ublox: try to use AT+UACT=X to set current bands

This commit is contained in:
Aleksander Morgado
2017-08-22 13:37:44 +02:00
parent 91f4ea5689
commit 0239e8769b

View File

@@ -475,11 +475,12 @@ set_current_modes (MMIfaceModem *self,
}
static void
set_current_bands (MMIfaceModem *self,
set_current_bands (MMIfaceModem *_self,
GArray *bands_array,
GAsyncReadyCallback callback,
gpointer user_data)
{
MMBroadbandModemUblox *self = MM_BROADBAND_MODEM_UBLOX (_self);
GTask *task;
gchar *command;
GError *error = NULL;
@@ -487,14 +488,18 @@ set_current_bands (MMIfaceModem *self,
task = g_task_new (self, NULL, callback, user_data);
/* Build command */
if (self->priv->uact == FEATURE_SUPPORTED)
command = mm_ublox_build_uact_set_command (bands_array, &error);
else
command = mm_ublox_build_ubandsel_set_command (bands_array, &error);
if (!command) {
g_task_return_error (task, error);
g_object_unref (task);
return;
}
set_current_modes_bands_context_new (task, self, command);
set_current_modes_bands_context_new (task, _self, command);
set_current_modes_bands_step (task);
}