Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce3779b2 authored by Octavian Purdila's avatar Octavian Purdila
Browse files

RootCanal: better handling for Completed Number Of Packet events

Change the behavior with regard to Completed Number Of Packet events:
ignore the event mask and instead always send the events for ACL
packets and selectively send the events for SCO packets based on the
synchronous flow control status.

From Vol 4, Part E, section "7.7.19 Number Of Completed Packets
event":

  "While the Controller has HCI Data packets in its buffer, it shall
  keep sending the HCI_Number_Of_Completed_Packets event to the Host
  at least periodically, until it finally reports that all the pending
  ACL Data packets have been transmitted or flushed."

From Vol 4, Part E, section "7.3.37 Write Synchronous Flow Control
Enable command":

  "Synchronous Flow Control is disabled - No
  HCI_Number_Of_Completed_Packets events shall be sent from the
  Controller for synchronous Connection_Handles.

  Synchronous Flow Control is enabled -
  HCI_Number_Of_Completed_Packets events shall be sent from the
  Controller for synchronous Connection_Handles."

This fixes an issues where the Fitbit BLE stack timeouts when
connecting the Fitbit emulator to RootCanal / Android emulator due to
not being able to send more ACL packets since no "Number Of Completed
Packets" were received.

Bug: 209058202
Tag: #feature
Test: cert/run
Change-Id: Icb7f81d0779c0687ac16ab1b156c11a4d528db42
parent aa93b0df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment