Commit Graph
5 Commits
Author SHA1 Message Date
micheleandClaude Sonnet 5 5f46486d46 Fall back to BLE Wi-Fi provisioning on sustained post-boot link loss
Once StaClient::connect() had already succeeded once, a later link
loss (router rebooted, password changed, device moved) just retried
esp_wifi_connect() forever with no bound and no fallback -- the only
recovery path was a power cycle, since BLE provisioning only ever
started from startSetupMode() (no stored credentials, or the initial
boot-time connect attempt exhausting its own bounded retry count).

connect() now optionally takes the secure store and device identity;
when set, a link lost for longer than ~1 minute starts BLE
provisioning (net::ble_provisioning::start(), same GATT flow as first-
time setup) alongside the still-ongoing STA reconnect attempts -- it
doesn't stop trying Wi-Fi on its own, it just also gives the app a way
in over Bluetooth if Wi-Fi doesn't come back.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-28 01:07:36 +02:00
micheleandClaude Sonnet 5 b46dcea698 Fix web radio streaming: HTTPS URLs were rejected outright
POST /api/streaming's JSON parser only accepted "http://" URLs,
rejecting any "https://" URL with invalid_json before ever attempting
a connection. Nearly every real internet radio stream today is HTTPS-
only, so this made the feature fail for essentially any station a
user would actually try.

Two changes were needed together: the parser now accepts both http://
and https://, and web_radio_stream.cpp's esp_http_client now attaches
ESP-IDF's built-in CA certificate bundle (crt_bundle_attach) so the
TLS handshake actually verifies -- CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
was already enabled in sdkconfig but never wired up here. Requires
adding mbedtls to main's PRIV_REQUIRES (esp_crt_bundle.h lives there).

Confirmed live: an https:// stream URL now gets accepted by the API
and produces a real HTTP response (404, from a guessed-wrong path) --
before this fix it never reached the network at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 00:27:02 +02:00
micheleandClaude Sonnet 5 012d2a6267 Rename device identity from DigiRadio to igiRadio
SoftAP SSID, Bluetooth name, and mDNS hostname now use the "igiRadio"
prefix (igiRadio-<serial>, igiradio-<serial>.local), matching the iOS
app's name instead of the firmware project's repo name. Confirmed live:
igiradio-CC4DB4.local resolves, the old digiradio-CC4DB4.local no
longer does.

Also adds the app-side briefs/notes accumulated today (active_source,
volume contract, VU-meter polling, RDS availability) as a single
up-to-date file to hand to Cursor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 00:06:21 +02:00
micheleandClaude Sonnet 5 5d7d4919a0 Add live VU-meter readback via ADAU1701 Data Capture Register
Implements GET /api/audio/levels, reading all six 1×RTA level-detector
cells on demand (no background polling, no caching -- only runs when
called, per explicit request this session).

The read mechanism is the ADAU1701's documented Data Capture Register
(address 2074/0x081A, datasheet Rev.0 pp.30,36: write a (program-step,
register-select) pair to configure what the register mirrors, then
read back a 3-byte 5.19 twos-complement value). The per-meter program-
step indices are taken verbatim from SigmaStudio's own compiler output
(Firmware/ADAU1701-Firmware/IC 1_DigiRadioFinale/net_list_out2/
trap.dat), not invented -- the datasheet explicitly says these indices
must come from that compiler-generated file.

Confirmed live: all six points return distinct, plausible dBFS values,
and the output meters track a master-volume change.

Also folds two pieces of live user feedback into the app brief: the
volume slider should reach +12 dB (the firmware's real ceiling), not
stop at 0 dB, and the new levels endpoint is what a "VU meter" UI
section should poll instead of faking one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 22:33:09 +02:00
micheleandClaude Sonnet 5 b55f2dac9d Document DigiRadioFinale DSP revision, archive SigmaStudio source
Adds the new SigmaStudio project export (Sigmastudio.zip, source
screenshot) alongside the existing project archives in Sigmastudio/,
rewrites docs/adau1701-sigmastudio-analysis.md for the 224-parameter
program (exclusive source mux replacing the old mixer, Bass Boost1/
SPhat1 dedicated blocks, unimplemented VU-meter readback), adds the
DigiRadioFinale figure/table to the manual, and adds a brief for the
iOS app side (active_source API shape, enhancement semantics change)
to hand to Cursor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 21:52:17 +02:00