How does BLE peripheral (S112) use supervision timeout?

I'm working on an nRF device (S112 SoftDevice) that acts as a connectable peripheral to an iOs central. The application only has data to transfer every 5 minutes, so I'm trying to lengthen the connection parameters to reduce the power consumption while maintaining the connection.

The S112 lets me configure the preferred connection parameters for Supervision Timeout from 100ms-32s in 10ms steps.

The Apple Accessory Design Guidelines suggest using Supervision Timeout from 6 seconds to 18 seconds.

I experimented with the following parameters:

  • Supervision Timeout: 18s
  • Connection Interval: 192.5ms
  • Peripheral Latency: 30

When there's no data to send, I see empty PDU connection events from the peripheral side every 6 seconds. Wireshark shows the central periodically sending these at 300ms intervals. Right after a peripheral event, I put the phone in a faraday cage. As expected, after ~18s the peripheral disconnected and restarted advertising.

I was expecting to see 3 empty connection events before timeout, but it looks like after the first unacknowledged event the peripheral skips the latency and starts trying at the actual connection interval. It does this for the next `<supervision_timeout> - <first_interval=connection_interval*(peripheral_latency+1)>` duration. Is that the expected behavior?

The nrf_sdh is polling for BLE events and I was expecting to see BLE_GAP_EVT_TIMEOUT but instead see BLE_GAP_EVT_DISCONNECTED. Is that the right event for a peripheral supervision timeout?

I noticed that if I block the connection right before a planned connection interval, it still disconnects 18s after the previous connection event, even though the connection has only been interrupted ~12 seconds.

I couldn't find any information on devzone or in the TechDocs on how the peripheral implements the supervision timeout parameter. Is it just a timer that resets after receiving an empty PDU from the Central during the RX phase of the keep-alive connection event? Appreciate any additional details you can provide or point me to!

Thanks,

Sam

Related