Re: [MM master] Re: [MM06] [PATCH] sierra: use +CFUN=4 for powering down



Den 09. sep. 2012 21:56, skrev Marius Kotsbak:
Den 09. sep. 2012 17:39, skrev Marius Kotsbak:
See patch attached.

sierra: use +CFUN=4 for powering down

 plugins/mm-modem-sierra-gsm.c |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)


See attached patch to avoid that this change causes reset when changing to cfun=1 (as we avoid running +cfun=1 if it is already in mode 1 and with this change it will be in mode 4).

--
Marius

>From ed89bf5874d248d9841da0457eb7075e1417895b Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Tue, 30 Oct 2012 18:01:23 +0100
Subject: [PATCH] sierra: avoid reset when setting cfun=1

Some Sierra modems trigger a reset of the modem when sending +cfun=1.
All sierra modems supports a second parameter to indicate that no
reset is to be done: "+cfun=1,0".
---
 plugins/sierra/mm-common-sierra.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/sierra/mm-common-sierra.c b/plugins/sierra/mm-common-sierra.c
index 1af64af..e76c366 100644
--- a/plugins/sierra/mm-common-sierra.c
+++ b/plugins/sierra/mm-common-sierra.c
@@ -115,7 +115,7 @@ get_current_functionality_status_ready (MMBaseModem *self,
      * Works well if we previously switched off the power with CFUN=4
      */
     mm_base_modem_at_command (MM_BASE_MODEM (self),
-                              "+CFUN=1",
+                              "+CFUN=1,0", /* ",0" ensures no reset */
                               3,
                               FALSE,
                               (GAsyncReadyCallback)full_functionality_status_ready,
-- 
1.7.10.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]