sim7100: enable ppp-reset workaround
PATCH 1/1 sim7100: enable ppp-reset workaround
Implement AT+PPPTIM command handling for A76XX modems to enable PPP state reset when powering off (AT+CFUN=0). This is needed because the internal PPP engine doesn't shutdown when powering off and makes it impossible to create a new PPP session before the old have timed out. (15 sec)
--- plugins/sim7100.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-)
plugins/sim7100.c +37 -1
@@ -106,13 +106,49 @@ static void sim7100_remove(struct ofono_modem *modem)g_free (data); } +static void ppptim_cb (gboolean ok,GAtResult *result,gpointer user_data) +{ +struct ofono_modem *modem = user_data; + +DBG ("" ); + +ofono_modem_set_powered (modem, TRUE); +} + +static void ppptim_support_cb (gboolean ok,GAtResult *result, +gpointer user_data) +{ +struct ofono_modem *modem = user_data; +struct sim7100_data *data =ofono_modem_get_data (modem); + +DBG ("" ); + +if (ok) { +/* enable reset of PPP state upon AT+CFUN=0 for A76XX modems */ +g_at_chat_send (data->at,"AT+PPPTIM=1" ,NULL , ppptim_cb, + modem,NULL ); + }else { +ofono_warn ("modem doesn't support ppp reset on disable; is the " +"firmware up to date?" ); +ofono_modem_set_powered (modem, TRUE); + } +} +static void cfun_set_on_cb (gboolean ok,GAtResult *result,gpointer user_data) {struct ofono_modem *modem = user_data; +struct sim7100_data *data =ofono_modem_get_data (modem);DBG ("" ); -if (ok) +if (!ok) +return ; + +if (data->model ==SIMCOM_A76XX ) +/* does the modem support reset of PPP state upon AT+CFUN=0? */ +g_at_chat_send (data->at,"AT+PPPTIM?" ,NULL , ppptim_support_cb, + modem,NULL ); +else ofono_modem_set_powered (modem, TRUE); }
Signature · 1 line
2.50.1
This patch was applied to ofono.git (master) by Denis Kenzior <[email protected]>:
Hello:
This patch was applied to ofono.git (master)
by Denis Kenzior <[email protected]>:
Quoted 8 lines · On Tue, 19 Aug 2025 12:46:59 +0200 you wrote:
Implement AT+PPPTIM command handling for A76XX modems to enable PPP state reset when powering off (AT+CFUN=0). This is needed because the internal PPP engine doesn't shutdown when powering off and makes it impossible to create a new PPP session before the old have timed out. (15 sec)
--- plugins/sim7100.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-)
Here is the summary with links:
- sim7100: enable ppp-reset workaround
https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=d3a70b22ee37
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html