BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Can't connect to blynk-cloud anymore


#1

Hello Blynk team. It all happened in a span of 10 days, everything was running smoothly, all my Blynk projects would run normally, but one fine day every thing stopped. My Blynk app suddenly vanished and I had to reinstall it to get going. But my hard luck, may be because of that update it stopped working ( Blynk v2.20.3). Currently I am working with Blynk library version 0.5.2 on my windows 10 laptop and Android 6.0.1. I have two WiFi networks, one broadband at home and another in my college, was able to connect to both of these networks earlier. I am using ESP32 Dev Module to send DHT22 Temperature and Humidity values to Blynk-cloud.

This is the code:

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <DHT.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth [] = "437d914f907946609c4b970929013bea";

// Your WiFi credentials.
// Set password to "" for open networks.
//char ssid [] = "ECMESH";
//char pass [] = "IDontKnowNow";
char ssid [] = "Tenda_285298";
char pass [] = "avniatharv@2017";

#define DHTPIN 2          // What digital pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11     // DHT 11
#define DHTTYPE DHT22   // DHT 22, AM2302, AM2321
//#define DHTTYPE DHT21   // DHT 21, AM2301

DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void sendSensor()
{
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
Serial.print ("The current Humidity is =");
Serial.print (h);
Serial.println (" %");
Serial.print ("The current Temperature is =");
Serial.print (t);
Serial.println ("degrees C" );
  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite (V5, h);
  Blynk.virtualWrite (V6, t);
}

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

  Blynk.begin (auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin (auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin (auth, ssid, pass, IPAddress(192,168,1,100), 8442);

  dht.begin();

  // Setup a function to be called every second
  timer.setInterval(1000L, sendSensor);
}

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

I get this message in serial print:

[7082] Connected to WiFi
[7082] IP: 192.168.0.100
[7082] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.2 on ESP32

[7150] Connecting to blynk-cloud.com:80
[9204] Login timeout
[12204] Connecting to blynk-cloud.com:80
[17218] Connecting to blynk-cloud.com:80
[22227] Connecting to blynk-cloud.com:80
[24234] Login timeout
[27234] Connecting to blynk-cloud.com:80
[29241] Login timeout
[32241] Connecting to blynk-cloud.com:80
[34247] Login timeout
[37247] Connecting to blynk-cloud.com:80
[39253] Login timeout
[42253] Connecting to blynk-cloud.com:80
[47259] Connecting to blynk-cloud.com:80
[52266] Connecting to blynk-cloud.com:80
[54272] Login timeout
[57272] Connecting to blynk-cloud.com:80
[59278] Login timeout
[62278] Connecting to blynk-cloud.com:80

I am unable to find the reason why I am not able to connect to Blynk.
I tried with Blynk libraries with other versions (0.5.0&0.5.1) but it didn’t help.
Any help would be appreciated. Thank you


#2

#3

Please don’t PM other users with general assistance requests.

And I fixed your code formatting. as is required in the instructions…

http://docs.blynk.cc/#troubleshooting


#4

I don’t think that there is any issue with hardware(esp32) because I used NodeMcu(ESP8266-12E) but that also didn’t work.