- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Regards
Vikas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Regards
Vikas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vikas,
Thanks for your post! I will try it soon.
Best Regards,
Denis