ESP-MDF support

After some excruciating pain when attempting to rebuild the Arduino-ESP32 SDK libraries with the ESP-IDF settings changes needed for ESP-MDF so that it doesn’t crash after 5 seconds, I managed to recompile the libraries and upload the changes.

You can test the project GitHub - maxgerhardt/pio-esp-mdf-example at arduino (zip). The platformio.ini already contains the 2 environments, esp32dev_root and esp32dev_node, preconfigured for a network.

I was only able to verify that it doesn’t crash immediately, didn’t try both root + node.

The root outputs

I (1081) [mwifi, 223]: MESH is started
I (1081) [get_started, 32]: Root is running
I (1081) [get_started, 188]: event_loop_cb, event: 0
I (1087) [get_started, 192]: MESH is started
W (11081) wifi:Haven't to connect to a suitable AP now!
I (11081) [get_started, 135]: System information, channel: 13, layer: 1, self mac: 24:0a:c4:04:26:38, parent bssid: 00:00:00:00:00:00, parent rssi: -120, node num: 1, free heap: 98668

which I guess means it’s waiting for a connection / node to join.

You can give it a try.

The ESP-IDF branch is still unmodified and should work out of the box and without much hassle.