How to read scan response data (peripheral name) inside the nrf_uart_c (central)?

I have beacon that broadcast its name with type 09. I cannot get it while scanning of nrf_uart_c (adv_report). 

I assume I need to activate scan_req and then parse the response data - how can I do it?

Parents
  • Hi Avi, 

    Yes correct. If you use the nrf_ble_scan module, you need to set active=true in your scan param ble_gap_scan_params_t you feed into nrf_ble_scan_init(). 

    The scan response packet will be reported the same as a normal advertising packet. It's reported to the application either by NRF_BLE_SCAN_EVT_FILTER_MATCH or NRF_BLE_SCAN_EVT_WHITELIST_ADV_REPORT if you use filter or by NRF_BLE_SCAN_EVT_NOT_FOUND event if you don't use any filter. 

  • It is already set to active in the original code:

    static void nrf_ble_scan_default_param_set(nrf_ble_scan_t * const p_scan_ctx)
    {
    // Set the default parameters.
    p_scan_ctx->scan_params.active = 1;

    I add SCAN NAME filter and also the releavnt part in the sdk_config and cannot get the scan_req data

    If I use the blinky example it works (both in the peripheral and in the central).

    My beacon data is as follows:

Reply
  • It is already set to active in the original code:

    static void nrf_ble_scan_default_param_set(nrf_ble_scan_t * const p_scan_ctx)
    {
    // Set the default parameters.
    p_scan_ctx->scan_params.active = 1;

    I add SCAN NAME filter and also the releavnt part in the sdk_config and cannot get the scan_req data

    If I use the blinky example it works (both in the peripheral and in the central).

    My beacon data is as follows:

Children
Related