2 Replies Latest reply on May 1, 2020 8:56 AM by CoCo_1816446

    How to determine the number of devices on the Whitelist?

    CoCo_1816446

      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?