Conversation
Once a direct BLE link to another Bitle node is confirmed via a signature-verified announce (the existing is_infra TLV, already trusted for clock-authority and OTA-offer decisions), opportunistically request the Link-Layer PHY Update procedure toward LE Coded PHY on that connection for better link margin at the edge of range. This never touches phone connections or advertising: the request only fires once an authenticated announce shows the peer is another Bitle relay, not a phone, and legacy 1M discovery/advertising is unchanged. It is a non-binding preference (BLE_GAP_LE_PHY_CODED_ANY leaves the S=2/S=8 coding choice to the Link Layer) — either side's controller may decline, and the link simply continues on whatever PHY it already had. Attempted at most once per connection via a per-link settle state. Not yet hardware-validated on real Bitle nodes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Once a direct BLE link to another Bitle node is confirmed via a signature-verified ANNOUNCE (using the existing
is_infraTLV, already trusted for clock-authority decisions), this change opportunistically requests the Link Layer PHY Update procedure to LE Coded PHY for that connection, improving link margin at the edge of range.This change never affects phone connections or advertising: the PHY update is only requested after an authenticated ANNOUNCE confirms the peer is another Bitle relay, not a phone, and legacy 1M discovery and advertising remain unchanged. The request is non-binding (
BLE_GAP_LE_PHY_CODED_ANYleaves the S=2/S=8 coding decision to the Bluetooth Link Layer), so either controller may decline it, in which case the connection simply continues on its existing PHY. The PHY update is attempted at most once per connection using per-link state.Expected behavior:
Verification:
esp32c3andesp32s3.ble_gap_set_prefered_le_phy,BLE_GAP_LE_PHY_CODED_ANY,BLE_GAP_EVENT_PHY_UPDATE_COMPLETE) and Apache Mynewt's reference implementation.Not yet hardware-validated on physical Bitle nodes. The implementation builds cleanly and the API usage has been verified, but successful PHY negotiation should be confirmed with a real two-node test before merge, particularly given the historical issues around LE Coded PHY support in NimBLE.