i am curious about how many devicess can we add to the white list. is there any limitations.
can i add 10 000 devicess for example
and information for someone who is searching about this topic, how to use and implement it:
Code: Select all
static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* param){
if(event==ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT){
ESP_LOGI(TAG, "--------ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT----------");
esp_ble_gap_update_whitelist(true, whitelist_addr, BLE_ADDR_TYPE_PUBLIC);
uint32_t duration = 0;
esp_ble_gap_start_scanning(duration);
.
.
.
Code: Select all
void app_main(void)
{
.
.
.
esp_ble_gap_set_scan_params(&ble_scan_params);
}
Code: Select all
static esp_ble_scan_params_t ble_scan_params = {
.scan_type = BLE_SCAN_TYPE_ACTIVE,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.scan_filter_policy = BLE_SCAN_FILTER_ALLOW_ONLY_WLST,
.scan_interval = 0x50,
.scan_window = 0x30,
.scan_duplicate = BLE_SCAN_DUPLICATE_DISABLE
};
Code: Select all
uint8_t whitelist_address[6] = {0x60, 0xc0, 0xbf, 0x28, 0xa4, 0x31};
Code: Select all
static esp_ble_scan_params_t ble_scan_params = {
.
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.
};