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.
This commit is contained in:
Jimmy Gysens 2020-06-25 11:29:54 +02:00 committed by Denis Kenzior
parent b1d9be030c
commit ef7e5f016b
1 changed files with 4 additions and 0 deletions

View File

@ -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