feat(firmware): ESP32-P4 sensor node — Workstream I core skeleton
New firmware/esp32p4-sensor-node/ ESP-IDF (C, FreeRTOS) project skeleton per docs/superpowers/specs/2026-07-23-esp32-sensor-node-design.md's Workstream I: - Wi-Fi station-mode connect with exponential-backoff reconnect (wifi_manager.c), credentials from a gitignored main/device_config.h the seeker fills in (template: device_config.h.example). - Telemetry HTTP client (telemetry_client.c) POSTing the spec's exact contract shape to /api/device/telemetry with a Bearer token, via esp_http_client + cJSON. - BME280 I2C driver (bme280.c) with Bosch's public double-precision compensation formulas, using ESP-IDF's newer driver/i2c_master.h API. - LD2410 mmWave presence driver (ld2410.c) over UART, chosen over a plain PIR for its distance/motion data richness — its frame-offset parsing is flagged as the least-certain code in the firmware. - sensor_driver_t registry (sensor_driver.h, sensor_registry.c) so new sensors are a new driver file + one array line, no main-loop changes. - README.md: build steps, manual-config walkthrough, wiring/pinouts, and an explicit "what's verified vs. not" section plus a real hardware caveat (ESP32-P4 has no integrated Wi-Fi radio). UNVERIFIED AGAINST REAL HARDWARE per the spec's honesty-policy note — no ESP-IDF toolchain or physical boards available in this environment. Syntax-checked with gcc against hand-written ESP-IDF API stubs (not committed) as a best-effort substitute for a real idf.py build. Workstream J (RTL-SDR experimental module) is explicitly out of scope here; firmware/esp32p4-sensor-node/components/ is left in place for it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
25
firmware/esp32p4-sensor-node/sdkconfig.defaults
Normal file
25
firmware/esp32p4-sensor-node/sdkconfig.defaults
Normal file
@@ -0,0 +1,25 @@
|
||||
# Default sdkconfig overrides for the Quantumancy sensor node.
|
||||
#
|
||||
# These are seed values applied when `idf.py set-target esp32p4` generates the
|
||||
# real `sdkconfig` (which is machine/toolchain-specific and NOT committed —
|
||||
# see .gitignore). UNVERIFIED: nobody has run `idf.py build` against a real
|
||||
# ESP-IDF install for this project, so treat these as reasonable, standard
|
||||
# starting points rather than confirmed-working values.
|
||||
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
|
||||
# The backend is served over HTTPS in production (see deploy/), so the HTTP
|
||||
# client needs mbedTLS's bundled CA store to verify the TLS cert.
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
|
||||
# Headroom for the main task: JSON body construction (cJSON) plus
|
||||
# esp_http_client happen on it via the telemetry task.
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096
|
||||
|
||||
# A handful of sockets is plenty for one outbound HTTP client + Wi-Fi/LWIP
|
||||
# housekeeping; keeps RAM use predictable on a sensor node.
|
||||
CONFIG_LWIP_MAX_SOCKETS=16
|
||||
|
||||
# Reasonably quiet serial log output by default (bump to DEBUG for bring-up).
|
||||
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
||||
Reference in New Issue
Block a user