Multi-link central lost connection with a peer when I changed the connection interval

I am using the SDK 17.0.2 and the S140 on an nrf52840

I have built a network with up to 3 devices.
And I want to switch the connection interval between 100ms to 500ms to improve the power consumption of the peripherals when the device is idle. And return to 100ms when we need a high data rate to transfer a bunch of data.
When I change the connection interval of all 3 devices to 500ms, the communication appears to be unstable. After some time peripherals randomly disconnect with reason 8 (BLE_HCI_CONNECTION_TIMEOUT).

My connections params on the central are:

  • Scan interval to 100ms
  • Scan Window to 50ms
  • Min Connection interval to 100ms
  • Max Connection interval to 100ms / 500ms
  • Supervisor Timeout 5000ms
  • Slave Latency 0


My connections params on the peripheral are:

  • Advertising interval to 100ms
  • Min Connection interval to 20ms
  • Max Connection interval to 500ms
  • Supervisor Timeout 5000ms
  • Slave Latency 0


The system works fine if I keep the connection interval always at 100ms, but when I start changing the connection interval to 500ms the system starts to lose the BLE connection unexpectedly.


Any help would be greatly appreciated.


Regards,
Carlos Pereira (edited)

Parents
  • Hello,

    It's not very common to change the connection interval run-time on the fly, typically you enable slave latency to achieve the same effect (e.g. slave latency =5). Using slave latency the peripheral can send data every connection interval (e.g. 100ms), but will skip up to slave latency intervals (e.g. 500ms) if there is no data to send.

    In terms of what may be the problem here I am not entirely sure, maybe it could be related to clock drift of the 32kHz in some way, what tolerance (in ppm) have you specified for the LFCLK on the central and peripheral devices here? You typically specify this when enable the softdevice.

    Btw, it should not directly affect what you see, but I suggest to set scan window/interval to significantly smaller than the connection interval, so if the connection interval is 100ms, then set for instance scan window = 5ms and interval = 10ms. This will schedule scanning between connection events.

    Best regards,
    Kenneth

Reply
  • Hello,

    It's not very common to change the connection interval run-time on the fly, typically you enable slave latency to achieve the same effect (e.g. slave latency =5). Using slave latency the peripheral can send data every connection interval (e.g. 100ms), but will skip up to slave latency intervals (e.g. 500ms) if there is no data to send.

    In terms of what may be the problem here I am not entirely sure, maybe it could be related to clock drift of the 32kHz in some way, what tolerance (in ppm) have you specified for the LFCLK on the central and peripheral devices here? You typically specify this when enable the softdevice.

    Btw, it should not directly affect what you see, but I suggest to set scan window/interval to significantly smaller than the connection interval, so if the connection interval is 100ms, then set for instance scan window = 5ms and interval = 10ms. This will schedule scanning between connection events.

    Best regards,
    Kenneth

Children
No Data
Related