This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to use whitelist in ble_app_hrs_c

S130, SDK 12.3, ble_app_hrs_c example. I want to use whitelist function in this example but I can't finish it.

When I run peer_list_get(), it gets all 0xFF, means that there is no peer in flash.

So I use the code below:

	const ble_gap_id_key_t m_peer1 = {
		.id_info ={
				.irk = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F},},
		.id_addr_info = {
			.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC,
			.addr = {0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0x06},}
	};
	
pm_peer_data_bonding_t peer_bonding_data;
  peer_bonding_data.own_role = BLE_GAP_ROLE_CENTRAL;
  peer_bonding_data.peer_ble_id = m_peer1;
	uint32_t err_code = pm_peer_new(&peer_id,&peer_bonding_data,NULL);
APP_ERROR_CHECK(err_code);
	err_code = pm_peer_data_bonding_store(peer_id,&peer_bonding_data,NULL);
APP_ERROR_CHECK(err_code);

But I got FDS_ERR_NOT_FOUND by peer_data_find in pm_whitelist_get().

So how to use whitelist in ble_app_hrs_c?

Related