vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.91k stars 713 forks source link

Modem connection is not stable #590

Closed roysG closed 2 years ago

roysG commented 2 years ago

I get many fails of connection in unexpected times.

This is the result in console:

…Network disconnected
I (220828) wifi:Total power save buffer number: 16
update wifi hotspot
[220788] ### Unhandled: RDY

+CFUN: 1

+CPIN: READY
[220864] ### Unexpected module reset!
[220865] ### TinyGSM Version: 0.11.4
[220865] ### TinyGSM Compiled Module:  TinyGsmClientSIM7080
[220997] ### Modem: SIMCOM SIM7070

Network disconnected
E (44948) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (44948) task_wdt:  - IDLE (CPU 1)
E (44948) task_wdt: Tasks currently running:
E (44948) task_wdt: CPU 0: IDLE
E (44948) task_wdt: CPU 1: loopTask
E (44948) task_wdt: Print CPU 0 (current core) backtrace

Backtrace:0x400EA537:0x3FFB0C100x40082D21:0x3FFB0C30 0x401516D7:0x3FFBB090 0x400D34C6:0x3FFBB0B0 0x400896D9:0x3FFBB0D0 0x4008B31D:0x3FFBB0F0
0x400ea537: task_wdt_isr at /Users/roysabah/esp/esp-idf/components/esp_system/task_wdt.c:191 (discriminator 3)

0x40082d21: _xt_lowint1 at /Users/roysabah/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x401516d7: cpu_ll_waiti at /Users/roysabah/esp/esp-idf/components/hal/esp32/include/hal/cpu_ll.h:183
 (inlined by) esp_pm_impl_waiti at /Users/roysabah/esp/esp-idf/components/esp_pm/pm_impl.c:828

0x400d34c6: esp_vApplicationIdleHook at /Users/roysabah/esp/esp-idf/components/esp_system/freertos_hooks.c:63

0x400896d9: prvIdleTask at /Users/roysabah/esp/esp-idf/components/freertos/tasks.c:3823 (discriminator 1)

0x4008b31d: vPortTaskWrapper at /Users/roysabah/esp/esp-idf/components/freertos/port/xtensa/port.c:168

E (44948) task_wdt: Print CPU 1 backtrace

Backtrace:0x40084891:0x3FFB12100x40082D21:0x3FFB1230 0x40089933:0x3FFBDD40 0x400DFFEC:0x3FFBDD60 0x400D7677:0x3FFBDD80 0x400DAF0C:0x3FFBDEA0 0x400E0FB9:0x3FFBDEF0 0x4008B31D:0x3FFBDF10
0x40084891: esp_crosscore_isr at /Users/roysabah/esp/esp-idf/components/esp_system/crosscore_int.c:92

0x40082d21: _xt_lowint1 at /Users/roysabah/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x40089933: vTaskDelay at /Users/roysabah/esp/esp-idf/components/freertos/tasks.c:1513

0x400dffec: delay at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/cores/esp32/esp32-hal-misc.c:175

0x400d7677: TinyGsmSim7080::waitResponse(unsigned int, String&, char const*, char const*, char const*, char const*, char const*) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmClientSIM7080.h:611

0x400daf0c: TinyGsmSim7080::waitResponse(unsigned int, char const*, char const*, char const*, char const*, char const*) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmClientSIM7080.h:709
 (inlined by) TinyGsmSim70xx<TinyGsmSim7080>::waitResponse(char const*, char const*, char const*, char const*, char const*) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmClientSIM70xx.h:449
 (inlined by) TinyGsmModem<TinyGsmSim70xx<TinyGsmSim7080> >::getRegistrationStatusXREG(char const*) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmModem.tpp:191
 (inlined by) TinyGsmSim70xx<TinyGsmSim7080>::getRegistrationStatus() at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmClientSIM70xx.h:159
 (inlined by) TinyGsmSim70xx<TinyGsmSim7080>::isNetworkConnectedImpl() at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmClientSIM70xx.h:165
 (inlined by) TinyGsmModem<TinyGsmSim70xx<TinyGsmSim7080> >::isNetworkConnected() at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmModem.tpp:77
 (inlined by) TinyGsmModem<TinyGsmSim70xx<TinyGsmSim7080> >::waitForNetworkImpl(unsigned int, bool) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmModem.tpp:204
 (inlined by) TinyGsmModem<TinyGsmSim70xx<TinyGsmSim7080> >::waitForNetwork(unsigned int, bool) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/libraries/TinyGSM/src/TinyGsmModem.tpp:81
 (inlined by) loop() at /Users/roysabah/esp/esp32-arduino-lib-builder/main/sketch.cpp:1075

0x400e0fb9: loopTask(void*) at /Users/roysabah/esp/esp32-arduino-lib-builder/components/arduino/cores/esp32/main.cpp:43

0x4008b31d: vPortTaskWrapper at /Users/roysabah/esp/esp-idf/components/freertos/port/xtensa/port.c:168

I do a force restart to esp32 when connection is fail, so it restart the esp32 and try again to connect. Sometimes it works and sometimes it fail continuously.

I am using the latest version of tinyGSM.

roysG commented 2 years ago

Sometimes i touched in the sim7070g to make test of re-connection. Is there any best practice recommended for re-connection of network?

roysG commented 2 years ago

The solution will sound so stupid, but you need to check that your wires is ok in 100% This Is AWSOME Library, Thanks You Guys!