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

Migration from SDK13.1 to SDK15.2 resulted in a data waveform not flowing smoothly.

My nRF52832 firmware application transmits data to iPad which converts it into a flowing waveform. The waveform flowed smoothly when SDK13.1 was used. I migrated the firmware to SDK15.2 and now the waveform increments in steps rather than flowing smoothly. The min and max connection intervals have not changed. I noticed with SDK13.1 there was no entry for NRF_SDH_BLE_GAP_EVENT_LENGTH in sdk_config.h, so I assumed it used the default of 3 assigned to BLE_GAP_EVENT_LENGTH_DEFAULT. However in SDK15.2 there is an entry for NRF_SDH_BLE_GAP_EVENT_LENGTH and it was set to 6, so I changed it to 3 to match the original when in SDK13.1. This did not help much.

In SDK15.2 the nrf_ble_gatt.c logs are:

Peer on connection 0x0 requested a data length of 251 bytes.
Updating data length to 27 on connection 0x0.
Data length updated to 27 on connection 0x0.
max_rx_octets: 27
max_tx_octets: 27
max_rx_time: 1364
max_tx_time: 1364
on_ble_event: got BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST
Peer on connection 0x0 requested an ATT MTU of 293 bytes.
Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.

In SDK13.1 the nrf_ble_gatt.c logs are:

Peer on connection 0x0 requested a data length of 251 bytes.
Updating data length to 27 bytes on connection 0x0.
Data length updated to 27 on connection 0x0.
max_rx_octets: 27
max_tx_octets: 27
max_rx_time: 328
max_tx_time: 328
on_ble_event: got BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST
Peer on connection 0x0 requested an ATT MTU of 185 bytes.
Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.

The glaring differences are the max_rx_time and max_tx_time. In SDK15.2, I can get those values reduced by decreasing NRF_SDH_BLE_GAP_EVENT_LENGTH value to lowest allowable of 2, which reduces the max_rx_time and max_tx_time, but they are still more than twice the value used in SDK13.1. It did slightly help the waveform though.

What other parameters should I be looking at to get my waveform flowing smoothly again? The max rx and tx times are set to BLE_GAP_DATA_LENGTH_AUTO in both SDKs. Are there other parameters that may be different between the 2 SDKs?

Related