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

Scanning filter fail

Hello everyone,

I'm programming for nRF52833, using SDK17. When I program for scanning filter (SCAN_NAME_FILTER and SCAN_UUID_FILTER) and debug, I got these errors. I don't know where these errors came from. Can anyone help me with this??

Here is my code and my errors.

Hope for your reply as soon as possible!!

Thanks

Best regards,

static ble_uuid_t const m_nus_uuid =
{
    .uuid = BLE_UUID_NUS_SERVICE,
    .type = NUS_SERVICE_UUID_TYPE
};


static char const m_target_periph_name[] = "BLE_DEMO_24"; 

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;
    init_scan.p_scan_param     = &m_scan_params;


    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_NAME_FILTER, m_target_periph_name);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &m_nus_uuid);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER | NRF_BLE_SCAN_UUID_FILTER, false);
    APP_ERROR_CHECK(err_code);

}

Related