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

52832 central multilink address filter not working on DIY HW

Hi,

I'm working on a multilink central device with SDK16, nRF52832.

I'm trying to connect the central to 2 peripherals with certain address. So I added 2 address filters in scan_init:

//BLE_NUS_C_DEF(m_ble_nus_c);                                             /**< BLE Nordic UART Service (NUS) client instance. */
BLE_NUS_C_ARRAY_DEF(m_ble_nus_c, NRF_SDH_BLE_CENTRAL_LINK_COUNT);  
NRF_BLE_GATT_DEF(m_gatt);                                               /**< GATT module instance. */

//BLE_DB_DISCOVERY_DEF(m_db_disc);                                        /**< Database discovery module instance. */
BLE_DB_DISCOVERY_ARRAY_DEF(m_db_disc, NRF_SDH_BLE_CENTRAL_LINK_COUNT);
NRF_BLE_SCAN_DEF(m_scan);                                               /**< Scanning Module instance. */
NRF_BLE_GQ_DEF(m_ble_gatt_queue,                                        /**< BLE GATT Queue instance. */
               NRF_SDH_BLE_CENTRAL_LINK_COUNT,
               NRF_BLE_GQ_QUEUE_SIZE);
static uint16_t m_ble_nus_max_data_len = BLE_GATT_ATT_MTU_DEFAULT - OPCODE_LENGTH - HANDLE_LENGTH; /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */


//b859decbd6fa
static uint8_t m_peripheral_addr1[6] = {0xb8, 0x59, 0xde, 0xcb, 0xd6, 0xfa};

//6a637c7022e1
static uint8_t m_peripheral_addr2[6] = {0x6a, 0x63, 0x7c, 0x70, 0x22, 0xe1};

/**@brief Function for initializing the scanning and setting the filters.
 */
static void scan_init(void)
{
    ret_code_t          err_code;
    nrf_ble_scan_init_t init_scan;

    memset(&init_scan, 0, sizeof(init_scan));

    init_scan.connect_if_match = true; 
    init_scan.conn_cfg_tag     = APP_BLE_CONN_CFG_TAG;

    err_code = nrf_ble_scan_init(&m_scan, &init_scan, scan_evt_handler);
    APP_ERROR_CHECK(err_code);

	err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_ADDR_FILTER, m_peripheral_addr1);
	APP_ERROR_CHECK(err_code);
	err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_ADDR_FILTER, m_peripheral_addr2);
	APP_ERROR_CHECK(err_code);
	err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_ADDR_FILTER, false);
  APP_ERROR_CHECK(err_code);
	
	
//    err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &m_nus_uuid);

//    err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_UUID_FILTER, false);
//    APP_ERROR_CHECK(err_code);
}

NRF_BLE_SCAN_ADDRESS_CNT is set to 2;

CENTRAL_LINK_CNT and TOTAL_LINK_CNT is set to 2;

The software works as expected on 10040 DK, it could connect 2 peripherals with target address only.

But when I was trying to migrate the program to a DIY HW, the address filter seems disabled.

Did I make it work coincidentally on DK? Did I miss any configuration?

Thanks!

Parents Reply Children
No Data
Related