Updating FreeRTOS to add Wifi Provisioning via AP on an ESP32

So I already have a custom application that uses Amazon FreeRTOS as a component and it uses MQTT, OTA updates, Wifi provisioning via BLE… But now we want to do the Wifi provisioning via Access Point. I’ve seen that in the newer versions of FreeRTOS and ESP-IDF there’s some sort of support for this, although it’s a bit more buried than some of the other functionalities.

I’m trying to update my FreeRTOS folder or my ESP-IDF folder, but every time I do so I create a lot of conflicts, missing headers and undefined references. As an example, right now this is one of the conflicts I’m having:
../freertos/vendors/espressif/esp-idf/components/esp_http_server/src/httpd_main.c:16:24: fatal error: sys/socket.h: No such file or directory compilation terminated.

For context, I originally downloaded FreeRTOS from the Amazon console, so there’s no direct link to the github repository to automatically update, but I’ve tried cloning the repo and manually moving it where my project is but the ESP then has problems with reading wifi buffer descriptors. After trying this, I tried to download an example repo given here and moving my project on top of it, and here’s where I’m at right now, because that repo isn’t updated enough so the functionalities I need aren’t there.

I’ve also seen that in order to use this component from ESP-IDF I have to be using the lwip stack, but I haven’t seen how exactly can I configure this.

What’s the best way to update my project files and have lwip configured so I can use the Access Point mode?

Hello @TheIronNinja, I apologize for the late response.

Espressif has added support for lwIP in PR #1519. This change made the lwIP library the default networking stack while using the ESP32 board. As such, any of the demos for the ESP32 board will show how to use the lwIP library with ESP32. As you discovered, support for AP is part of ESP-IDF, however there aren’t currently any formal demos in FreeRTOS for showing how to do WiFi provisioning via AP. We will take your request into account as we consider prioritizing support for AP provisioning in our WiFi abstraction.

My recommendation would be to use latest release of the aws/amazon-freertos repository. This is currently the 202007.00 release.

If I’m understanding correctly, you would like to create a project with the aws/amazon-freertos repository as a sub-folder to it. The example repo you pointed to was intended as a one-off example and is not actively maintained. Instead, I would recommend following the instructions in our getting started guide for ESP32.