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

Dropped packets

Test Setup:

SD 6.1.0

SDK 15.2.0

Peripheral:  nRF52840

Central: iOS 13.1

Central is connected to two peripherals, each peripheral is sending 50 pkt/s, each packet has 13 bytes of payload. Connection interval is 30ms. Over hundreds of hours of testing this setup works great and we see no packet loss, however we now have one device which fails *sometimes*. We have three recordings where one peripheral is normal but the other peripheral shows  this pattern:

pkt-1, pkt-2, DROP, pkt-4, pkt-5, DROP, pkt-7, pkt-8, ...

We detect the drops by checking a continuity counter (cc) in the packet on the central device. The cc is an 8-bit value which increments for each packet sent by the peripheral. On the central we check each packet to make sure the cc value is equal to the previous packet +1.  

So.. any thoughts how to debug this? 

My first thought was to check error counters in the Nordic SD but could not find any nack counters or retransmit counters. iOS gives you nothing. 

Parents Reply Children
  • In your project you should find a NRF_SDH_CLOCK_LF_ACCURACY value. This is typically used in nrf_sdh_enable_request() when calling sd_softdevice_enable(). You can set this value to something larger than the tolerance of the physical crystal you have in your design, by setting it larger you can compensate for a peer that may be slightly out of it's own tolerance spec. For instance if you have 20ppm in your design you likely have used NRF_CLOCK_LF_ACCURACY_20_PPM, however you may set it to NRF_CLOCK_LF_ACCURACY_100_PPM.

    Kenneth

Related