Mac address in whitelist

Hello everyone 

Currently I am developing the code for a gateway that collects data from various BLE devices. Some of the peripherals go onto pairing process, meaning that its bonding information will be stored in the whitelist for further connections; some others don't support pairing (the peripheral only connects to the central and the information is exchanged). I want to scan using the whitelist, however, I am trying to find a way to add the MAC addresses of those devices that don´t support pairing to the whitelist,. Is there a way I can do that?

Alternitivaly, can I use the whitelist filter AND the MAC adress filter?

Thank you 

PS: I´m using nRF52832 and SDK v17.1

Parents
  • Hello Daniela,

    It is possible as long as the peripheral uses a static address type. You can populate the whitelist in the application. However, there are no examples for it. The SDK examples populates the whitelist via the peer manager which gets the information from the bond table.

    The softdevice calls for updating the whitelist and it is done by sd_ble_gap_whitelist_set() function (https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_9_2_1_2_34#gacdd2dd570000368dd5c29d799c198779 )

    pp_wl_addrs: Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared.

    len: Length of the whitelist, maximum length is defined by BLE_GAP_WHITELIST_ADDR_MAX_COUNT  

    This function sets the active whitelist in the SoftDevice. The things to be noted;- Only one whitelist can be used at a time and the whitelist is shared between the BLE roles. The whitelist can not be set if a BLE role is using the whitelist. If an address is resolved using the information in the device identity list, then the whitelist filter policy applies to the peer identity address and not the resolvable address sent on air.

    You can look at the id_manager.c::im_whitelist_set() function to see how the function is used by the peer manager. 

    Fell free to ask if you have further queries. 

    Have a nice weekend. 

    Best regards,

    Kazi Afroza Sultana

Reply
  • Hello Daniela,

    It is possible as long as the peripheral uses a static address type. You can populate the whitelist in the application. However, there are no examples for it. The SDK examples populates the whitelist via the peer manager which gets the information from the bond table.

    The softdevice calls for updating the whitelist and it is done by sd_ble_gap_whitelist_set() function (https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=4_7_3_9_2_1_2_34#gacdd2dd570000368dd5c29d799c198779 )

    pp_wl_addrs: Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared.

    len: Length of the whitelist, maximum length is defined by BLE_GAP_WHITELIST_ADDR_MAX_COUNT  

    This function sets the active whitelist in the SoftDevice. The things to be noted;- Only one whitelist can be used at a time and the whitelist is shared between the BLE roles. The whitelist can not be set if a BLE role is using the whitelist. If an address is resolved using the information in the device identity list, then the whitelist filter policy applies to the peer identity address and not the resolvable address sent on air.

    You can look at the id_manager.c::im_whitelist_set() function to see how the function is used by the peer manager. 

    Fell free to ask if you have further queries. 

    Have a nice weekend. 

    Best regards,

    Kazi Afroza Sultana

Children
Related