[duplicate] Connecting to blynk-cloud.com:8442

Hi I’m using Blynk 0.5.0 library, I am using NodeMCU v1.0, This code was supposed to be running 3 days ago but now I can not connect with Blynk … Can anyone please help me? I tried reading the forums and did what was asked but I was not able to repair it :frowning:
image


#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

static const int RXPin = 4, TXPin = 5;   // GPIO 4=D2(conneect Tx of GPS) and GPIO 5=D1(Connect Rx of GPS
static const uint32_t GPSBaud = 9600; //if Baud rate 9600 didn't work in your case then use 4800

TinyGPSPlus gps; // The TinyGPS++ object
WidgetMap myMap(V0);  // V0 for virtual pin of Map Widget

SoftwareSerial ss(RXPin, TXPin);  // The serial connection to the GPS device

BlynkTimer timer;

float spd;       //Variable  to store the speed
float sats;      //Variable to store no. of satellites response
String bearing;  //Variable to store orientation or direction of GPS

char auth[] = "062b9c2e26544ae391aafac3ab52e308";              //Your Project authentication key
char ssid[] = "MIT_2016";                                       // Name of your network (HotSpot or Router name)
char pass[] = "password";                                      // Corresponding Password




//unsigned int move_index;         // moving index, to be used later
unsigned int move_index = 1;       // fixed location for now
  

void setup()
{
  Serial.begin(115200);
  Serial.println();
  ss.begin(GPSBaud);
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(5000L, checkGPS); // every 5s check if GPS is connected, only really needs to be done once
}

void checkGPS(){
  if (gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
      Blynk.virtualWrite(V4, "GPS ERROR");  // Value Display widget  on V4 if GPS not detected
  }
}

void loop()
{
 
    while (ss.available() > 0) 
    {
      // sketch displays information every time a new sentence is correctly encoded.
      if (gps.encode(ss.read()))
        displayInfo();
  }
  Blynk.run();
  timer.run();
}

void displayInfo()
{ 

  if (gps.location.isValid() ) 
  {
    
    float latitude = (gps.location.lat());     //Storing the Lat. and Lon. 
    float longitude = (gps.location.lng()); 
    
    Serial.print("LAT:  ");
    Serial.println(latitude, 6);  // float to x decimal places
    Serial.print("LONG: ");
    Serial.println(longitude, 6);
    Blynk.virtualWrite(V1, String(latitude, 6));  
    Blynk.virtualWrite(V2, String(longitude, 6));  
    myMap.location(move_index, latitude, longitude, "GPS_Location");
          myMap.clear();
    
    spd = gps.speed.kmph();               //get speed
       Blynk.virtualWrite(V3, spd);
       
       sats = gps.satellites.value();    //get number of satellites
       Blynk.virtualWrite(V4, sats);

       bearing = TinyGPSPlus::cardinal(gps.course.value()); // get the direction
       Blynk.virtualWrite(V5, bearing);               
     myMap.clear();
    
  }
  

  Serial.println();
}

You appear to be pushing 8 Blynk commands at once, every 5 seconds… should not be a problem, but…

Where you using a prior version of the library 3 days ago?

Of if always 0.5.0 was it ever running smoothly before? and for how long

What all did you do and any particular errors?

I believe I wasn’t using Blynk 0.5.0 three days ago . One of the forums said to update my libraries so I did and it became 0.5.0 but the same problem still persists

So, again… prior to 3 day ago, was it “supposed” to be running but wasn’t, or was it actually running, and if so, how stable?

It was working perfectly. It was able to connect to Blynk cloud.

OK, so your project was stable and running library version X? until three days ago, then after updating to 0.5.0 now it disconnects? correct?

If so, go back to the next version down, or whatever you were at, and test again and report.

It was working before (3 days ago) but when I tested it yesterday I wont connect to cloud blynk. So I checked the forums and according to them I needed to update the blynk libraries so I did and it became 0.5.0 so that I can connect to Blynk however, this did not solve my problem

Clarity means everything :wink:

OK, then it could be something in your network or interference, etc. Can you confirm the MCU/network works by loading in any other simple sketch and testing it on another project on your App?

Ok I have tried simpler sample codes and the problem is the same. Cant connect to blynk cloud

I also updated the Blynk app. Nodemcu was able to connect to fhe internet but fails when connecting to cloud

Could you ping the blynk-cloud.com:8442 in your terminal app on the desktop?

I am sorry I am not really could with this. How do I ping it in my terminal app?

just write

pin blynk-cloud.com
in your terminal app

or check a solution for your OS here to test with 8442 port:

image

Seems blynk server is unreachable for you due to some reasons, maybe @Dmitriy could comment later on your issue.

ok thank you very much I’ll look forward to it :slight_smile:

It is necessary that my mobile phone is connected to the same wifi connection as the microcontroller?

image

He issue is covered like 100 times on the forum. I don’t see any need for this discussion, again. Please use search and read [README] Welcome to Blynk Community!