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 (mikekgr (Mike Kranidis) · GitHub) 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

3 Likes

Update Feb 09th 2020

Releases v1.0.4

  1. Enhance Config Portal GUI.
  2. Reduce code size.

So, how it works?

If it detects no valid stored Credentials or 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.

You can set:

  1. static Config Portal IP address by using Blynk_WF.setConfigPortalIP(IPAddress(xxx, xxx, xxx, xxx))
  2. random Config Portal WiFi channel by using Blynk_WF.setConfigPortalChannel(0)
  3. selected Config Portal WiFi channel by using Blynk_WF.setConfigPortalChannel(channel)

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

Enter your credentials (WiFi SSID/Password/WiFi-Token, GPRS APN/User/Pass/PIN, Blynk Server/Port/GSM-Token).

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

Update Mar 21st 2020

Releases v1.0.5

  1. Add more modem supports. Thanks to new TinyGSM library v0.10.1+.

Supported modems

  • SIMCom SIM800 series (SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868)
  • SIMCom SIM900 series (SIM900A, SIM900D, SIM908, SIM968)
  • SIMCom WCDMA/HSPA/HSPA+ Modules (SIM5360, SIM5320, SIM5300E, SIM5300EA)
  • SIMCom LTE Modules (SIM7100E, SIM7500E, SIM7500A, SIM7600C, SIM7600E)
  • SIMCom SIM7000E CAT-M1/NB-IoT Module
  • AI-Thinker A6, A6C, A7, A20
  • ESP8266 (AT commands interface, similar to GSM modems)
  • Digi XBee WiFi and Cellular (using XBee command mode)
  • Neoway M590
  • u-blox 2G, 3G, 4G, and LTE Cat1 Cellular Modems (many modules including LEON-G100, LISA-U2xx, SARA-G3xx, SARA-U2xx, TOBY-L2xx, LARA-R2xx, MPCI-L2xx)
  • u-blox LTE-M Modems (SARA-R4xx, SARA-N4xx, but NOT SARA-N2xx)
  • Sequans Monarch LTE Cat M1/NB1 (VZM20Q)
  • Quectel BG96
  • Quectel M95
  • Quectel MC60 (alpha)

Supported boards/modules

  • Arduino MKR GSM 1400
  • GPRSbee
  • Microduino GSM
  • Adafruit FONA (Mini Cellular GSM Breakout)
  • Adafruit FONA 800/808 Shield
  • Industruino GSM
  • RAK WisLTE (alpha)
  • … other modules, based on supported modems. Some boards require special configuration.

More modems may be supported later:

  • [ ] Quectel M10, UG95
  • [ ] SIMCom SIM7020
  • [ ] Telit GL865
  • [ ] ZTE MG2639
  • [ ] Hi-Link HLK-RM04
1 Like

This is a very very great job.!! Thank you for this library.

1 Like

Releases v1.0.6

  1. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters.
  2. Dynamic custom parameters to be saved automatically in EEPROM, or SPIFFS.

Main Page:

Enter your credentials (WiFi SSID/Password/WiFi-Token, GPRS APN/User/Pass/PIN, Blynk Server/Port/GSM-Token) and dynamic custom parameters:

Thanks for using the library. It’s encouraging that the lib can provide a little help.

1 Like

Hi!

Will this work with new blynk?

Best regards,
Constantinos

It should work. @Volodymyr can confirm