Old Macdonald - Decentralised Controlled Environment Agriculture System Help

Wi-Fi Interface

Overview

This section outlines the development of the Wi-Fi-STA Interface component, which provides the features and functions to connect to Wi-Fi networks and manage the device's Wi-Fi settings.

This component is part of the Orchestrator firmware.

Development

Bootstrapping the Component

  1. Creates a new component named wi_fi_sta_interface inside the components directory.

    idf.py create-component wi_fi_sta_interface -C components
  2. Rename and move the source file.

    1. Rename the wi_fi_sta_interface.c to wi_fi_sta_interface.cpp.

    2. Move it to src folder.

  3. Update the CMakeLists.txt file.

    1. Change the location of the wi_fi_sta_interface.cpp file to the src folder.

    2. Add required dependencies esp_event, esp_netif, and esp_wifi to the REQUIRES section.

    The CMakeLists.txt file should look like this:

    idf_component_register(SRCS "src/wi_fi_sta_interface.cpp" INCLUDE_DIRS "include" REQUIRES esp_event esp_netif esp_wifi)

Wi-Fi Station Management

References

ESP Wi-Fi Docs

Last modified: 08 March 2025