BLE current advertising frequency

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DeAl_292241
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Hi,

   

How to know if the BLE device is scanning in FAST mode or SLOW mode? In fact, for my particular case, I would like to know when exactly the device is advertising to blink a LED at the same rate.

   

Thanks,

   

Denis Alain, Eng.

0 Likes
1 Solution
Anonymous
Not applicable

Hi 

   

 

   

No direct procedure to find whether central is scanning in fast mode or slow mode. When scanning mode changes from fast to slow, at the end of fast mode ,event CYBLE_EVT_TIMEOUT will trigger. you can monitor that one.

   

 

   

In addition to that you can read the register "BLE_BLELL_SCAN_INTERVAL" and "BLE_BLELL_SCAN_WINDOW" and see if the value matches with fast or slow modes.

   

 

   

When device is advertising CYB:LE_GetState() returns CYBLE_STATE_ADVERTISING. So you can tunr oN LED based on the return value of CYBLE_GetState(). If you want blink at the same rate of advertising then implement low power

   

and toggle the LED when API CYBLE_GetBLESSState() returns CYBLE_BLESS_STATE_EVENT_CLOSE

   

 

   

refer app note AN92584 for more details on low power modes

   

http://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-ba...

   

 

   

Regards

   

Vikas.

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

Hi 

   

 

   

No direct procedure to find whether central is scanning in fast mode or slow mode. When scanning mode changes from fast to slow, at the end of fast mode ,event CYBLE_EVT_TIMEOUT will trigger. you can monitor that one.

   

 

   

In addition to that you can read the register "BLE_BLELL_SCAN_INTERVAL" and "BLE_BLELL_SCAN_WINDOW" and see if the value matches with fast or slow modes.

   

 

   

When device is advertising CYB:LE_GetState() returns CYBLE_STATE_ADVERTISING. So you can tunr oN LED based on the return value of CYBLE_GetState(). If you want blink at the same rate of advertising then implement low power

   

and toggle the LED when API CYBLE_GetBLESSState() returns CYBLE_BLESS_STATE_EVENT_CLOSE

   

 

   

refer app note AN92584 for more details on low power modes

   

http://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-ba...

   

 

   

Regards

   

Vikas.

0 Likes
DeAl_292241
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Hi Vikas,

   

Thanks for your post! I will try it soon.
Best Regards, 

   

Denis

0 Likes