fixing ui stuff
This commit is contained in:
@@ -10,15 +10,21 @@ Arduino sketch for the **non-touch V2** board. This folder is the imported `v0.1
|
||||
- RMS/peak sound trigger, approximately 2.5 seconds of rolling pre-trigger audio and 2.5 seconds of post-trigger audio. Early startup captures contain the available pre-roll and keep the intended post-trigger interval.
|
||||
- 16-bit mono PCM WAVs saved on microSD with a metadata sidecar. A `.meta` file is the queue commit marker; incomplete or invalid WAVs are not upload eligible. Interrupted commits with valid `.meta.tmp` are recovered on startup. FAT cannot guarantee full power-loss atomicity of multi-file transactions; inspect the queue after hard power cuts.
|
||||
- Wi-Fi setup AP, local owner UI, two ePaper screens, automatic upload retry with bounded backoff, and confirmed-receipt deletion.
|
||||
- CA-verified HTTPS and an ignored local configuration header. No insecure TLS mode is enabled.
|
||||
- CA-verified HTTPS using the ESP32 core's built-in public CA bundle and an ignored local credentials header. No insecure TLS mode is enabled.
|
||||
|
||||
## Build and flash
|
||||
|
||||
1. Install Arduino IDE 2.x and Espressif ESP32 Arduino core **3.3.0**.
|
||||
1. Install Arduino IDE 2.x and Espressif ESP32 Arduino core **3.3.12** (the verified version with a built-in CA bundle).
|
||||
2. Install **ArduinoJson 7.4.3** and Waveshare's `lvgl8/lvgl` **8.4.0** library from the pinned support commit below. Install LVGL 8 only for this sketch.
|
||||
3. Run `./prepare_from_waveshare.sh`. It fetches only `02_Example/Arduino/08_Audio_Test` from Waveshare commit `aaf395c1bbd86f7c5b7a2f9f0401241ff5c44956`, or accepts a local checkout at that exact commit. The helper copies the board support locally. See [hardware and dependency notes](docs/hardware.md).
|
||||
4. Copy `boomcast_config.local.example.h` to `boomcast_config.local.h`. Set the HTTPS origin, registered `sensor_id`, token, and trusted CA certificate. This local file is ignored by Git. A renewed server certificate signed by the same CA needs no firmware change.
|
||||
5. Select `ESP32S3 Dev Module`, 8 MB flash, and OPI PSRAM. Open `BoomCast_Waveshare_Arduino.ino`, compile, flash, and monitor serial at 115200 baud. An Arduino CLI 1.5.1 compile passed in this workspace with ESP32 core 3.3.0 and partition scheme `default_8MB`; no board was flashed.
|
||||
4. Copy `boomcast_config.local.example.h` to `boomcast_config.local.h`. Set the HTTPS origin, registered `sensor_id`, and token. This local file is ignored by Git; no certificate needs to be pasted into it.
|
||||
5. In Arduino IDE **Tools**, select board **ESP32S3 Dev Module**, **Flash Size → 8MB (64Mb)**, **Partition Scheme → 8M with spiffs (3MB APP/1.5MB SPIFFS)**, and **PSRAM → OPI PSRAM**. All four settings are required for this board; the default 4 MB partition allows only a 1.2 MB app and reports `text section exceeds available space in board`. Open `BoomCast_Waveshare_Arduino.ino`, compile, flash, and monitor serial at 115200 baud. An Arduino CLI 1.5.1 compile passed in this workspace with ESP32 core 3.3.12 and these settings; no board was flashed.
|
||||
|
||||
## HTTPS trust and renewal
|
||||
|
||||
The uploader uses `WiFiClientSecure::useBuiltinCACertBundle()` from Espressif's Arduino ESP32 core 3.3.12. The core's public CA bundle is compiled into the firmware, separate from `boomcast_config.local.h` credentials. TLS verifies both the certificate chain and the server hostname. Uploads wait for a successful NTP synchronization after boot, so an unset clock cannot invalidate certificate date checks. If NTP is unavailable, the WAV remains queued for retry.
|
||||
|
||||
Normal Caddy/Let's Encrypt server-certificate renewals need no firmware change as long as the renewed chain ends at a root in the installed bundle. If Caddy changes to a CA whose root is absent from that bundle, update the Espressif core and recompile/reflash the firmware with its newer bundle after checking that the new core still builds the sketch. Do not put a leaf certificate or private key in the credentials header. Arduino IDE's `HTTPClient` can fall back to insecure TLS when used without a CA; this uploader uses `WiFiClientSecure` directly with the built-in bundle instead.
|
||||
|
||||
The firmware has not yet been converted to PlatformIO: Waveshare's Arduino support uses a sketch-relative source layout, and a guessed PlatformIO configuration would not be reproducible without a verified V2 build. The pinned preparation script and library versions provide an explicit Arduino build starting point.
|
||||
|
||||
@@ -26,7 +32,7 @@ The firmware has not yet been converted to PlatformIO: Waveshare's Arduino suppo
|
||||
|
||||
On first boot, the device generates unique setup-AP and local-management passwords and stores them in NVS. They are printed on USB serial at 115200 baud on boot; keep physical access to the serial port controlled. The sensor token is loaded from the ignored local header, or from an NVS `token` value if provisioned separately. Rotate the sensor token in Django, update the local header, and reflash, or provision the new NVS value through a trusted local maintenance process. Tokens are never logged by this firmware.
|
||||
|
||||
The local management UI uses HTTP Basic Auth on the device LAN and setup AP. Use trusted local networks; Basic Auth does not encrypt traffic. The public ePaper screen retains the short privacy message, while the owner screen shows connectivity, queue count, capture/upload state, and diagnostic counters.
|
||||
The local management UI uses HTTP Basic Auth on the device LAN and setup AP. Use trusted local networks; Basic Auth does not encrypt traffic. The Upload queue section can discard one recording or clear the backlog after confirmation; discarded clips are permanently removed from the SD card and will not reach Pending Review. Discarding a recording dated today reduces the ePaper's "Vandaag" count; successful uploads still count as captures. Clips saved without a valid clock cannot be matched to a day, so **Reset today count** can clear an old or stale total without deleting recordings. The public ePaper screen retains the short privacy message, while the owner screen shows connectivity, queue count, capture/upload state, and diagnostic counters.
|
||||
|
||||
## Server and queue behavior
|
||||
|
||||
|
||||
Reference in New Issue
Block a user