summaryrefslogtreecommitdiff
path: root/plugins/nokia
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2014-12-25 12:51:38 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-01-16 17:10:32 +0100
commit67392272271c9ea455f1f333289491c9b726b209 (patch)
tree7b1f5544b780775c934609a1643a89b956fca479 /plugins/nokia
parent4a0a10c795d81576bff5a2019b51f301ad72b301 (diff)
nokia: 20s for CSCS=? test command
Nokia N9 via Bluetooth DUN may require up to 20s for the supported charsets query; so update the timeout in the Nokia plugin. https://bugs.freedesktop.org/show_bug.cgi?id=87635 https://bugzilla.gnome.org/show_bug.cgi?id=741813
Diffstat (limited to 'plugins/nokia')
-rw-r--r--plugins/nokia/mm-broadband-modem-nokia.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/nokia/mm-broadband-modem-nokia.c b/plugins/nokia/mm-broadband-modem-nokia.c
index 21e76dd8..7b1438c0 100644
--- a/plugins/nokia/mm-broadband-modem-nokia.c
+++ b/plugins/nokia/mm-broadband-modem-nokia.c
@@ -184,6 +184,43 @@ load_access_technologies (MMIfaceModem *self,
}
/*****************************************************************************/
+/* Loading supported charsets (Modem interface) */
+
+static MMModemCharset
+load_supported_charsets_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ const gchar *response;
+ MMModemCharset charsets = MM_MODEM_CHARSET_UNKNOWN;
+
+ response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
+ if (!response)
+ return MM_MODEM_CHARSET_UNKNOWN;
+
+ if (!mm_3gpp_parse_cscs_test_response (response, &charsets)) {
+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
+ "Failed to parse the supported character sets response");
+ return MM_MODEM_CHARSET_UNKNOWN;
+ }
+
+ return charsets;
+}
+
+static void
+load_supported_charsets (MMIfaceModem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ mm_base_modem_at_command (MM_BASE_MODEM (self),
+ "+CSCS=?",
+ 20,
+ TRUE,
+ callback,
+ user_data);
+}
+
+/*****************************************************************************/
/* Initializing the modem (during first enabling) */
typedef struct {
@@ -367,6 +404,8 @@ iface_modem_init (MMIfaceModem *iface)
iface->modem_power_up_finish = NULL;
iface->modem_power_down = NULL;
iface->modem_power_down_finish = NULL;
+ iface->load_supported_charsets = load_supported_charsets;
+ iface->load_supported_charsets_finish = load_supported_charsets_finish;
iface->load_access_technologies = load_access_technologies;
iface->load_access_technologies_finish = load_access_technologies_finish;