Fast Advertising Timeout Units

nRF5_SDK_15.0.0_a53641a
s140
nRF52840

Documentation says that both ble_adv_fast_timeout and the ble_adv_slow_timeout are in units of 10ms, and that appears to be true of the latter.  But when I configure a fast adv timeout, I get a longer duration than expected.  The longer the timeout, the larger the discrepancy.  For example:

Desired Fast Adv Timeout Configured Fast Adv Timeout Value Observed Fast Adv Timeout Percent Difference (Observed/Desired)
30s 3000 37s 123%
60s 6000 74s 123%
180s 18000 224s 124%
300s 30000 373s 124%
360s 36000 447s 124%

Configuring slow adv timeouts in the same manner yields observed timeouts in line with desired timeouts.  So the behavior appears to be unique to fast advertising.  We didn't notice this issue until recently when we increased our fast advertising duration during DFU advertising.  Previously at a 30s timeout, the additional 7 seconds was negligible.  But now at 5m, getting more than an extra minute is a bit more pronounced and concerning.

Is the documentation correct in prescribing the fast advertising timeout as being in units of 10ms?

Parents
  • Hi Mkruger, 
    I just did a test here with the nRF52840 with ble_app_hrs in SDK v15.3. 

    The example configured ble_adv_fast_timeout =18000 and it seems the timeout was right. I observed that it stopped after 3 minutes sharp. The device enter SystemOFF mode after that. 

    Could you try to test with the sample (and SDK v15.3)? Please make sure the advertising was not restarted for example because of other central connect to it. 
    Has the difference consistent ? There could be a chance that the LFCLK was drifting. But it doesn't explain how the ble_adv_slow_timeout  still correct. From what I can see in the code it's identical how the ble_adv_slow_timeout  and ble_adv_fast_timeout is used. 

  • Hello,

    I got distracted for a while by other things, but in finally swinging back to this effort, I tried your suggested ble_app_hrs example without also upgrading the SDK and the fast advertising internal seems much more accurate.  So the issue appears to be in my application.  I will poke around with that and see what I can find.  

    Thank you!

Reply Children
No Data
Related