This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HCI Number_Of_Completed_Packets_Event

Hello Nordic! I am using an Android phone and a nRF51822, and I'm performing BLE speed tests. For these two devices the theoretical maximum is given by 4 * 20 / 0.0075 = 10.66kBps, however, I am measuring half of that (around 5.2kBps). To diagnose the cause I analized the BLE snoop file and discovered that in fact, for every 2 connection intervals only 4 user data packets were sent, instead of the expected 8. Additionaly to the 4 user data packets, 2 HCI event packets were logged and identified as Number_Of_Completed_Packets_Event. The last slots of the second conenction interval are not used at all. After some research, I understand that these HCI packets are used to perform flow control. Is there any way to disable or work around this feature? Otherise I will never be able to use the maximum BLE bandwidth.

The snoop file shows the folowing data: ... | P H C P | H C _ _ | P H C P | H C _ _ | ...

Legend:

| - beggining of connection interval

_ - unused slot

H - HCI packet

C - User request data packet (Write Command) sent by Central

P - User response data packet (Notification) sent by Peripheral

Parents
  • If you want to transfer data as fast as possible between the devices you should not use a control point (your write command) to confirm every packet. Instead you should transfer as many notifications as possible by filling up the tx buffers prior to the connection event. You can use your control point to start /stop transactions and possible to confirm that the packets has been successfully transmitted, but do the confirmation over multiple packets. e.g. every 12th packet or something.

  • If you use write commands to request every user response data packet the chip will not have time to prepare the notifications. You need to prepare the notifications prior to the connection event if you want to send a lot of data fast.

Reply Children
No Data
Related