esp-idf/components/wifi_provisioning/proto
Djordje Nedic facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
..
CMakeLists.txt tools: Increase the minimal supported CMake version to 3.16 2022-06-01 06:35:02 +00:00
makefile WiFi Provisioning : Added component providing framework for configuring WiFi credentials during provisioning 2018-10-02 19:07:28 +05:30
README.md cmake : Add CMakeLists.txt and update READMEs for re-compilation of proto files 2019-07-05 18:20:15 +05:30
wifi_config.proto WiFi Provisioning : Added component providing framework for configuring WiFi credentials during provisioning 2018-10-02 19:07:28 +05:30
wifi_constants.proto Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
wifi_scan.proto wifi_provisioning : Added Wi-Fi Scan list feature to Provisioning Manager 2019-06-26 05:24:20 +00:00

Protobuf files for defining Wi-Fi provisioning packet structures

wifi_provisioning uses Google Protobuf for language, transport and architecture agnostic protocol communication. These proto files define the protocomm packet structure, separated across multiple files:

  • wifi_contants.proto - Defines the various enums for indicating state of Wi-Fi (connected / disconnect / connecting), diconnect reasons, auth modes, etc.
  • wifi_config.proto - Defines Wi-Fi configuration structures and commands for setting credentials (SSID, passphrase, BSSID), applying credentials and getting connection state.
  • wifi_scan.proto - Defines Wi-Fi scan commands and result structures

Note : These proto files are not automatically compiled during the build process.

Compilation

Compilation requires protoc (Protobuf Compiler) and protoc-c (Protobuf C Compiler) installed. Since the generated files are to remain the same, as long as the proto files are not modified, therefore the generated files are already available under components/wifi_provisioning/proto-c and components/wifi_provisioning/python directories, and thus running cmake / make (and installing the Protobuf compilers) is optional.

If using cmake follow the below steps. If using make, jump to Step 2 directly.

Step 1 (Only for cmake)

When using cmake, first create a build directory and call cmake from inside:

mkdir build
cd build
cmake ..

Step 2

Simply run make to generate the respective C and Python files. The newly created files will overwrite those under components/wifi_provisioning/proto-c and components/wifi_provisioning/python