telit: Avoid resetting the SIM
authorChristopher Vogl <christopher.vogl@hale.at>
Wed, 29 Aug 2012 15:01:09 +0000 (17:01 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 30 Aug 2012 14:45:27 +0000 (09:45 -0500)
Avoid a reset  when switching between online and offline (airplane)
mode in telit_set_online(). +CFUN accepts a second parameter (0), which
disables a reset: AT+CFUN=x,0.

plugins/telit.c

index ec57f01..2afdfc8 100644 (file)
@@ -608,7 +608,7 @@ static void telit_set_online(struct ofono_modem *modem, ofono_bool_t online,
 {
        struct telit_data *data = ofono_modem_get_data(modem);
        struct cb_data *cbd = cb_data_new(cb, user_data);
-       char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+       char const *command = online ? "AT+CFUN=1,0" : "AT+CFUN=4,0";
 
        DBG("modem %p %s", modem, online ? "online" : "offline");