diff options
author | Jimmy Gysens <jimmy.gysens_ext@softathome.com> | 2020-06-25 11:29:54 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-06-25 11:36:20 -0500 |
commit | ef7e5f016b7ec181b63a9b772bc11d5eb0cfd246 (patch) | |
tree | 3e441e6b1a22cdd50881556bf102a82b0e233c33 /plugins | |
parent | b1d9be030c950b0d267e118b5946a687446890c0 (diff) | |
download | ofono-ef7e5f016b7ec181b63a9b772bc11d5eb0cfd246.tar.gz |
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/huawei.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |