OSDN Git Service

Workaround for H4 HCI stream corruption during LE scans
authorAndre Eisenbach <eisenbach@google.com>
Fri, 11 Sep 2015 04:41:39 +0000 (21:41 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 21 Oct 2015 20:51:51 +0000 (20:51 +0000)
commitbdd19e0873854567bb6bd9bc8905a87a3a4744c4
treed612c5073b9c49129b6a3bae4741b4950b0b9e3f
parent58593a02736ff9ac9bdccd0e3186602f17452cdf
Workaround for H4 HCI stream corruption during LE scans

Sometimes, during result-heavy LE scans, the UART byte stream can become
corrupted, leading to assertions caused by mis-interpreting the bytes
following the corruption.

This workaround looks for tell-tale signs of a BLE event and attempts to
skip the correct amount of bytes in the stream to re-synchronize onto a
packet boundary.

Bug: 23934838
Change-Id: Ifadaecf8077cb1defc7134c59c97302fca660f81
hci/src/hci_hal_h4.c
hci/test/hci_hal_h4_test.cpp