I’m working with Platform IO for a little while and try to move my projects from Visual Studio Arduino framework to PIO and Visual Studio Code. WiFi and MQTT is mandatory as well as SNTP.
First of all I detected that my Arduino FW based projects all have trouble with the WiFi connection, I permanently ran into the obviously not uncommon error using the Arduino FW:
WiFiClient.cpp:455] flush(): fail on fd 57, errno: 104, “Connection reset by peer”.
So I moved to IDF and started with a simple example setting up WiFi and MQTT which works absolutely stable. But: I’m not able to get the “protocol” Examples working:
“fatal error: protocol_examples_common.h: No such file or directory”
The sources are available ( i.e. installed) but not accessible, can you please advice what to do:
get the Arduino stuff working
stick with the IDF ? And if how can I get the missing protocols working?
Thanks in advance
Could you post a ZIP of your project (clean project before posting) for reproduction, otherwise it’s very hard to tell you what’s wrong.
I’m simply trying to get the original example running:
“esp-idf/sntp_example_main.c at master · espressif/esp-idf · GitHub”
Getting this working would be a first step,
Thanks in advance for any help,
Have you tried using the example version for release 3.2 which is the ESP-IDF version included in PIO?
Thanks a lot, I wasn’t aware that it was an issue due to versioning !
Using the correct version from Version 3.2 did the trick.
The IDF version with my PlatformIO is v4.3.2.
The example uses “protocol_examples_common.h” but the file is not found.
“protocol_examples_common.h” lives in C:\Users<USERNAME>.platformio\packages\framework-espidf\examples\common_components\protocol_examples_common\include
How do I add this directory to the build process?
folder in the
components folder of your project, just like the documentation says.
It is possible to have a CMakeLists.txt in the “test” directory?
I tried, but I don’t think the test/CMakeLists.txt was read from the test directory.
I have no idea. The devs at Issues · platformio/platform-espressif32 · GitHub may know.