cwi-dis / iotsa

This library contains a framework to easily create web servers that can interface to all sorts of sensors and actuators. esp32 and esp8266.
MIT License
27 stars 2 forks source link

Move to esp-idf v5 and generally modernise things #83

Open jackjansen opened 1 year ago

jackjansen commented 1 year ago

Most important blocker is probably that esp32_https_server_compat needs to be updated because the old one relies on an SSL implementation that is no longer supported in v5.

But maybe we should start cutting some dead wood too:

jackjansen commented 1 year ago

esp32_https_server_compat is sort-of working, but everything complains about the keys and certificates.

Need to investigate bringing it up to modern standards.

jackjansen commented 1 month ago

It turns out that not everything has to do with IDFv5. There are various choices that all influence each other.

First development environment. We are interested in Arduino/arduino-cli and platformio. CMake we are going to ignore.

Then the ESP-IDF package by espressif. v5 is current, and needed for some boards. But we also need to support v4, see below. We use very little of ESP-IDF directly, but a few things we do. And various libraries (such as esp32-https) use it extensively.

Then there is ESP32-Arduino-core. Primarily maintained by espressif, and currently at v3. V3 depends on ESP-IDF v5.

But the Arduino-core used by platformio is still ESP32-Arduino-core v2, using ESP-IDF v4. Even though it has a "3" in its version number. I'm not quite sure who maintains this, it may be the platformio people, not the Espressif people.

And we are not yet using the third party attempt to bring Arduino core 3 and ESP-IDF 5 to platformio: https://github.com/pioarduino/platform-espressif32

jackjansen commented 1 month ago

Oh yes: many of our #ifdef trigger on the wrong thing. They should really depend on either arduino core version or esp-idf version. But right now they use arduino (the IDE), or esp32, or something completely different again.

And hardware differences should most likely trigger on the define offered by ESP-IDF to check for that specific hardware feature we are interested in.