ESP32+GSM .. Connecting to blynk.cloud:80 Login timeout

Hi … i’m new in the community from EGYPT .
but i have a problem with blynk server connection

it was working fine for along days , and yesterday i finally purches a pro plan for a month after many sucssfull work with blink .
but after yesterday subscribtion i have a " Connecting to blynk.cloud:80 Login timeout " error
without any change with hardware (ESP32 Wroom + SIM800L ) .

And for this error i return to the basic examble code for TinyGSM_SIM800_SIM900

/*************************************************************
  Blynk is a platform with iOS and Android apps to control
  ESP32, Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build mobile and web interfaces for any
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: https://www.blynk.io
    Sketch generator:           https://examples.blynk.cc
    Blynk community:            https://community.blynk.cc
    Follow us:                  https://www.fb.com/blynkapp
                                https://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  Attention! Please check out TinyGSM guide:
    https://tiny.cc/tinygsm-readme

  Change GPRS apm, user, pass, and Blynk auth token to run :)
  Feel free to apply it to any other example. It's simple!

 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_DEBUG // Optional, this enables lots of prints
#define BLYNK_PRINT Serial

/* Fill in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL24rrcSrty"
#define BLYNK_TEMPLATE_NAME "SIM800L Test"
#define BLYNK_AUTH_TOKEN "tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L"

// 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

// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 10

#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "YourAPN";
char user[] = "";
char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial2

// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX

TinyGsm modem(SerialAT);

void setup()
{
  // Debug console
  Serial.begin(115200);

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(115200);
  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);
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com",8080);
}

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


my terminal output …

Initializing modem...
[7667] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.3.0 on ESP32

 #StandWithUkraine    https://bit.ly/swua


[7677] Modem init...
[7709] Connecting to network...
[15122] Network: Orange EG
[15123] Connecting to YourAPN ...
[21286] Connected to GPRS
[21297] Connecting to blynk.cloud:80
[22100] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[28118] Login timeout
[28132] Connecting to blynk.cloud:80
[30597] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[36617] Login timeout
[36632] Connecting to blynk.cloud:80
[37460] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[42481] Connecting to blynk.cloud:80
[43076] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[49096] Login timeout
[49110] Connecting to blynk.cloud:80
[49477] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[55498] Login timeout
[55512] Connecting to blynk.cloud:80
[55917] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[60941] Connecting to blynk.cloud:80
[61820] <[1D|00|01|00|20]tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L
[67838] Login timeout
[67853] Connecting to blynk.cloud:80

I was working with 1.3.0 blynk library with arduino 2.2.1 IDE without any problem , but after ubove problem i upgraded the blynk library to 1.3.2 … but it not solve it .

pic from my blynk device dashboard

any help … ?
thanks :hibiscus:

please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code and serial monitor output so that it displays correctly. Triple backticks look like this: ```

1 Like

thanks :sunflower: @Madhukesh

i edited it as you say .
can you expect what the reason of this server issues?

It looks to me like you device can’t see the Blynk server.
Are you able to ping other websites via that hardware?

Pete.

1 Like

thanks @PeteKnight

How can i ping other websites via that hardware ??

Use a C++ Ping library, or an example that accesses an external server such as NTP example.

Pete.

1 Like

Hi . i was trying to do any thing to connect to server but without any change .
I bought a new sim800l and also same problem .
I try to change sim card but without any change .

any help please

What happens if you change this:

To something like this…

Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass, “lon1/blynk.cloud”, 8080);

You will need to replace “lon1” with the correct regional server for your project, which is shown in the bottom right hand corner of your web console.

Making this change has two effects:

  1. ensuring that there are no DNS issues when trying to resolve the correct server
  2. switching to port 8080 instead of port 80. This is often more successful, as many mobile ISPs block outbound traffic on port 80.

Pete.

1 Like

thanks @PeteKnight

How can i check this ??

I put the regional server for my project as you say …

but unfortunately same problem :disappointed_relieved:

/*************************************************************
  Blynk is a platform with iOS and Android apps to control
  ESP32, Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build mobile and web interfaces for any
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: https://www.blynk.io
    Sketch generator:           https://examples.blynk.cc
    Blynk community:            https://community.blynk.cc
    Follow us:                  https://www.fb.com/blynkapp
                                https://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  Attention! Please check out TinyGSM guide:
    https://tiny.cc/tinygsm-readme

  Change GPRS apm, user, pass, and Blynk auth token to run :)
  Feel free to apply it to any other example. It's simple!

 *************************************************************/

/* Comment this out to disable prints and save space */
//#define BLYNK_DEBUG // Optional, this enables lots of prints
#define BLYNK_PRINT Serial

/* Fill in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL24rrcSrty"
#define BLYNK_TEMPLATE_NAME "SIM800L Test"
#define BLYNK_AUTH_TOKEN "tlZiUKu-nUnLmX6jC0ZHD8ybignkfo-L"

// 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

// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 10

#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "YourAPN";
char user[] = "";
char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial2

// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX

TinyGsm modem(SerialAT);

void setup()
{
  // Debug console
  Serial.begin(115200);

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(115200);
  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);
  Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass, "ny3/blynk.cloud", 8080);
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com",8080);
}

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

Initializing modem...
[12441] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.3.2 on ESP32

 #StandWithUkraine    https://bit.ly/swua


[12451] Modem init...
[12482] Connecting to network...
[27797] Network: Orange EG
[27798] Connecting to YourAPN ...
[100366] Connected to GPRS
[100377] Connecting to ny3/blynk.cloud:8080
[101481] Connecting to ny3/blynk.cloud:80
[105377] Connecting to ny3/blynk.cloud:8080
[119388] Connecting to ny3/blynk.cloud:80
[133385] Connecting to ny3/blynk.cloud:8080

You can’t.
As I explained, it’s a benefit of explicitly specifying the specific regional server.

But, I made a mistake when I told you how to specify the regional server. I’t should be this…

Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass, "ny3.blynk.cloud", 8080);

or

Blynk.begin(BLYNK_AUTH_TOKEN, modem, apn, user, pass, "https://ny3.blynk.cloud", 8080);

Try both and see what happens.

Pete.

1 Like

Thanks @PeteKnight

I tried both but same issue

[13449] Modem init...
[13479] Connecting to network...
[30331] Network: Orange EG
[30331] Connecting to YourAPN ...
[71390] Connected to GPRS
[71400] Connecting to ny3.blynk.cloud:8080
[78919] Login timeout
[78933] Connecting to ny3.blynk.cloud:8080
[91725] Connecting to ny3.blynk.cloud:8080
[123470] Connecting to ny3.blynk.cloud:8080
[12445] Modem init...
[12476] Connecting to network...
[37998] Network: Orange EG
[37998] Connecting to YourAPN ...
[47009] Connected to GPRS
[47020] Connecting to https://ny3.blynk.cloud:8080
[47782] Connecting to https://ny3.blynk.cloud:80
[52020] Connecting to https://ny3.blynk.cloud:8080
[54941] Connecting to https://ny3.blynk.cloud:80
[57021] Connecting to https://ny3.blynk.cloud:8080
[57840] Connecting to https://ny3.blynk.cloud:80
[62022] Connecting to https://ny3.blynk.cloud:8080
[63881] Connecting to https://ny3.blynk.cloud:80
[67023] Connecting to https://ny3.blynk.cloud:8080
[67901] Connecting to https://ny3.blynk.cloud:80
[72024] Connecting to https://ny3.blynk.cloud:8080
[72900] Connecting to https://ny3.blynk.cloud:80
[77025] Connecting to https://ny3.blynk.cloud:8080
[77903] Connecting to https://ny3.blynk.cloud:80
[82026] Connecting to https://ny3.blynk.cloud:8080

When you said that you tried a different SIM, was this from a different provider?
Are these SIMs intended for IoT applications?

Pete.

1 Like

Yes . I was working well with sim called " WE " with Orange EG provider as you see on terminal , but when this issue appear i tried a " Vodafone " sim … but without any change .

NO ,It is Not specified to the iot applications , but as i say i was working with " WE " which is a basic / normal sim and was working well .

When you say “terminal” do you mean serial monitor?
If so, where have you posted serial monitor output that shows it working?

Pete.

Yes i’m sorry , i mean serial monitor .

this output

Please don’t post screenshots of serial output.

That screenshot doesn’t show a successful connection.

Pete.

1 Like