Sim800L not getting connected to blynk

Hey ,
I am using sim800l gsm module with arduino nano and sim800 powered by 18650 Li-ion battery, power supply is sufficient,
GSM module is connected through resistors, common ground.

The device successfully connects to the network and enters gprs mode using apn.

But after that this message keeps coming to serial output connecting to blynk-cloud.com:8080
Invalid auth token.

I used 2 SIM cards from different operators, the result is the same, the communication signal is good.

On the blynk website, the Arduino equipment specified the GSM connection type in the template.

I am using blynk 1.0.1 library and TinyGSM 0.11.5.

GSM speed is 9600.

Half a year ago, before the update, Blynk connected with
Node MCU ESP8266 and Sim800l, everything worked.

I tried to use options in the code, the result does not change “Blynk.begin (auth, modem, apn, user, pass);”
and “Blynk.begin (auth, modem, apn, user, pass,” blynk-cloud.com “, 8080);”

My code is attached at the end.

Someone please help me on this.


#define TINY_GSM_MODEM_SIM800

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>      


char auth[] = "ioFwjL-suRsYZkoRuwIfXYEncwaA7mmQ";

char apn[]  = "internet";
char user[] = "";
char pass[] = "";


#include <SoftwareSerial.h>
SoftwareSerial SerialAT(3, 4); // RX, TX 

TinyGsm modem(SerialAT);

void setup() 
{
  delay(3000);
  Serial.begin(9600);
  
  delay(10);
  
  SerialAT.begin(9600);
  delay(3000);
  
  Serial.println("Initializing modem...");
    
  Blynk.begin(auth, modem, apn, user, pass, "blynk-cloud.com", 8080);
}

void loop() 
{
  Blynk.run();
}

Hey there,
Are you using blynk IOT or legacy ?

blynk IOT

Blynk-cloud.com belongs to the old blynk, now it’s blynk.cloud

and you should read this
https://docs.blynk.io/en/blynk-1.0-and-2.0-comparison/migrate-from-1.0-to-2.0

If you use additionally these lines of the sketch

#define BLYNK_TEMPLATE_ID “TMPLEQM_tTxk”
#define BLYNK_DEVICE_NAME “Portciti”

nothing changes, I wrote them in the first version.

Is that what you mean?

You must add them, and change " Blynk-cloud.com " to " blynk.cloud "

Not when you took this screenshot…

Pete.

1 Like

Deleted libraries linked Blynk and GSM, reinstalled, changed “Blynk-cloud.com” to “blynk.cloud” started working, thanks.

Why is it displayed as 0.6.1 I don’t know …

A sketch that works:

#define BLYNK_TEMPLATE_ID "TMPLEQM_tTxk"
#define BLYNK_DEVICE_NAME "Portciti"

#define TINY_GSM_MODEM_SIM800

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>      


char auth[] = "ioFwjL-suRsYZkoRuwIfXYEncwaA7mmQ";

char apn[]  = "internet";
char user[] = "";
char pass[] = "";


#include <SoftwareSerial.h>
SoftwareSerial SerialAT(3, 4); // RX, TX 

TinyGsm modem(SerialAT);

void setup() 
{
  delay(3000);
  Serial.begin(9600);
  
  delay(10);
  
  SerialAT.begin(9600);
  delay(3000);
  
  Serial.println("Initializing modem...");
    
  Blynk.begin(auth, modem, apn, user, pass, "blynk.cloud", 8080);
}

void loop() 
{
  Blynk.run();
} ```
2 Likes