How mohamed-soubhi/bootlab-esp works
bootlab-esp is a dual-OS ESP32-S3 firmware and resilient-OTA testbed, with a host CLI and hardware-in-the-loop operations tooling. The primary workflow is to identify a board, build or select a signed image, deliver it over BLE, HTTPS, or MCUmgr, then verify the running slot and confirmation state. Firmware shares LABID framing across IDF and Zephyr; each OS has its own OTA and rollback mechanisms. HIL soak tools exercise recovery behavior, while the dashboard exposes operational commands. Some firmware and transport implementations are unsampled, so those links rely on documented capabilities rather than inspected call sites.
Main entry points: __main__.py labflash CLI · update_cli.py Update Adapters · live_backend.py Live HIL Backend · labid_dispatch.c Request Dispatcher
Components 25
Shared LABID Protocol
- Frame Engine
common/labid/src/labid.c - Request Dispatcher
common/labid/src/labid_dispatch.c
ESP-IDF Firmware
- IDF App
esp_idf/main/app_main.c - IDF LABID Port
esp_idf/components/labid_port/labid_port.c - IDF BLE OTA
esp_idf/main/app_ble_ota.c - IDF HTTPS OTA
esp_idf/main/app_http_server.c - IDF WiFi
esp_idf/main/app_wifi.c
Zephyr Firmware
- Zephyr App
esp_zephyr/app/src/main.c - Zephyr LABID Port
esp_zephyr/app/src/labid_port_zephyr.c - Zephyr BLE SMP
esp_zephyr/app/src/app_ble_smp.c - Zephyr WiFi SMP
esp_zephyr/app/src/app_wifi.c
Host Management
- labflash CLI
host/labflash/__main__.py - Board Resolution
host/labflash/core.py - Board Identity
host/labflash/identify.py - Build and Signing
host/labflash/build.py - Image Pool
host/labflash/poolmanifest.py - Update Adapters
host/labflash/update_cli.py - Update Verification
host/labflash/update.py
HIL and Operations
- Live HIL Backend
tests_hil/live_backend.py - Randomized OTA Soak
tests_hil/soak_random.py - Operations Dashboard
tools/dashboard/server.py - Tool Registry
tools/dashboard/tools_registry.py - Process Runner
tools/dashboard/runner.py
Other components
- Lab Engineer
- ESP32-S3 Board
Connections 25
- Request Dispatcher → Frame Engine: parses frames
common/labid/src/labid_dispatch.c - IDF App → IDF LABID Port: starts port
esp_idf/main/app_main.c - IDF LABID Port → Request Dispatcher: dispatches bytes
esp_idf/components/labid_port/labid_port.c - Zephyr App → Zephyr LABID Port: initializes port
esp_zephyr/app/src/main.c - Zephyr LABID Port → Request Dispatcher: dispatches bytes
esp_zephyr/app/src/labid_port_zephyr.c - Lab Engineer → labflash CLI: runs commands
host/labflash/__main__.py - labflash CLI → Board Resolution: resolves board
host/labflash/__main__.py - labflash CLI → Board Identity: queries identity
host/labflash/__main__.py - labflash CLI → Build and Signing: builds images
host/labflash/__main__.py - labflash CLI → Image Pool: manages pool
host/labflash/__main__.py - labflash CLI → Update Adapters: starts update
host/labflash/__main__.py - Update Adapters → Update Verification: orchestrates
host/labflash/update_cli.py - Update Adapters → ESP32-S3 Board: sends OTA
README.md - Update Verification → ESP32-S3 Board: verifies result
README.md - ESP32-S3 Board → IDF BLE OTA: receives BLE OTA
README.md - ESP32-S3 Board → IDF HTTPS OTA: receives HTTPS OTA
README.md - ESP32-S3 Board → Zephyr BLE SMP: receives BLE SMP
README.md - ESP32-S3 Board → Zephyr WiFi SMP: receives UDP SMP
README.md - ESP32-S3 Board → IDF WiFi: uses WiFi
README.md - Randomized OTA Soak → Live HIL Backend: uses backend
tests_hil/soak_random.py - Live HIL Backend → Update Verification: calls update APIs
tests_hil/live_backend.py - Live HIL Backend → ESP32-S3 Board: tests target
README.md - Lab Engineer → Operations Dashboard: operates lab
tools/dashboard/server.py - Operations Dashboard → Process Runner: starts jobs
tools/dashboard/server.py - Process Runner → Tool Registry: builds commands
tools/dashboard/runner.py