ble_hci: use the LE packet boundary flag for outgoing ACL data - #11146
Closed
annejan wants to merge 1 commit into
Closed
ble_hci: use the LE packet boundary flag for outgoing ACL data#11146annejan wants to merge 1 commit into
annejan wants to merge 1 commit into
Conversation
hci_send_acl_pkt() marked the first fragment of every outgoing L2CAP PDU as ACL_DATA_PB_FIRST_FLUSH. That is the BR/EDR value, "first automatically flushable". On an LE-U link the first fragment is non-automatically-flushable, ACL_DATA_PB_FIRST_NON_FLUSH. Nordic's SoftDevice Controller accepts a packet marked that way, returning success, and then never transmits it. Measured on an nRF52840: no Number Of Completed Packets event ever arrived for any packet, and the peer eventually gave up and disconnected with reason 0x13, remote user terminated, rather than a supervision timeout. A client hung indefinitely discovering services. With the LE value the same connection completes discovery and stays up.
Collaborator
|
I am confused now. |
Author
|
Yeah . . it was my confused setup . . PR closed . . sorry for wasting your time! |
Collaborator
|
Is it still the case that there actually is a bug? I could believe it. |
Author
|
It is a bug in my very non-standard system . . |
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.
hci_send_acl_pkt()marks the first fragment of every outgoing L2CAP PDU asACL_DATA_PB_FIRST_FLUSH:That is the BR/EDR value, "first automatically flushable" (
0b10). On an LE-U link the first fragment of a higher layer message is non-automatically-flushable,ACL_DATA_PB_FIRST_NON_FLUSH(0b00). See Core Specification Vol 4, Part E, 5.4.2.Symptom
Nordic's SoftDevice Controller accepts a packet marked
0b10, returning success fromsdc_hci_data_put(), and then never transmits it. Measured on an nRF52840 over SWD:0x13, remote user terminated — not0x08, which a supervision timeout would give.With the LE value, the same connection completes service discovery and stays up.
Scope, and what I could not test
This is the packet boundary flag for LE links, so it applies to every board using the HCI
_bleiohost, not only the one I was working on.I could only test against one controller: Nordic's SoftDevice Controller driven on-chip. I have no AirLift hardware, so I have not verified the ESP32 co-processor boards that are the usual users of this backend. Their controllers evidently tolerate
0b10today, since those boards work. The change makes the value spec-correct rather than relying on that tolerance, but it would be worth a second pair of eyes from someone with an AirLift board before merging.