7da6ea37e7
- Added AudioEngine integration to BluetoothManager for audio handling. - Implemented auto-reconnect functionality with enabling/disabling options. - Introduced methods for managing audio state and HFP events. - Updated BluetoothManager's internal state management for better audio handling. refactor: Update A252ConfigStore to improve pin validation logic - Renamed critical_pins to required_pins for clarity. - Added optional legacy line-enable pin validation. - Improved error handling for pin conflicts and invalid ranges. fix: Adjust default volume and slic_line configuration in A252ConfigStore - Set default slic_line to -1 to indicate retirement. - Increased default audio volume from 80 to 90. feat: Implement audio amplifier control in main application - Added commands to enable/disable audio amplifier via GPIO. - Integrated audio amplifier control into the setup process. fix: Improve ESP-NOW and WiFi coexistence policies - Enforced modem sleep for better coexistence between WiFi and Bluetooth. - Added checks to ensure proper WiFi mode before enforcing coexistence. feat: Enhance TelephonyService with DTMF and pulse dialing support - Added DTMF capture and processing capabilities. - Implemented rotary pulse dialing logic with state management. - Introduced callbacks for dialing and answering actions. feat: Add real-time event publishing to WebServerManager - Enabled real-time status updates via SSE. - Improved status caching and thread safety with critical sections. fix: General code cleanup and optimizations across modules - Refactored various methods for better readability and maintainability. - Improved error handling and logging for better debugging.
9.5 KiB
9.5 KiB
État des specs RTC_BL_PHONE
1) Index des specs
docs/spec_webui_route_parity_and_coverage_v1.md(spécification principale active)docs/spec_bt_hfp_pbap_dialing_v1.md(nouvelle spec téléphonie Bluetooth, statutDraft)- Notion hub:
RTC_BL_PHONE Delivery Hub - Notion spec mirror:
RTC_BL_PHONE - Spec - WebUI Route Parity v1 - Notion plan:
RTC_BL_PHONE - Plan d'implementation - Route Parity Closure - Notion tasks DB:
RTC_BL_PHONE - Tasks(collection://89fa36aa-8933-4294-a922-90c6c34d5130)
2) Bilan opérationnel de la spec webui route parity
| Axe | Statut | Preuve / commentaire |
|---|---|---|
| EF-01 — Gate route parity en CI | Done | Workflow CI exécute le checker parity avec export JSON. |
| EF-02 — Artefact de preuve | Done | Rapport JSON généré (artifacts/route_parity_report.json) et upload CI via route-parity-report. |
| EF-03 — Couverture routes WebUI | Done | Couverture documentée et validée dans docs/rapport_tests_fonctionnels.md (section WebUI Route Parity V1). |
| EF-04 — Non-régression des routes existantes | Done | Smoke flows routes tracés dans docs/rapport_tests_fonctionnels.md et cohérents avec parity checker. |
3) État global de consolidation
platformio run -e esp32dev: OKplatformio test --without-uploading --without-testing -e esp32dev: OKscripts/check_web_route_parity.py(local) : backend routes 39, frontend routes 38, check passéscripts/check_web_route_parity.py --report-json artifacts/route_parity_report.json: OK (report généré)platformio run -e esp32-s3-devkitc-1: échec connu sur liens Bluetooth/HFP externes (suivi séparé)
3-bis) État spec BT HFP/PBAP/Numérotation
- HFP commande-level: OK (connect/disconnect commandes acceptées).
- HFP call-control AT: implémenté (
BT_DIAL/DIAL,BT_REDIAL,BT_ANSWER,BT_HANGUP,BT_CALLS). - Discoverable policy: OK (si aucun client BT connecté,
discoverable=trueforcé; validation locale viaBT_STATUSavant/aprèsBT_DISCOVERABLE_OFF). - HFP liaison réelle: KO sur tests assistés (pas de montée
connected=true/hfp_active=true). - PBAP: bloqué sur stack actuelle (
arduino-esp32bluedroid sans API PBAP exposée côté firmware),BT_PBAP_SYNCretourneunsupported. - Numérotation HFP/AT: implémentée côté firmware, validation E2E téléphone encore à obtenir (dépend de la liaison HFP réelle).
4) Lacunes à combler pour passer la spec en DONE
- Conserver le suivi S3 Bluetooth/HFP hors scope parity V1.
5) Risques actifs
- Écart documentation / exécution (doD non uniformément tracée)
- Dépendances CI sur les branches de support non conservées (si nettoyage de branches engagé)
- Blocs matériels/firmware S3 (liens Bluetooth/HFP) pouvant masquer la visibilité produit
6) Enchaînement Track A / Track B (Bluetooth, WiFi, WebUI, ESP-NOW)
Track A — Delivery rapide (état courant)
- WiFi:
- endpoints Web/API présents:
/api/network/wifi,/connect,/disconnect,/reconnect,/scan. - fallback AP actif en perte STA (
state=ap_fallback).
- endpoints Web/API présents:
- WebUI Bluetooth:
- endpoints étendus pour discoverable, dial/redial/answer/hangup/calls, pbap sync.
- affichage états BT enrichis (
call_state,slc_connected,pbap_supported).
- ESP-NOW:
- protocole v1 documenté (
docs/espnow_api_v1.md). - compat legacy conservée (
cmd/raw/command/action).
- protocole v1 documenté (
- Bluetooth HFP:
- commandes d'appel opérationnelles.
- PBAP toujours
unsupportedsur stack actuelle (comportement explicitement tracé).
Track B — Migration BT/PBAP (préparation)
- Faisabilité documentée:
docs/bt_pbap_migration_feasibility.md - Build migration préparé:
env:esp32dev-bt-migrate - Interface d'abstraction ajoutée:
src/bluetooth/IBluetoothBackend.h
Gates de validation
- Gate local minimal:
platformio run -e esp32devbash scripts/test_terminal.shscripts/hw_validation.py --port-a252 /dev/cu.usbserial-0001
- Gate CI:
- workflows
Repo State+Firmware CIverts surmain
- workflows
7) Exécution hardware locale (2026-02-21, ESP32 Audio Kit)
- Cible testée:
/dev/cu.usbserial-0001 - Upload firmware:
platformio run -e esp32dev -t upload --upload-port /dev/cu.usbserial-0001->PASS - Gate local:
bash scripts/test_terminal.sh->PASS(build unit test, host dtmf, parity parser, parity routes) - Smoke HW:
python3 scripts/hw_validation.py --port-a252 /dev/cu.usbserial-0001 --report-json artifacts/hw_validation_report.json --report-md artifacts/hw_validation_report.md->PASS - Snapshot runtime:
artifacts/runtime_snapshot.json(inclutBT_STATUS,WIFI_STATUS,ESPNOW_STATUS,/api/status) - WiFi stability:
artifacts/wifi_stability_report.json->PASS(disconnect =>ap_fallback, reconnect =>connected, credentials persistées) - HFP opérable (stack actuelle):
artifacts/hfp_operational_report.json->PASS(discoverable on/off ok,BT_DIALsans SLC en erreur contrôlée,BT_PBAP_SYNC unsupportedexplicite) - ESP-NOW protocole v1:
artifacts/espnow_protocol_v1_report.json->FAILen bench 1 carte (pas de peer radio actif,ESPNOW_SENDretourneERR) - Décision de gate: WiFi/WebUI/Bluetooth HFP command-level
GO; ESP-NOW E2E v1 two-boardBLOCKEDjusqu’à disponibilité d’une 2e carte
Addendum (2026-02-22)
- Firmware reflash
esp32devsur/dev/cu.usbserial-0001effectué. - Validation BT ready-for-pairing:
artifacts/bt_hfp_readiness.jsondiscoverable=truesans client connecté.BT_CALLS/BT_DIALen erreur contrôlée hors SLC.BT_PBAP_SYNCretourneERR ... unsupported(attendu).
- Validation discoverable forcé:
artifacts/bt_discoverable_policy_check.jsonBT_DISCOVERABLE_OFFaccepté mais état final restediscoverable=truetant que non connecté.
- ESP-NOW (tests minimisés):
artifacts/espnow_peer91_probe_clean.json- peer
10:20:BA:58:C7:48ajouté. - envoi unitaire observé avec
tx_fail=1côté A252 (non bloquant pour le track Bluetooth).
- peer
Addendum (2026-02-22 — wiring/polarité/audio)
- Polarité
GPIO21verrouillée:AMP_ENactif bas (LOW=ON,HIGH=OFF). SLIC LINEretiré du runtime (broche non utilisée en bench courant).- Mapping bench confirmé:
RM=GPIO18,FR=GPIO5,SHK=GPIO23,PD=GPIO19.
- Tonalité locale fixée à
425 Hzet niveau augmenté (boost léger) sans changement de timbre. - Durcissement Bluetooth en cours:
- reprise explicite sur
ACL_DISCONN, - retry audio SCO piloté par état d'appel (
dialing/alerting/ringing/active).
- reprise explicite sur
Addendum (2026-02-22 — dial/ring policy BT)
- Spécification ajoutée:
DIAL/BT_DIALdoit accepter une demande même sans SLC immédiat:- queue numéro,
- déclenche/reprend connexion HFP,
- compose automatiquement après
SLC_CONNECTED.
- Appel entrant GSM via HFP (
call_state=ringing) doit déclencher la sonnerie RTC. - Décroché RTC en phase sonnerie doit déclencher
BT_ANSWER.
- Précondition produit explicitée:
- sans lien HFP actif, la sonnerie RTC sur appel GSM n'est pas possible;
- mitigation firmware: auto-reconnect sur peer bondé + discoverable forcé si non connecté.
- Statut:
- implémentation firmware:
in_progress(queue dial + auto reconnect renforcés), - validation hardware E2E appel entrant/sortant:
pending.
- implémentation firmware:
Addendum (2026-02-22 — autonomous execution batch)
- Runtime policy applied:
- HFP auto reconnect remains enabled by default (
auto_reconnect_enabled=true). - New runtime toggles available:
BT_AUTO_RECONNECT_ONBT_AUTO_RECONNECT_OFF
BT_STATUSnow exposesauto_reconnect_enabled.
- HFP auto reconnect remains enabled by default (
- Web/API alignment:
- endpoint added:
POST /api/bluetooth/hfp/autowith body{"enabled":true|false}. - endpoint readback:
GET /api/bluetooth/hfp/autoviaBT_STATUS. - SSE realtime path re-enabled (
/api/events) with client polling fallback.
- endpoint added:
- Coexistence hardening:
- ESP-NOW init now preserves current WiFi mode and applies modem sleep policy for WiFi/BT coexistence.
- setup order adjusted: WiFi + ESP-NOW before BT startup.
- Tracking:
docs/AGENT_TODO.mdconverted to live kanban with run ledger.
Addendum (2026-02-22 — coex/runtime hardening batch 2)
- Build + flash:
platformio run -e esp32dev->PASSplatformio run -e esp32dev -t upload --upload-port /dev/cu.usbserial-0001->PASS
- Runtime/bench:
python3 scripts/hw_validation.py --port-a252 /dev/cu.usbserial-0001 --report-json artifacts/hw_validation_report.json --report-md artifacts/hw_validation_report.md->PASS- firmware hash (sha256):
2c345d5ac459e6aa914f47438cc35bbe33dda68e5a65f41eaf3d8f1efb53e833
- Coexistence hardening applied:
- réimposition périodique
WIFI_PS_MIN_MODEMdansWifiManager::loop(). - réimposition coex avant/après
btStart()dansBluetoothManager::ensureBtStackReady(). - logs GAP en callback réduits (
kVerboseGapLogs=false) pour éviter contention newlib/locks en task BT. - pression mémoire AsyncTCP réduite (
STACK=4096,QUEUE=12).
- réimposition périodique
- Qualif scripts:
bash scripts/test_terminal.sh->PASSpython3 -m unittest scripts/test_check_web_route_parity.py->PASSpython3 scripts/check_web_route_parity.py --report-json artifacts/route_parity_report.json->PASS
- Résiduel:
- endurance 10 min sans assert à confirmer en monitor live.
- validation E2E entrant GSM -> ring RTC ->
BT_ANSWERencorepending.
- Gouvernance:
- Issues mises à jour avec preuves:
#10:https://github.com/electron-rare/RTC_BL_PHONE/issues/10#issuecomment-3941685856#11:https://github.com/electron-rare/RTC_BL_PHONE/issues/11#issuecomment-3941685860
- Issues mises à jour avec preuves: