aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2013-08-14 00:01:29 -0700
committerAleksander Morgado <aleksander@lanedo.com>2013-08-14 09:30:47 +0200
commit34f6a2b63e9053f2beabb2a5af221221d5a0f791 (patch)
tree9d74f9c8077529fddd0ac33dab176b520a33fd2b
parentf515cd1d903fefbdaec163dea3e3f0da870ff58a (diff)
huawei: implement modem reset via +CFUN=16 for MU736
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index c34acc29..f356102d 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -437,8 +437,19 @@ reset (MMIfaceModem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ const gchar *command;
+
+ /* Unlike other Huawei modems that support AT^RESET for resetting the modem,
+ * Huawei MU736 supports AT^RESET but does not reset the modem upon receiving
+ * AT^RESET. It does, however, support resetting itself via AT+CFUN=16.
+ */
+ if (g_strcmp0 (mm_iface_modem_get_model (self), "MU736") == 0)
+ command = "+CFUN=16";
+ else
+ command = "^RESET";
+
mm_base_modem_at_command (MM_BASE_MODEM (self),
- "^RESET",
+ command,
3,
FALSE,
callback,