How esp32-zephyr/esp32_zephyr works
ESP32 Zephyr is firmware that stores Wi-Fi credentials, connects the board to a network, initializes ADC/PWM, and starts a TCP server for remote commands. The main workflow runs from boot through credential loading and network setup to command handling and hardware or version responses. The README documents TCP clients and service discovery; source excerpts show boot orchestration and command handlers. The server implementation was not sampled, so its connection to command decoding is shown as unverified.
Main entry points: main.c Firmware startup · cmd_interpreter.c Command interpreter · server.c TCP server · nvs.c Credential storage
Components 14
Boot and connectivity
- Firmware startup
src/main.c - Wi-Fi interface
src/wifi.c - Wi-Fi network
TCP command service
- TCP server
src/server.c - Command interpreter
src/cmd_interpreter.c - Protobuf commands
proto/cmds.proto
Board peripherals
- ADC controls
src/adc.c - PWM controls
src/pwm.c
Identity and credentials
- Credential storage
src/nvs.c - Version identity
src/version.h
Other components
- TCP API client
- Service discovery
- Device flash
- Device operator
Connections 16
- Firmware startup → Version identity: prints version
src/main.c - Firmware startup → Credential storage: loads credentials
src/main.c - Firmware startup → Wi-Fi interface: connects with credentials
src/main.c - Wi-Fi interface → Wi-Fi network: connects to
src/wifi.c - Firmware startup → ADC controls: initializes
src/main.c - Firmware startup → PWM controls: initializes
src/main.c - Firmware startup → TCP server: creates and starts
src/main.c - TCP API client → TCP server: sends commands
README.md - TCP server → Command interpreter: dispatches commands
- Command interpreter → Protobuf commands: encodes and decodes
- Command interpreter → ADC controls: reads channels
src/cmd_interpreter.c - Command interpreter → PWM controls: gets and sets
src/cmd_interpreter.c - Command interpreter → Version identity: reports identity
src/cmd_interpreter.c - Device operator → Credential storage: sets credentials
src/nvs.c - Credential storage → Device flash: reads and writes
src/nvs.c - Service discovery → TCP server: locates device