QN9020 Advertising Period

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QN9020 Advertising Period

1,302 Views
tonyblake
Contributor I

Hi,

I'm new to the QN9020, can someone tell me how to set the advertising period of the device?

Labels (1)
0 Kudos
Reply
3 Replies

1,128 Views
gerardo_rodriguez
NXP Employee
NXP Employee

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

0 Kudos
Reply

1,128 Views
tonyblake
Contributor I

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

0 Kudos
Reply

1,128 Views
gerardo_rodriguez
NXP Employee
NXP Employee

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,

0 Kudos
Reply