Hello,
SD: 122
part nrf52833
I need to do the following:
a. scan for advertisements containing a particular MAC address without connecting. This works.
b. the scanned MAC addresses are reviewed by another MCU. This works.
c. if the MAC address matches, then the MCU will request that a SCAN with a connection starts.
The scanning restarts, but I am not able to get the Connection event?
Here is the scan initialization code that I am using.
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);
m_target_periph_addr.addr[0]=0x00;
m_target_periph_addr.addr[1]=0x00;
m_target_periph_addr.addr[2]=0x00;
m_target_periph_addr.addr[3]=0x44;
m_target_periph_addr.addr[4]=0x44;
m_target_periph_addr.addr[5]=0x44;
err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_ADDR_FILTER, m_target_periph_addr.addr);
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);
Thanks,
Dan
