diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-08-22 13:37:44 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-09-15 10:31:21 -0700 |
commit | 0239e8769b90fae47e8e448fbfe86718b09d7fcd (patch) | |
tree | b7c7f8d511345b3e64c0227233f453f99fad45d6 | |
parent | 91f4ea56899b596c7d0548ed81cef8197dbd0bca (diff) |
ublox: try to use AT+UACT=X to set current bands
-rw-r--r-- | plugins/ublox/mm-broadband-modem-ublox.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/ublox/mm-broadband-modem-ublox.c b/plugins/ublox/mm-broadband-modem-ublox.c index 23f14c7c..0d4dd590 100644 --- a/plugins/ublox/mm-broadband-modem-ublox.c +++ b/plugins/ublox/mm-broadband-modem-ublox.c @@ -475,26 +475,31 @@ 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) { - GTask *task; - gchar *command; - GError *error = NULL; + MMBroadbandModemUblox *self = MM_BROADBAND_MODEM_UBLOX (_self); + GTask *task; + gchar *command; + GError *error = NULL; task = g_task_new (self, NULL, callback, user_data); /* Build command */ - command = mm_ublox_build_ubandsel_set_command (bands_array, &error); + 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); } |