cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

CoCo_1816446
New Contributor II

I am using CY8CKIT-062-WiFi-BT dev kit and WICED Studio 6.4 on Windows 10.

BACKGROUND:

For my project, I want

ble_advertisement_flag_value = BTM_BLE_GENERAL_DISCOVERABLE_FLAG

until there is at least one device on the Whitelist. From then on I want

ble_advertisement_flag_value = BTM_BLE_LIMITED_DISCOVERABLE_FLAG.

The first device on the Whitelist will be able to add and remove any other device from the whitelist. I have attempted the following code:

uint8_t ble_advertisement_flag_value  = BTM_BLE_GENERAL_DISCOVERABLE_FLAG|BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_CONTROLLER_SUPPORTED;

uint8_t whitelist_size  = wiced_bt_ble_get_white_list_size();

    if(whitelist_size != 0)

     {

          wiced_btm_ble_update_advertisement_filter_policy(BTM_BLE_ADVERT_FILTER_ALL_CONNECTION_REQ_WHITELIST_SCAN_REQ);

     }

It seems that wiced_bt_ble_get_white_list_size() returns the size of the chunk of memory dedicated to the whitelist. I get  whitelist_size = 128 '\200'

QUESTION:

How can I determine the number of devices on the whitelist?

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator

Hi CoCo_1816446 ,

wiced_bt_ble_get_white_list_size will give you the maximum limit of whitelist on the controller side , not the current number of devices added in whitelist.

I think you may have to manually mange a variable to track the number of devices added / removed to whitelist. There is no API as such.

Regards,

Anjana

View solution in original post

0 Likes
2 Replies
AnjanaM_61
Moderator
Moderator

Hi CoCo_1816446 ,

wiced_bt_ble_get_white_list_size will give you the maximum limit of whitelist on the controller side , not the current number of devices added in whitelist.

I think you may have to manually mange a variable to track the number of devices added / removed to whitelist. There is no API as such.

Regards,

Anjana

View solution in original post

0 Likes
CoCo_1816446
New Contributor II

Ok, thank you.

0 Likes