SIM800L failing after few days and requires restart


Sim800l is not responding anymore after few days of continuously working and requires restart. It won’t recover by itself or respond to any commands unless a restart or power off is made.

Restarting the Arduino does not help. If i restart only the Arduino, the module won’t initialise. If i restart the sim800l it will work for another few days.

Same behaviour on two different sim800l modules.

The module is powered by a 5v power supply, +2 electronic capacitors placed next to it. Logic levels are 3.3v and the vdd pin is connected to 3.3 v as well.its the blue version of the module.

115200 baud rate is set.

I’m currently modifying my configuration so i can reset the module using the mcu when it stops responding.

Don’t think that the high temperature is the problem as the mcu is working in my car and is really cold outside. Can it be the low ambiental temp? Min 1deg, low humidity.

Is someone else experiencing the same behaviour? Should I power the module after the diode using the proper voltage? Some more capacitors as close as possible to the chip?



I had a look on the documentation + some examples but I am still a bit confused about the connection methods. Apparently the gsm module fails after a while and it requires restart and i am looking for a proper way of doing that. When the module fails it wont respond to any commands anymore si i need to run some code after a failed initialisation or connection attempt.


The program passes this point no matter what, but how can i get a result out of this? If it is a Success or a Fail

  Blynk.config(modem, auth, "IPaddress", port);

  Blynk.connectNetwork(apn, user, pass);
  Blynk.begin(auth, modem, apn, user, pass, "IPaddress", port);

What is the difference in between those 2? The program is not passing for any of them if the connection is not successfull, it restarts the arduino.



No need to create another topic. Eventually someone with SIM800 experience will see this one, and either have an answer or not.

Meanwhile, perhaps it will fail less if at a more reasonable BAUD rate?? Have you tested at 9600?

There are basicly only two…

Blynk.Begin() tries to handle both the device network connection and Blynk Server connection.

Have you tried the basic Blynk Blink one? -

Blynk.config() handles only the Blynk Server connection. You basically need to use whatever device specific codes and/or methods that exist (they will be NON Blynk specific, thus no real SIM documentation for it here) to get it to reconnect to the internet, before attempting a Blynk reconnection.

If all it takes to get your SIM800 back up and running is a power reset, then try controlling its power source via a transistor and GPIO. Google for various methods.

And finally… I seem to recall a recent mention in this forum that there may be a service limitation for total uptime duration of GSM connections? Search around using “Sort by latest post”.



BTW, some searching found this topic…



This is where i started from.

I wil try to reduce the baudrate and see if there if it fails again.

I am using 3 hardware serials at the same time . I tough it should help avoiding getting into problems on the arduino. The arduino works ok with this speed on the other devices tough.



This is what I am aiming to do now, but in order to do that, I need to be able to run code after a failed connection attempt.

I had a look on that post and I still feel like an idiot. Isn’t the blynk.config just a config? just for setting up the auth,server,port, etc? Is this supposed to trigger the connection to blynk?

Let me see if i got it right:
modem.init() - what does this exactly do?
Blynk.connectNetwork(apn, user, pass); launches the network connection of the gsm module
Blynk.config() - setting up the parameters required for connection to the blynk server( the modem, auth, server address and the port
Blynk.connect() connecting to the blynk server wich is a blocking function

So what is the solution? :sweat_smile::blush:

I had a look on the BlynkGsmClient.h and i think i got something but i dont have the coding skills to use that :smiley: .

BLYNK_LOG1(BLYNK_F("Modem init..."));
if (!modem->begin()) {
   BLYNK_FATAL(BLYNK_F("Cannot init"));

How can I use this in my actual code to verify if the modem itinialisation was a success?



It sets up the “config”. The actual connection attempt happens with either the next time is processed or you can follow up the Blynk.config() with a Blynk.connect() command…


I do something like what you are looking for here… but with WiFi.

I do not have any GSM devices so I have nothing much experiential wise to assist with in this case.


Integrating Blynk With Custom Classes

Acording to this page, the gsm module is not able to do the auto baudrate for 115200(on my test it worked tough…) so I decided to change the setting to a fixed baudrate (115200 ) and store the setting permanently into the memory.

You can change the baud rate to 9600 on the SIM800L with the command:


Then to save this (to last between boot cycles), give the command:


To see the saved settings, give the following command:



So I tried this by using only the config, setting it up for my local server:
Blynk.config(modem, auth, "domain", port);

but, the logs are telling me that it is trying to connect to the default blynk server . Check the debug:

21:15:40.143 -> Initializing modem...
21:15:46.797 -> Config :
21:15:46.797 -> [9641] 
21:15:46.797 ->     ___  __          __
21:15:46.797 ->    / _ )/ /_ _____  / /__
21:15:46.797 ->   / _  / / // / _ \/  '_/
21:15:46.797 ->  /____/_/\_, /_//_/_/\_\
21:15:46.797 ->         /___/ v0.5.4 on Arduino Mega
21:15:46.797 -> 
21:15:46.797 -> Config Done!
21:15:49.816 -> [12651] 
21:15:49.816 ->     ___  __          __
21:15:49.816 ->    / _ )/ /_ _____  / /__
21:15:49.816 ->   / _  / / // / _ \/  '_/
21:15:49.816 ->  /____/_/\_, /_//_/_/\_\
21:15:49.855 ->         /___/ v0.5.4 on Arduino Mega
21:15:49.855 -> 
21:15:49.855 -> [12659] Modem init...
21:15:49.973 -> [12779] Init Success
21:15:49.973 -> [12785] Connecting to network...
21:15:51.777 -> [14576] Network: vodafone
21:15:51.777 -> [14577] Connecting to ...
21:15:57.183 -> [19968] Connected to GPRS
21:15:57.183 -> [19979] Connecting to
21:15:57.850 -> [20620] Invalid auth token
21:16:02.670 -> [25427] Connecting to
21:16:03.452 -> [26207] Invalid auth token

I fixed it by modifying the BlynkGsmClient.h to:

void config(TinyGsm&    gsm,
            const char* auth,
 //           const char* domain = BLYNK_DEFAULT_DOMAIN,
//            uint16_t    port   = BLYNK_DEFAULT_PORT)
            const char* domain,
            uint16_t    port )
    modem = &gsm;
    this->conn.begin(domain, port);

void begin(const char* auth,
           TinyGsm&    gsm,
           const char* apn,
           const char* user,
           const char* pass,
 //              const char* domain = BLYNK_DEFAULT_DOMAIN,
 //              uint16_t    port   = BLYNK_DEFAULT_PORT)
           const char* domain ,
           uint16_t    port   )


У меня GSM SIM900 модуль, испытывал на разных скоростях, на 9600, 115200. На обоих скоростях, через сутки, происходит разрыв соединения с интернетом. Пришел к выводу, что мой оператор связи, разрывает GPRS соединение по прошествии 24 часов. Поэтому сделал перезапуск устройства каждые сутки.



Скорость модема выставил 115200. При такой скорости пинг длиться 40 миллисекунд, а при скорости 9600 пинг длиться 130 миллисекунд. Так как много информации пересылается при каждом запросе , пришлось выставить максимальную скорость, чтобы SIM900 укладывался в интервал 2 секунды.



can you please speek english? :smiley: I had to use google translate.I might not understand you correctly.

In my case the connection with the GSM MODULE is compleetly interrupted after a random number of days.