8000 esp32/lteppp: improving lteppp suspend/resume mechanism · pycom/pycom-micropython-sigfox@d9085a4 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit d9085a4

Browse files
author
iwahdan88
committed
esp32/lteppp: improving lteppp suspend/resume mechanism
1 parent c887d32 commit d9085a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

esp32/lte/lteppp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ void lteppp_init(void) {
156156
lteppp_enabled = false;
157157

158158
xTaskCreatePinnedToCore(TASK_LTE, "LTE", LTE_TASK_STACK_SIZE / sizeof(StackType_t), NULL, LTE_TASK_PRIORITY, &xLTETaskHndl, 1);
159+
160+
lteppp_suspended = false;
159161
}
160162

161163
void lteppp_start (void) {
@@ -191,11 +193,13 @@ void lteppp_connect (void) {
191193
pppapi_set_default(lteppp_pcb);
192194
pppapi_set_auth(lteppp_pcb, PPPAUTHTYPE_PAP, "", "");
193195
pppapi_connect(lteppp_pcb, 0);
196+
lteppp_suspended = false;
194197
}
195198

196199
void lteppp_disconnect(void) {
197200
pppapi_close(lteppp_pcb, 0);
198201
vTaskDelay(150);
202+
lteppp_suspended = false; // reset flag here as the ppp session is entirely closed
199203
}
200204

201205
void lteppp_send_at_command (lte_task_cmd_data_t *cmd, lte_task_rsp_data_t *rsp) {

0 commit comments

Comments
 (0)
0