Repository navigation
Add an optional NimBLE control transport - #158
Open
Funkelfetisch wants to merge 1 commit into
Open
Funkelfetisch wants to merge 1 commit into
Funkelfetisch wants to merge 1 commit into
Conversation
Allow encrypted control requests without an IP connection through a bounded BLE peripheral transport. The caller owns startup, public identity and request dispatch. KPI: 256lights | Desktop:7603KB | tick:5136/29/8/9/70/123/9/13/9/1/104us(FPS:194/34482/125000/111111/14285/8130/111111/76923/111111/1000000/9615) | src:345(88512) | test:258(60816) | functions-over:346 Commit: src +334/-0 lines | test +58/-0 lines | duplicated lines 3285 -> 3285 (+0) Core: - Add a 512-byte line reassembler with backpressure and rejected-input recovery, plus a native NimBLE peripheral with encrypted attributes, persistent-bond support and non-blocking scheduler exchange. - Share unavailable-target definitions across desktop, Teensy and BLE-disabled ESP32 builds. Tests: - Pass 2,832 GCC 13 Debug C++ cases and 179,292 assertions, including fragmented writes, maximum length, overflow, NUL, batching and reset; 17 desktop scenarios pass, 18 hardware scenarios skip. - Compile ESP32-S3 with BLE disabled and with a validation-only NimBLE-enabled generated sdkconfig; shipping defaults remain unchanged. Docs/CI: - Document the optional transport, GATT identifiers, framing and security contract; strict docs and header-documentation checks pass. Reviews: - Self-review split parser/start validation and shared platform stubs to preserve the existing complexity and duplication counts; no independent human review is claimed. - GCC cannot measure Clang 20 function effects. Vale reports pre-existing NegatedHeading/SelfReference drift in files byte-identical to upstream; added lines have only its advisory on the standard Just Works association-model name. - KPI figures are this GCC Debug host's measurements and are not a comparison with an equivalent committed reference build; generated metrics are excluded under contribution policy. Live device KPI capture was disabled. - Codex authored and extracted this contribution at Veit's explicit request. Hardware integration testing used the HELIO prototype before extraction, not this standalone transport-only application.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Controllers outside Wi-Fi range need an encrypted control channel. This adds an optional native NimBLE peripheral with a bounded 512-byte line reassembler, GATT identity/state/command attributes, pairing and bond support, and non-blocking scheduler exchange. Desktop, Teensy and BLE-disabled ESP32 builds share the unavailable-target implementation.
This is the transport step: the caller owns startup, identity and request dispatch. Shipping firmware defaults stay unchanged; state-document dispatch and scheduled group commands follow separately. The change is based on
abcdaec9and stays within the contribution limit: 399 added lines across ten files.Validation:
f030e3f8plus the integration; this standalone transport-only application was not flashed. The extraction shares fallback definitions and splits parser/identity validation; hardware results are not claimed for a byte-identical PR image.Current-upstream hardware follow-up: an ESP32-S3 N8/no-PSRAM product build on
abcdaec9containing this unchanged transport commitf5a244a9is now installed by application OTA. The existing Android bond reconnects and executes encrypted RGBW commands; three Wi-Fi-off/on cycles, including commands without LAN, pass without restart or a panic record. Actual embedded-dashboard checks at 390/1280 pixels also pass. This exercises the transport commit in the private product integration; the standalone transport-only test image remains compile-only. The saved-off reboot result above belongs to the earlier prototype; that reboot is not repeated on the new image while USB recovery is disconnected.LE Secure Connections uses the Just Works association model without MITM protection. Hardware integration evidence covers one controller, not measured multi-device timing. KPI data was collected without live serial capture; GCC Debug measurements are not a comparison against an equivalent committed reference build, and generated metrics are excluded per contribution policy.
Codex authored and extracted this contribution at Veit's explicit request after the BLE bench passed. No independent human review is claimed.