ASF subversion and git services commented on MYNEWT-388:

Commit 473e050f7fde744ad198d9ce3234115fa5940750 in incubator-mynewt-core's 
branch refs/heads/master from [~wes3]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=473e050 

MYNEWT-388: HCI uart should not assert if a command, event or ACL buffer not 

There were a number of changes committed to fix a few BLE HCI issues
1) On HCI sync loss, the controller will now send a HW error and wait
to find a reset command in the byyte stream in order to re-sync.
2) If no ACL data buffer available, the ACL packet is skipped and a
data buffer overflow event is sent.
3) If no command buffer is available, the current command is simply
skipped. No response is sent in this case. The spec was not clear
and since this should never happen we simply decided to skip the

> BLE HCI code asserts when it cannot allocate buffers for commands and ACL 
> data packets
> --------------------------------------------------------------------------------------
>                 Key: MYNEWT-388
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-388
>             Project: Mynewt
>          Issue Type: Bug
>    Affects Versions: v0_9_0
>            Reporter: William San Filippo
>            Assignee: William San Filippo
>             Fix For: v1_0_0_beta1
> 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.

This message was sent by Atlassian JIRA

Reply via email to