Hardware I’m using: NodeMCU-32S
I’ve got a previously working Arduino/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 but not with PlatformIO. Both environments are linking against 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();
}
framework = espidf, arduino
platform = espressif32
board = nodemcu-32s
monitor_speed = 115200
build_flags =
-Wno-return-type
lib_deps=
https://github.com/blynkkk/blynk-library
Console output with it connecting successfully (Arduino/Blynk 0.6.1):
14:05:59.874 -> [1136] IP: 192.168.1.19
14:05:59.907 -> [1136]
14:05:59.907 -> ___ __ __
14:05:59.940 -> / _ )/ /_ _____ / /__
14:05:59.974 -> / _ / / // / _ \/ '_/
14:06:00.011 -> /____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on ESP32
14:06:00.044 ->
[1209] Connecting to blynk-cloud.com:80
[2120] Ready (ping: 314ms).
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 something about PlatformIO that I don’t understand.
Anyone have any experience with this? I’m pretty confused. PlatformIO seems awesome, I really want to switch over to it.