TinyGsm Blynk (need help to make the program run even if the sim is out of data)

If the module connects to the internet and is connected to blynk the program runs with no problem. But i have a problem when my Sim Number is not me recharged or does not have any more data in it and there is a power cycle the project just tries to connect to the cloud again and again. i am using the example from tinyGsm blynkClient. Please help to make it run even offline

You can’t do that because if the SIM is out of data, the device the SIM is in has no connection to the internet. No app can get around that. You’ll just have to pay for some more data (or use WiFi to connect the device to the internet).

I think what @Piyush_Tanwar is looking for is the ability to run the sketch in offline mode when no internet or GSM connection is available. Obviously Blynk connectivity won’t be available in this situation.

This is easily achieved with WiFi, using Blynk.config and Blynk.connect, which are non-blocking. I do t know enough about TinyGSM to know if the same approach can be used.


It should work… the whole concept of Blynk.Config() is to use other custom connection options aside from Blynk’s library managed ones

@Piyush_Tanwar check here -

And here (needs obvious library modification for GSM use)

Blynk.connect(); is a blocking command, but only until the timeout is reached. So during this time the board will not respond to any commands.

Yes, but it doesn’t totally block all code execution if there is no WiFi or Blynk connection - unlike Blynk.begin