Cannot connect to the cloud: "Device wasn't online yet"

Hi :wave: ,

I am using an Arduino Mega with an ESP8266 module, that I try to connect with Blynk through Wi-Fi.
But I encounter the following problem: on the Blynk app it shows “Device wasn’t online yet”, I suspect that it’s due to the fact that my ESP8266 cannot establish a connection with the Blynk Cloud. In fact, when I run the example code, the ESP doesn’t seem to ping with the server.

I have done a lot of research but none seems to lead me anywhere. Does anyone have an idea ?

#define BLYNK_PRINT Serial  
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// Set ESP8266 Serial object
#define EspSerial Serial1
ESP8266 wifi(&EspSerial);
char auth[] = "I0oxxxxxxxxxxxxxx0cUJCW7iB6B";
void setup()
    Serial.begin(9600);  // Set console baud rate
    EspSerial.begin(9600);  // Set ESP8266 baud rate
    Blynk.begin(auth, wifi, "Macha","txxxxxxxxg");
void loop()

RX1 (Arduino) → TX (ESP)
TX1(Arduino) -->TX(ESP)
GND (Arduino) → GND (ESP)
3,3 V (Arduino) → 3,3V & EN (ESP)

With the mega and an esp8266-01 at best you should use a capacitor to handle the extra power consumption. Better yet a separate power supply with the grounds connected. Also try refreshing the auth code.

NOTE please use triple backticks for posting code. They are sometimes hard to find.

Thank you for your response,

So the only possible issue here is power? If so, how much does the ESP actually need, and can I power it with AA batteries?

No, it could also be your ISP blocking port 80, incorrect wiring (easy with the ESP-01), incorrect Auth code, your router needing a reboot etc etc.

Take a look at the specs for whichever ESP module you are using (something you haven’t shared).

Not really!


Hi Pete, thank you for your answer,
I have changed the auth a few times, it seems to me that it isn’t the problem, I’ll try again though. About the wiring I don’t think that something is wrong with it either. Can you please elaborate on the “ISP blocking port 80”. :slight_smile:

Yes, when you edit your original post and replace the blockquotes with triple backticks at the beginning and end of the code.
Triple backticks look like this:


It’s done

Change this to:

Blynk.begin(auth, wifi, "Macha","txxxxxxxxg"), "", 8080);

This will force the connection to use port 8080 instead of 80 as your ISP may block traffic on port 80.


I still get the same results, any other ideas?

So you’ve addressed the power issue, rebooted your router, triple-checked your wiring etc?


Wi-Fi reboot & Wiring triple-check done. Do you have any ideas on how can I address the power issue ? It’s an ESP-01

A 3.3v 1amp power supply, with the negative rail connected to the GND pin on your Arduino.

Or, you could save yourself a lot of hassle, and give yourself additional functionality including OTA updates, by choosing a better hardware platform…