This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Setting up whitelist in SDK V12.2.0

ble_app_template.zipI need to setup whitelist. To achieve that while calling ble_advertising_init I specified

ble_adv_whitelist_enabled = true

then, while handling BLE_ADV_EVT_WHITELIST_REQUEST I use:

uint32_t err_code;
		ble_gap_addr_t whitelist_addr = {1, BLE_GAP_ADDR_TYPE_RANDOM_STATIC, {0x25,0xD7,0x90,0x11,0x7A,0xC8}};
    const ble_gap_addr_t      *p_whitelist_addr[] = {&whitelist_addr};
		switch (ble_adv_evt)
    {
			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(NULL, 1, NULL, 0);
				APP_ERROR_CHECK(err_code);
			break;			

I made sure that both err_codes above are 0 once those 2 functions return but all this results in no advertising, instead I am experiencing (in RTT Viewer) APP_ERROR:ERROR:Fatal. If I commented out content of the 'case' above - then my device is advertising.

Did I miss anything while setting up my whitelist?

I think I did everything as described in Software Development Kit > nRF5 SDK > nRF5 SDK v12.2.0 > Libraries > BLE libraries > Advertising Module > Whiltelist > Usage

which says:

If you are using the S13x SoftDevice v3.x, call sd_ble_gap_whitelist_set. Then, call ble_advertising_whitelist_reply (you only need to provide the counts)

in my case I am using S132 V3.1.0

Update I tried to grab error details but Keil (?) is experiencing encoding issues while trying to display the file name, I don't have such a problem with at least files I create myself and main.c image description

The project can be found in the attachment.

Parents Reply Children
  • hi SergeyP, I meet the same problem now, and this issue confused me several days.And after browsing the answer in this page, i can't find any effective solution. Do you mean you just do nothing but unzip the SDK again and the issue disappeared? or you just find other reasons to explain this after do that? if so, hopefully you can give me some tip? best wish!

Related