Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v0_9_0
-
None
-
Security Level: Public (Viewable by anyone)
-
None
Description
The BLE HCI was asserting when it could not allocate a buffer for a command and/or an ACL data packet. The proper behavior as per the specification is the following:
1) If no ACL buffer is available the controller should send the data buffer overflow event.
2) The spec is not quite clear as to what should be done if there is no command buffer available. This should not happen but if it does, we should not assert. In this case, our controller will skip the command and simply not reply. Not sure what else could be done in this case.
The other issue with the HCI code was loss of sync. The spec dictates that a HW error should be sent on loss of sync. Loss of sync occurs when either an invalid HCI packet type is seen or a HCI packet length is out of range.
The code will now send a HW error when loss of sync occurs. Note that we only check ACL data packets for correct length; we dont check commands.
A final note: these changes are only for the controller only implementation currently. The host only implementation need to be done.