From 8cf321aad37f40e3682c7a2f6ce872bfc633ab19 Mon Sep 17 00:00:00 2001 From: Sven Herrmann Date: Wed, 20 Jan 2021 20:25:54 +0100 Subject: [PATCH] LTE: fix conditional in lte_check_attached --- esp32/mods/modlte.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index b823883ef9..8e61193d4e 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -280,8 +280,7 @@ static bool lte_check_attached(bool legacy) { mp_hal_delay_ms(LTE_RX_TIMEOUT_MIN_MS); lte_push_at_command("AT+CEREG?", LTE_RX_TIMEOUT_MIN_MS); } - if (((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) - && (strlen(pos) >= 31) && (pos[30] == '7' || pos[30] == '9')) { + if ((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) { attached = true; } } else {