You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keep the immediate firmware-hash announcement for serial split transports only
detect the split notification CCCD write in the BLE peripheral
after accepting that write, announce the firmware hash only if notifications are enabled
recognize TrouBLE's Error::NotSubscribed as an expected readiness condition
Why
The peripheral previously attempted its one-shot firmware-hash announcement before the central subscribed, so the notification could be dropped.
This handles readiness at the BLE transport boundary. Accepting the CCCD write updates TrouBLE's subscription state; RMK then checks should_notify and sends the hash. This avoids the generic first-message proxy and announcement state machine from rmk-rs#978.
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
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.
Summary
Error::NotSubscribedas an expected readiness conditionWhy
The peripheral previously attempted its one-shot firmware-hash announcement before the central subscribed, so the notification could be dropped.
This handles readiness at the BLE transport boundary. Accepting the CCCD write updates TrouBLE's subscription state; RMK then checks
should_notifyand sends the hash. This avoids the generic first-message proxy and announcement state machine from rmk-rs#978.Validation
RUST_MIN_STACK=16777216 cargo +1.97.0 clippy --bin peripheral --features rmk/dfu_rp,rmk/dfu_split -- -D warningsinexamples/use_rust/pi_pico_w_ble_splitcargo +1.92 check --binsinexamples/use_rust/pi_pico_w_ble_splitcargo +1.97.0 check --binsinexamples/use_rust/rp2040_dfu_splitcargo +1.92 clippy --no-default-features --features=split,vial,storage,async_matrix,_ble -- -D warningsinrmksh scripts/format_all.sh --touchedgit diff --checkStacked on #4. The TrouBLE revision and generated lockfiles are isolated in #3. Upstream change: embassy-rs/trouble#649.