aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Lobrano <c.lobrano@gmail.com>2015-12-09 18:06:41 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-12-11 09:09:57 +0100
commit7978225934dc87bc74fac4d79a1080bc0501e581 (patch)
tree03f877255886f30d67d531e562fb7be57da4470e
parentae04c4179f423883545e9e6de8b6347c17723029 (diff)
telit: add modem_reset to telit plugin
-rw-r--r--plugins/telit/mm-broadband-modem-telit.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c
index f4fe03cd..0f772314 100644
--- a/plugins/telit/mm-broadband-modem-telit.c
+++ b/plugins/telit/mm-broadband-modem-telit.c
@@ -64,6 +64,29 @@ modem_power_down (MMIfaceModem *self,
}
/*****************************************************************************/
+/* Reset (Modem interface) */
+
+static gboolean
+modem_reset_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
+}
+
+static void
+modem_reset (MMIfaceModem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ mm_base_modem_at_command (MM_BASE_MODEM (self),
+ "AT#REBOOT",
+ 3,
+ FALSE,
+ callback,
+ user_data);
+}
+/*****************************************************************************/
/* Load access technologies (Modem interface) */
static gboolean
@@ -313,6 +336,8 @@ mm_broadband_modem_telit_init (MMBroadbandModemTelit *self)
static void
iface_modem_init (MMIfaceModem *iface)
{
+ iface->reset = modem_reset;
+ iface->reset_finish = modem_reset_finish;
iface->modem_power_down = modem_power_down;
iface->modem_power_down_finish = modem_power_down_finish;
iface->load_access_technologies = load_access_technologies;