Hi,
I'm new to the QN9020, can someone tell me how to set the advertising period of the device?
Hello Tony,
Advertising is started with the app_gap_adv_start_req() function, where the last 2 parameters indicate the advertising interval min/max values. These values are normally set by the macros GAP_ADV_FAST_INTV1 and GAP_ADV_FAST_INTV2. The advertising interval goes in 625µs steps and can be in the range from 20ms (0x0020) to 10.24s (0x4000).
Regards,
Gerardo
Hi Gerardo,
Thank you for your reply. Are you saying that the maximum advertising interval can only ever be 10.24s? i.e. if scanning for a BLE device using a smartphone app the BLE device will only appear for 10.24s?
Tony
Hi Tony,
If the advertising interval is set to 10s, it means that every 10s the device will send an advertising packet as long as the device stays in advertising mode. In this case, the scanning device (e.g smartphone), will detect the device every 10s.
If you want to stop advertising, you can use the app_gap_adv_stop_req() function.
Regards,