From 8cac2bbdd7831c89c6227f4f7e85a3935f7733e7 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 11 May 2010 12:40:26 +0000 Subject: [PATCH] Added the possibility to reset the modem at will --- src/phone.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/phone.c b/src/phone.c index c08cb3c..2b90e19 100644 --- a/src/phone.c +++ b/src/phone.c @@ -876,6 +876,7 @@ static int _gsm_fetch_message_list_read(GSM * gsm); static int _gsm_fetch_message_list_sent(GSM * gsm); static int _gsm_fetch_message_list_unread(GSM * gsm); static int _gsm_fetch_message_list_unsent(GSM * gsm); +static int _gsm_reset(GSM * gsm); static struct { @@ -897,6 +898,7 @@ static struct { "Registered", gsm_is_registered }, { "Registration", gsm_fetch_registration }, { "Reject call", gsm_call_reject }, + { "Reset", _gsm_reset }, { "Signal level", gsm_fetch_signal_level }, { "SIM PIN status", gsm_is_pin_needed }, { "SIM PIN valid", gsm_is_pin_valid }, @@ -1024,6 +1026,11 @@ static int _gsm_fetch_message_list_unsent(GSM * gsm) { return gsm_fetch_message_list(gsm, GSM_MESSAGE_LIST_UNSENT); } + +static int _gsm_reset(GSM * gsm) +{ + return gsm_reset(gsm, 0); +} #endif