Trouble Connecting NodeMCU Board

Hello everyone,
I have an issue connecting my NodeMCU board to Blynk. It either keeps showing login timeout in the serial monitor of arduino ide or keeps showing connecting to… (when adding blynk-cloud.com and 80 or 8080 or ip address and 8080 to blynk .begin maybe or so). The application shows that I am offline. I tried pinging blynk-cloud.com but the command prompt (windows 10) shows 4 times “Request timed out” and a loss of 100%.
I need to have Blynk.run() in an iterating function inside the void loop() method: inside loop I call a recursive method which runs like infinitely because I liked to get temperature updates from sensor every second and average them every minute than average these latter ones every 15 minutes… So loop() is not empty, it calls this method which calls Blynk.run() and io.run().
What can I do to make a connection?
By the way I would like to get string inputs from the text input widget and store them in string arrays.
P.S. I have used blynk before but with Arduino UNO and USB Serial.
Please everyone I need your help. I hope I could get an answer as soon as possible.

• Hardware model + communication type: NodeMCU so using WiFi (an UNO is also included
in the project but not directly to Blynk)
• Smartphone OS: Android 8.0.0
• Blynk server or local server: what is that? I am in Lebanon if this matters
• Blynk Library version: I got it during the summer, 0.6.1 maybe

Thank you very much

That tells me that you have a serious networking issue. Try rebooting your router then your PC and try again.

The uptime on all of the Blynk cloud servers shows 100% for the past week, so the failed pings wont be because the server was down.

Until you are able to reach the server you won’t be able to make any progress with your NodeMCUs.

I think you’d be better using a timer that’s called every second, provided your temperature sensor’s specs allow this sampling frequency (i.e. you aren’t using a DHT sensor).

Pete.

It seems you are having an issue with DNS resolver. Try to use better resolver such as Cloudflare. To change DNS resolver, open a command prompt and run these two commands,

If your PC/laptop is connected to the internet via Wi-Fi,

netsh interface ip set dns name="Wi-Fi" static 1.1.1.1
netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2

If you are connected to the internet via an ethernet cable,

netsh interface ip set dns name="Ethernet" static 1.1.1.1
netsh interface ip add dns name="Ethernet" 1.0.0.1 index=2

Restart your PC after doing this and then try pinging blynk-cloud.com

That’s not going to help the NodeMCUs resolve the Blynk cloud server.
I suspect that the issue is with the router’s DNS settings, or possibly with its DHCP server.

Pete.

1 Like

How to reboot? I am using a tmp36 or something like that, the little black sensor with 3 pins and it was running ok before adding blynk.

Pete.

I already rebooted the router; the electricity went off and I waited before allowing to turn the main switch on. And I reboted now the pc using ctr+alt+delete -> power symbol -> restart but still ping shows request timed out. Any help?

Are you able to log into your router and screenshot DNS and DHCP settings?

Pete.


Using a simpler sketch the serial monitor shows:

Connected, IP address: 192.168.0.102
[4403]

    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on NodeMCU

[4409] Connecting to blynk-cloud.com:8080
[5588] Redirecting to 139.59.206.133:80
[5590] Connecting to 139.59.206.133:80
[8601] Login timeout
[10601] Connecting to 139.59.206.133:80
[13627] Login timeout
[15627] Connecting to 139.59.206.133:80
[18654] Login timeout
[20654] Connecting to 139.59.206.133:80

Note: I refreshed auth token of an old project yesterday

Error: I could not see your service on 185.255.221.133 on port ( 8080 )
Reason: Connection timed out
Using https://canyouseeme.org/ open port check tool

Microsoft Windows [Version 10.0.18362.418]
© 2019 Microsoft Corporation. All rights reserved.

C:\Windows\system32>netsh interface ip set dns name=“Wi-Fi” static 1.1.1.1

C:\Windows\system32>netsh interface ip add dns name=“Wi-Fi” 1.0.0.1 index=2

C:\Windows\system32>

Is there anything wrong/ What should I get?

If you are not running Blynk local server then you would not see any Blynk service running on your port 8080. Checking ports is irrelevant.

As @PeteKnight said please post a screenshot of your DNS and DHCP settings. You can get it from the admin page of your home router.

How to login? With the ssid and password? I couldn’t login. Maybe the internet provider uses other data.

The router credentials are often printed on the bottom of the router.

Pete.

That’s a very strange WAN side Primary DNS IP address.
I’m unable to ping 152.52.52.1 and a whois lookup says that the IP address belongs to a company called Bharti Airtel Limited in India.

However, if you’re able to use devices connected to this router to connect to the internet than I guess that it’s part of some internal double NAT system that your ISP uses.

I think I’d experiment by changing the WAN Primary to 8.8.8.8 and WAN secondary to 8.8.4.4 then save the changes and reboot the router and any devices connected to it and see what happens.
If it’s still a problem then change it back to the settings in your screenshot and contact your ISP.

Pete.

Woah! It seems to be a complicated issue. May the ISP be stealing illegal internet from foriegn countries? Anyway thank you very much for trying to help me.
Regards.

I suspect that your ISP is connected with the Indian company in some way and using some sort of shared DNS service.
The 8.8.8.8 and 8.8.4.4 DNS servers are owned by google and assuming that google isn’t blocked in your country then using their DNS servers as a test is what I’d recommend.

Pete.

Thank you very much!

It is also very strange that your ISP has assigned you a static IP. Normally ISPs assigns dynamic IP addresses. I suggest you change your WAN Connection Type from Static IP to Dynamic IP and then save configuration and restart your router.