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

Change the advertise interval

Hello,

I am working on SDK 9.0 and softdevice 8.0 and the requirement for my application is the device has to advertise till it gets connected and even after disconnection.

To advertise at infinite time, I set the macro APP_ADV_TIMEOUT_IN_SECONDS to zero and the duration it takes to advertise is set in the macro APP_ADV_TIMEOUT_IN_SECONDS.

Now I want to change the advertise interval. For eg, advertise every one second once. If so, where do I have to set the timing?

Regards, Sowmya

Parents
  • Sowmya, You can change the advertisement interval by changing ble_gap_adv_params_t.interval value. Advertising value can vary from 0x0020 to 0x4000 in 0.625ms units. So maximum advertisement interval you can have is 10.24 seconds and the minimum interval is 20ms. Be aware, that if you are using non-connectable advertisements, the minimum interval is 100ms.


    If you look at ble_peripheral/ble_app_beacon example, you could see that this value is modified by macro #define NON_CONNECTABLE_ADV_INTERVAL MSEC_TO_UNITS(200, UNIT_0_625_MS) .


    Hope this helps.

  • Good to hear. Could you please mark my answer as correct, so others could also finds this. You can accept it by clicking grey circle which is next to my answer.

Reply Children
No Data
Related