8000 esp32: If state is already PPP, don't change it to ATTACHED. · gordol/pycom-micropython-sigfox@482ca51 · GitHub
[go: up one dir, main page]

Skip to content

Commit 482ca51

Browse files
author
Daniel Campora
committed
esp32: If state is already PPP, don't change it to ATTACHED.
1 parent b241201 commit 482ca51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

esp32/mods/modlte.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ static bool lte_check_attached(void) {
154154
lte_push_at_command("AT+CEREG?", LTE_RX_TIMEOUT_MIN_MS);
155155
if (((pos = strstr(modlte_rsp.data, "+CEREG: 2,1,")) || (pos = strstr(modlte_rsp.data, "+CEREG: 2,5,")))
156156
&& (strlen(pos) >= 31) && pos[30] == '7') {
157-
lteppp_set_state(E_LTE_ATTACHED);
157+
if (E_LTE_PPP != lteppp_get_state()) {
158+
lteppp_set_state(E_LTE_ATTACHED);
159+
}
158160
attached = true;
159161
} else {
160162
lte_push_at_command("AT+CFUN?", LTE_RX_TIMEOUT_MIN_MS);

0 commit comments

Comments
 (0)
0