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

Peripheral UART example - GAP_EVENT_LENGTH and throughput

This is related to another post seen here:

devzone.nordicsemi.com/.../

Basically, I took the peripheral UART example and modified it so all UART printing was disabled. Upon receipt of BLE data in the nus event handler, I simply call ble_nus_string_send() 6 consecutive times to send 6 packets of 20 byte data and monitor the data times on a nrf51 dongle sniffer. The connection interval was set to 20ms.

I notice that if GAP_EVENT_LENGTH is set to 3 (default in the example), packets take 20ms to transmit. If GAP_EVENT_LENGTH is set to 16 (20/1.25) then 6 packets take 20ms to transmit, which is what I expected given that you are able to transmit 6 packets of 20 byte data within a connection interval.

Can someone explain what is going on and what GAP_EVENT_LENGTH does and how it effects throughput?

Related