Serial AT suddendly stops (ESP32 + SIM800L)

tarcisioslima
Posts: 1
Joined: Wed Feb 10, 2021 7:36 pm

Serial AT suddendly stops (ESP32 + SIM800L)

Postby tarcisioslima » Wed Feb 10, 2021 9:55 pm

Hello everyone!

I am trying to keep my ESP32 connected with a server by using a GPRS modem SIM800l.

I can connect with the server, and everything works fine, until the communication with the modem suddenly stops.
For this communication, I am using using UART on GPIOs 16 and 17. It seems random, sometimes, it can comunicate for hours until stops, sometimes, it will take a few minutes to crash again.

It seems like the problem it not at the modem. I already hard reseted the modem, but this is not working. I also tried a watchdog to reset the ESP32 after 3 minutes of communication failure, and it resets (and the modem resets too), but the communication doesn't back. It seems like serial communication is freezed, even with the ESP.restart(). The only way to start the communication again, is by hard reseting the ESP32 (Turn off, turn on the energy).

I saw the ESP32 doesn't reset the UART after ESP.restart(), is that right?

How could I fully reset the ESP32, or at least reset something that can start the communication with the SIM800l again?


The only solution I found is from this post: https://github.com/espressif/arduino-esp32/issues/1584. But this post is from 2018, I thought that using Arduino IDE 1.8.13 with updated ESP32 library would solve the problem. (I added this at board manager including this link: https://dl.espressif.com/dl/package_esp32_index.json, then installing the ESP32 library directly from Arduino IDE).


Now I reinstalled the Arduino IDE, and installed the ESP32 packed following this tutorial: https://github.com/espressif/arduino-es ... windows.md

The code is running okey at the moment, but, as I said, usually runs perfect for a while, and then, it crashes. Chaging the installation mode can make any difference?

Who is online

Users browsing this forum: No registered users and 139 guests