From ef7e5f016b7ec181b63a9b772bc11d5eb0cfd246 Mon Sep 17 00:00:00 2001 From: Jimmy Gysens Date: Thu, 25 Jun 2020 11:29:54 +0200 Subject: huawei: send restore settings command on startup 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(+) (limited to 'plugins') diff --git a/plugins/huawei.c b/plugins/huawei.c index bb876701..c524cdd3 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 -- cgit v1.2.1