I just wanted to let you know that there are some issues between Blynk and the Arduino core libraries for ESP8266 v.2.5.0 beta 2.
During the past few days I’ve been having wild problems with a NodeMCU that couldn’t connect to my local server. It kept trying to connect and timeout.
I am using local server on a Raspberry PI 3b+. The Raspberry is connected over ethernet to the router.
When I switched to using the core libraries 2.5.0 beta1 everything started to work.
So, I was testing the simplest of sketches, one taken from the examples
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "myAuthToken";
char ssid[] = "mySSID";
char pass[] = "myPassword";
void setup()
{
Serial.begin(9600);
Serial.println("before Blynk.begin()");
Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,86), 8080);
Serial.println("After Blynk.begin()");
}
void loop()
{
Blynk.run();
}
and what I see in the debug console is:
before Blynk.begin()
Connecting to mySSID
[27667] Connected to WiFi
[27667] IP: 192.168.1.9
[27667]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.5.4 on NodeMCU
[27745] Connecting to 192.168.1.86
[27803] <[02|00|01|00] myAuthToken
[30844] Login timeout
[32844] Connecting to 192.168.1.86
[32852] <[02|00|01|00] myAuthToken
[35855] Login timeout
[37855] Connecting to 192.168.1.86
[37864] <[02|00|01|00] myAuthToken
[40866] Login timeout
[42866] Connecting to 192.168.1.86
[42872] <[02|00|01|00] myAuthToken
[47874] Connecting to 192.168.1.86
[47879] <[02|00|01|00] myAuthToken
[50881] Login timeout
[52881] Connecting to 192.168.1.86
[52886] <[02|00|01|00] myAuthToken
[57889] Connecting to 192.168.1.86
and this goes on forever.
As you can see, it doesn’t even come out from the Blynk.begin() function.
I have tried to increase the timeout intervals, but nothing changes.
I have spent a lot of time troubleshooting my network and tried another router as well.
The only interesting thing that I can tell you is that I have been pinging the ESP8266 from the server. Whenever the ESP8266 prints the myAuthToken on the serial log, it stops responding to pings. And when it says “Login timeout” or “Connecting to…” it starts responding to pings again.
It looks as if the WiFi code freezes for some time.