Hi. I am using the new SDK 13.0.0 and nrf52 chip. I am trying to set a whitelist with the peripheral_template example code.
I think the whitelist is already enabled in fast advertising mode but i cannot connect with the selected device. Here you can see my settings for whitelist.Maybe you find a mistake in my code.
in advertising_init():
options.ble_adv_whitelist_enabled = true;
in on_adv_evt():
at the top of this function i add:
ble_gap_addr_t whitelist_addr = {1, BLE_GAP_ADDR_TYPE_PUBLIC,{0x01,0x01,0x01,0x01,0x01,0x01}};
ble_gap_addr_t const *p_whitelist_addr[] = {&whitelist_addr};
and i add in switch (ble_adv_evt)
the case:
case BLE_ADV_EVT_WHITELIST_REQUEST:
err_code = sd_ble_gap_whitelist_set(p_whitelist_addr, 1);
APP_ERROR_CHECK(err_code);
err_code = ble_advertising_whitelist_reply(&whitelist_addr, 1, NULL, 0);
APP_ERROR_CHECK(err_code);
break;
The APP_ERROR_CHECKS are succesfully "0" and after starting i cannot connect to my device with this predefined Bluetooth address. The problem is, that the NRF52 can no longer be connected to any device, since the whitelist is activated. So i guess the whitelist is not set correctly.