Hardware I’m using: NodeMCU-32S
I’ve got a working Blynk application on my ESP32 that I’m retooling to build with PlatformIO and porting to FreeRTOS. I ran into issues so I took a really simple Blynk example that I had working in the Arduino IDE and tried building it with PlatformIO to compare. It works fine with Arduino IDE (which pulls in Blynk 0.4.10) but not with PlatformIO (Blynk 0.6.1).
My simple example app:
#define BLYNK_DEBUG
#define BLYNK_PRINT Serial
#include <esp_task_wdt.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = "[my auth]";
const char ssid[] = "[my ssid]";
const char pass[] = "[my password]";
void setup()
{
esp_task_wdt_init(30000, false);
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
Console output with it connecting successfully (Arduino/Blynk 0.4.10):
[1134] Connected to WiFi
12:33:56.847 -> [1134] IP: 192.168.1.19
12:33:56.881 -> [1134]
12:33:56.881 -> ___ __ __
12:33:56.915 -> / _ )/ /_ _____ / /__
12:33:56.915 -> / _ / / // / _ \/ '_/
12:33:56.949 -> /____/_/\_, /_//_/_/\_\
12:33:56.982 -> /___/ v0.4.10 on Arduino
12:33:57.020 ->
[5001] Connecting to blynk-cloud.com:8442
[5778] Ready (ping: 328ms).
Console output with it failing (PlatformIO/Blynk 0.6.1, plus Blynk debug messages enabled):
[2272] Connected to WiFi
[2272] IP: 192.168.1.19
[2272]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on ESP32
[2278] Connecting to blynk-cloud.com:80
[2548] <[1D|00|01|00] [my auth]
[7550] Connecting to blynk-cloud.com:80
[7878] <[1D|00|01|00] [my auth]
It appears the request just never gets accepted in this case.
I’ve messed around with various Blynk options (changing the port to 8080, using the raw IP address instead of blynk-cloud.com, etc). But eventually compared to the Arduino build and I think it’s either something different with the newer Blynk lib that is escaping me or some intricacy of PlatformIO that is hosing this.
Anyone have any experience with this? I’m pretty confused. PlatformIO seems awesome, I really want to switch over to it.
Additional details:
• Blynk server
• Blynk Library 0.6.1