I am using a Arduino with SIM800l to connect with Blynk library are updated bellow is my code
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPxxxxxx"
#define BLYNK_TEMPLATE_NAME "Device"
#define BLYNK_AUTH_TOKEN "YourAuthToken"
// Select your modem:
#define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE
//#define BLYNK_HEARTBEAT 30
#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>
char apn[] = "iot.com";
char user[] = "";
char pass[] = "";
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(2, 3); // RX, TX
TinyGsm modem(SerialAT);
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set GSM module baud rate
SerialAT.begin(9600);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();
// Unlock your SIM card with a PIN
//modem.simUnlock("1234");
Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}
and my Serial monitor Output is
[5241] Modem init...
[5477] Connecting to network...
[12267] Network: AirTel
[12268] Connecting to iot.com ...
[20352] Connected to GPRS
[20424] Connecting to blynk.cloud:80
[28437] Ready (ping: 1859ms).
[35592] Connecting to blynk.cloud:80
[112663] Connecting to blynk.cloud:8080
[114908] Connecting to blynk.cloud:80
[118553] Ready (ping: 1244ms).
[146138] Connecting to blynk.cloud:80
[149699] Ready (ping: 1786ms).
[156853] Connecting to blynk.cloud:80
[233924] Connecting to blynk.cloud:8080
[236400] Connecting to blynk.cloud:80
[250350] Ready (ping: 902ms).
[257505] Connecting to blynk.cloud:80
[334576] Connecting to blynk.cloud:8080
[337055] Connecting to blynk.cloud:80
[351188] Connecting to blynk.cloud:8080
[365620] Connecting to blynk.cloud:80
[370414] Ready (ping: 2571ms).
it will continuously trys to connect please help me with it I am trying from last 3 days to connect GSM with Blynk @PeteKnight @Oleksii-QA