BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

BlynkGSM_Manager

  • This is the new library, adding to the current Blynk_WiFiManager. It’s designed to help you eliminate hardcoding your Blynk credentials in ESP32 and ESP8266 boards using GSM shield (SIM800, SIM900, etc).
  • You can update GSM Modem and Blynk Credentials any time you need to change via Configure Portal. Data are saved in SPIFFS or configurable locations in EEPROM.

If it cannot connect to the Blynk server in 30 seconds, it will switch to Configuration Mode. You will see your built-in LED turned ON. In Configuration Mode, it starts a WiFi access point called ESP_xxxxxx. Connect to it using password MyESP_xxxxxx .

Selection_1

After you connected, go to http://192.168.4.1., the Browser will display the following page:

Selection_2

Enter your credentials (APN, GPRS User, GPRS Pass, GPRS PIN, Blynk Token, Server and Port).

Selection_3

Then click Save. After the board auto-restarted, you will see if it’s connected to your Blynk server successfully.

This Blynk.begin() is not a blocking call, so you can use it for critical functions requiring in loop().
Anyway, this is better for projects using Blynk just for GUI (graphical user interface).

This library is the result of discussion in this forum, thanks to @mikekgr

Releases v1.0.1

New in this version

  1. Change Synch XMLHttpRequest to Async to avoid “InvalidAccessError” DOMException (https://xhr.spec.whatwg.org/)
  2. Reduce memory usage.

Contributions and thanks

  1. Thanks to Mike Kranidis and (https://github.com/mikekgr) for initial testing the library and giving reasons, advices to start this library.

Update Jan 28th 2020

BlynkGSM_Manager libraries v1.0.1 just got included into Arduino Library Manager.
Now you can install this library directly from Arduino Library Manager.

Update Feb 09th 2020

Releases v1.0.2

New in this version

By design, Blynk user can run ESP32/ESP8266 boards with either WiFi or GSM/GPRS by using different sketches, and have to upload / update firmware to change. This library enables user to include both Blynk GSM/GPRS and WiFi libraries in one sketch, run both WiFi and GSM/GPRS simultaneously, or select one to use at runtime after reboot.

  1. This new version enables user to include both GSM/GPRS and WiFi libraries in one sketch, run both WiFi and GSM/GPRS simultaneously, or select one to use at runtime after reboot by pressing a switch.
  2. Add many more useful functions such as setConfigPortalChannel(), getFullConfigData(), etc.
  3. Completely restructure the library.

This is the terminal debug output when running both WiFi and GSM/GPRS at the same time using example TTGO_TCALL_GSM

Start TTGO-TCALL-GSM
Set GSM module baud rate
Use WiFi to connect Blynk
[3034] RFC925 Hostname = TTGO-TCALL-GSM
[3040] Header = ESP32_GSM_WFM, SSID = ****, PW = ****
[3040] Server = xxx.xxx.xxx.xxx, Port = 8080, WiFi Token = ****
[3044] APN = rogers-core-appl1.apn, GPRS User = wapuser1
[3049] GPRS PW = wap, GPRS PIN = 12345678, GSM Token = ****
[3057] Board Name = TTGO-TCALL
[3059] Header = ESP32_GSM_WFM, SSID = ****, PW = ****
[3064] Server = ***.***.***.***, Port = 8080, WiFi Token = ****
[3072] APN = rogers-core-appl1.apn, GPRS User = wapuser1
[3077] GPRS PW = wap, GPRS PIN = 12345678, GSM Token = ****
[3085] Board Name = TTGO
[3087] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP32

[3210] con2WF: start
[4711] con2WF: con OK
[4711] IP = 192.168.2.137, GW = 192.168.2.1, SN = 255.255.0.0
[4711] DNS1 = 192.168.2.1, DNS2 = 0.0.0.0
[4711] bg: WiFi connected. Try Blynk
[4714] BlynkArduinoClient.connect: Connecting to xxx.xxx.xxx.xxx:8080
[4746] Ready (ping: 6ms).
[4814] bg: WiFi+Blynk connected
gprs apn = rogers-core-appl1.apn
[4815] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP32

[4822] Modem init...
[4944] Connecting to network...
[4955] Network: Rogers Wireless
[4955] Connecting to rogers-core-appl1.apn ...
[10084] Connected to GPRS
[10094] BlynkArduinoClient.connect: Connecting to xxx.xxx.xxx.xxx:8080
[10738] Ready (ping: 315ms).
BGBGBGBGBGBGBGBGBGBG BGBGBGBGBGBGBGBGBGBG BGBGBGBGBGBGBGBGBGBG BGBGBGBGBGBGBGBGBGBG

1 Like