Slave latency issues

Hello,
I hope someone on this forum can bring some clarification light and knowledge to me.

Background
We have developed a remote-control system with several peripheral-units and one central unit. The peripheral-units are battery powered. All units are based on nRF52840 and the SDK is 17.1.0. We use NUS service and have based our code on the NUS/UART example found in the SDK. The central unit support multilink.
For some of the peripheral unit’s power consumption is crucial, hence we thought that using the SLAVE_LATENCY parameter in peripheral unit could be a good idea. But regardless which value we set; we always get a slave latency of 0 when connecting to central unit. If we set the parameter NRF_BLE_SCAN_SLAVE_LATENCY (found in sdk.config for central app) to 20, then we got a slave latency of 20 for the peripheral-unit.

So, to my question:
We want to connect 2 peripheral units to the central unit which have multilink support. One Peripheral unit should have a slave latency of 0 and the other a slave latency of 100. Is this possible and how can we achieve that?

BR Svein

  • Hi,

    Slave latency is one of the connection parameters. If you only want to use it on some peripheral devices, it would probably maek sense to ensure that those request a connenction parameter update with the slave latency you want. You must also adjust the central implementation to accept this requeest with the slave latency. On the central side, this means handling the BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST and in the simplest case just accept the requeted parameters as shown in for instance examples/ble_central/ble_app_blinky_c/main.c.

Related