My projects now cannot connect to the Blynk cloud

In my router DNS server 194.33.181.2.

Well, can you give us results of ping blynk-cloud.com? With what IP it will respond?? You tried reaching blynk-cloud.com at this specific port? (for example by means of tool indicated earlier)

There were earlier problem with DNS…

The issue is not in your DNS. Its working OK since you are able to communicate with blynk-cloud.com from your other computers. What about the rest of your ESP devices - are they working OK?

Try to set in Arduino IDE → Tools → IwIP Variant → v.1.4 Prebuild, remove all the static IP address settings and ports and recompile.

But can we be sure it is the Blynk server? I had not only once problem with DNS’s and it happened that the received IP differs when querying through different DNS servers. A note: Those were not related to Blynk!

Definitely its worth to try what you suggest.

Why so old we are up to 1.8.5 now?

1 Like

Ping return IP: 139. 59. 206. 133.
This is correct IP address of Blynk cloud.

To bilbobg.

What about the rest of your ESP devices - are they working OK?

I think Yes. If I try connect to Blynk cloud using
IPAddress BlynkServerIP(139, 59, 206, 133);
Blynk.config(auth, BlynkServerIP, 8442);
(i.e. explicit IP) the device connect to the Blync cloud nice.

What it is IwariIP Vant → v.1.4 Prebuild?

That might sound a bit weird, but could you now flash the default blynk initialization procedure? It all might be just temporary DNS problem.

…And if not, then I’m OUT :face_with_raised_eyebrow:

There is reported bug on this topic related to esp core 2.4.0 and dhcp client which looks very similar to what @klg is experiencing - [https://github.com/esp8266/Arduino/issues/3970](https://github.com/esp8266/Arduino/issues/3970) - actually when I looked deeper is totally different and off-topic!

That is why I asked @klg how the rest of his devices behave, hoping that he did not re-flash them which is not the case :wink:

For me the next logical step for @klg is to upgrade to latest Arduino IDE version (1.8.5) and latest esp core (2.4.0)

One more thing pop-up in my mind :blush: @klg can add the following code to his sketch to check what DNS server address his device got from DHCP:

extern "C" {
#include "user_interface.h"
#include "lwip/err.h"
#include "lwip/dns.h"
}

void showDNS() {
  ip_addr_t dns_ip = dns_getserver(0);
  IPAddress dns = IPAddress(dns_ip.addr);
  String str = String("DNS IP Addr: ");
  str += dns.toString();  
  Serial.println(str);
} 

@klg, don’t forget to call the showDNS() in setup after you establish connection to Wi-Fi.

3 Likes

I did this and got:

Connecting to klg
[66848] Connecting to klg
[67850] Connected to WiFi
[67851] IP: 192.168.1.228
DNS IP Addr: 194.33.181.2

WiFi connected
Connecting to Blynk cloud
[67851] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.0 on ESP8266

[67999] Connecting to blynk-cloud.com:8442
Blynk.connect() = 0
[81719] Connecting to blynk-cloud.com:8442
LED on V1: on
[95718] Connecting to blynk-cloud.com:8442

DNS IP Addr: 194.33.181.2 it is same that gived me my provider

How I understand this DNS server not correctly convert domain “blynk-cloud.com” on to real IP address.
But it is not clear why on my noteboock ping goes Ok.
I forgot tell to You may be important detal. Recently I changed provider of internet because previous provider cannot give static IP. Now I have static IP (PPPoE). I pointed to provider about my problem, but they answered that should be all Ok.

There is nothing wrong with the DNS and it is translating correctly host “blynk-cloud.com” to IP addr. If it does not you want be able to ping “blynk-cloud.com” from your computer, assuming the computer is using the same DNS.

Can you configure your W-Fi router to act as DNS server for the wireless clients and forward the queries to your provider’s DNS or can you configure your Wi-Fi router to provide 8.8.8.8 as DNS server? I guess the second option would be easier.

Some minutes ago I talked with admin of my provider and explained my problem.
He answerad me that he sees: DNS send to me IP 139, 59, 206, 133, but not sees nothing from my device.

or can you configure your Wi-Fi router to provide 8.8.8.8 as DNS server? I guess the second option would be easier.

Unfortunately I could not found such option in my router.
I decide in my code instead Blynk.config(auth); using
IPAddress BlynkServerIP(139, 59, 206, 133);
Blynk.config(auth, BlynkServerIP, 8442);
Big Thanks All.

I have the same problem, and I solved put “Blynk.begin(auth, ssid, pass, IPAddress(139,59,206,133), 8442)” instead Blynk.begin(auth, ssid, pass);maybe the router can´t resolve DNS. Works fine with IP. Thanks…

Slightly older topic and you are using the wrong port… should be 8080 now.

Is There any difference betwen 8080 and 8442?
8442 Works for me.

Yes, they are different ports :stuck_out_tongue_winking_eye: … some ports get blocked others don’t…

For Cloud, it will work… at least for now. I believe I remember a comment that it may change in the future? but I couldn’t find any post yet to confirm that… this was the closest I could find recently that supports future change…

So recommending the change now is basically it is a case of pre-training for that possible inevitability.

No difference, but 80 and 8080 are recommended.