TinyGSM icon indicating copy to clipboard operation
TinyGSM copied to clipboard

Problem with function waitResponse

Open roysG opened this issue 3 years ago • 9 comments

Hi, I am using latest version, with module sim7070g, with library of sim7080g.

I get this errors many times.

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

Backtrace:0x400EA7EF:0x3FFB0C100x40082D21:0x3FFB0C30 0x4010C313:0x3FFC9FF0 0x4010C3BE:0x3FFCA010 0x4010A199:0x3FFCA030 0x4010A032:0x3FFCA050 0x4010A3DE:0x3FFCA0B0 0x400ECDB5:0x3FFCA170 0x401180BF:0x3FFCA1B0 0x4011608C:0x3FFCA220 0x40090405:0x3FFCA240 0x4008B31D:0x3FFCA270 0x400ea7ef: 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

0x4010c313: mbedtls_internal_sha1_process at /Users/roysabah/esp/esp-idf/components/mbedtls/port/sha/parallel_engine/esp_sha1.c:150

0x4010c3be: mbedtls_sha1_update_ret at /Users/roysabah/esp/esp-idf/components/mbedtls/port/sha/parallel_engine/esp_sha1.c:370

0x4010a199: sha1_update_wrap at /Users/roysabah/esp/esp-idf/components/mbedtls/mbedtls/library/md_wrap.c:360

0x4010a032: mbedtls_md_hmac_finish at /Users/roysabah/esp/esp-idf/components/mbedtls/mbedtls/library/md.c:414

0x4010a3de: mbedtls_pkcs5_pbkdf2_hmac at /Users/roysabah/esp/esp-idf/components/mbedtls/mbedtls/library/pkcs5.c:295

0x400ecdb5: pbkdf2_sha1 at /Users/roysabah/esp/esp-idf/components/wpa_supplicant/src/crypto/crypto_mbedtls.c:675

0x401180bf: wifi_set_config_process at ??:?

0x4011608c: ieee80211_ioctl_process at ??:?

0x40090405: ppTask at ??:?

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

E (39208) task_wdt: Print CPU 1 backtrace

Backtrace:0x40084891:0x3FFB12100x40082D21:0x3FFB1230 0x400E0288:0x3FFC5380 0x400D860B:0x3FFC53A0 0x400DE61C:0x3FFC54C0 0x400E1255:0x3FFC5500 0x4008B31D:0x3FFC5520 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

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

0x400d860b: 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

0x400de61c: 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:152 (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:1377

0x400e1255: 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`

Do i need to expand the setimeout of waitResponse? or do any other settings? Thanks.

roysG avatar Oct 14 '21 05:10 roysG

Hello,

It seems that you are blocked for a long time on waitResponse function and WDT is killing your process.

How many time are you waiting?

adrianca88 avatar Oct 20 '21 22:10 adrianca88

15 - 30 sec It happens when suddenly the model is faol to connect

On Thu, 21 Oct 2021, 1:02 Adrián Cervera Andés @.***> wrote:

Hello,

It seems that you are blocked for a long time on waitResponse function and WDT is killing your process.

How many time are you waiting?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vshymanskyy/TinyGSM/issues/596#issuecomment-948070948, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXZDOSB4FSVUVL4FYHMGLDUH436LANCNFSM5F6XXIWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

roysG avatar Oct 21 '21 03:10 roysG

You can disable WDT in long time operations using wdt_disable() (and enable again at the end of that function with wdt_enable())

adrianca88 avatar Oct 21 '21 09:10 adrianca88

Do you recommend disabling it permanently?

On Thu, Oct 21, 2021 at 12:41 PM Adrián Cervera Andés < @.***> wrote:

You can disable WDT in long time operations using wdt_disable() (and enable again at the end of that function with wdt_enable())

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vshymanskyy/TinyGSM/issues/596#issuecomment-948436463, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXZDOQ5CZYZKCWUIYHT6UDUH7N23ANCNFSM5F6XXIWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

roysG avatar Oct 21 '21 10:10 roysG

I prefer to keep it working and disable only on small parts of code (in your case it seems to be easy). It could be very useful if your board gets stuck and detect some blocking parts of code

adrianca88 avatar Oct 21 '21 13:10 adrianca88

What is the main purpose of this function?

On Thu, 21 Oct 2021, 16:38 Adrián Cervera Andés @.***> wrote:

I prefer to keep it working and disable only on small parts of code (in your case it seems to be easy)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vshymanskyy/TinyGSM/issues/596#issuecomment-948627001, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXZDOX2KF5EO475L3LJB63UIAJVXANCNFSM5F6XXIWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

roysG avatar Oct 21 '21 15:10 roysG

Here you can find the documentation:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/wdts.html

adrianca88 avatar Oct 21 '21 16:10 adrianca88

Has this issue been resolved?

SRGDamia1 avatar Nov 24 '21 16:11 SRGDamia1

Try defining this:

#define TINY_GSM_YIELD_MS 10

qt1 avatar Jun 11 '22 11:06 qt1