When initializing a Huawei device, send the AT&F0 command to restore the
default AT settings on device restart.

Huawei stores all APN settings, which can cause issues when changing the
APN. The AT&F0 command makes sure the device starts from a clean state.
---
 plugins/huawei.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/huawei.c b/plugins/huawei.c
index 35195e2d..681e643f 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -419,6 +419,10 @@ static void sysinfo_enable_cb(gboolean ok, GAtResult 
*result,
        g_at_chat_send(data->modem, "AT&C0", NULL, NULL, NULL, NULL);
        g_at_chat_send(data->pcui, "AT&C0", NULL, NULL, NULL, NULL);
 
+       /* Restore settings after restart */
+       g_at_chat_send(data->modem, "AT&F0", NULL, NULL, NULL, NULL);
+       g_at_chat_send(data->pcui, "AT&F0", NULL, NULL, NULL, NULL);
+
        /*
         * Ensure that the modem is using GSM character set and not IRA,
         * otherwise weirdness with umlauts and other non-ASCII characters
-- 
2.17.1
_______________________________________________
ofono mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to