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

SDK11.0 BLE_GAP_EVT_ADV_REPORT advertising data not complete

Hi all:

I use sdk11.0

<nRF5_SDK_11.0.0_89a8197\examples\ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay> 

this example, scan heart sensor , sdk return BLE_GAP_EVT_ADV_REPORT event, I print the adv_report data, find the heart sensor name is not in the data ,please see picture.

image description

Parents
  • Aren't data in nRF Connect combine Adv. data and Scan response data while you print just adv_data in the embedded application?

  • I know why this sitution occure, the name in response data , I add some code and change the

    ble_gap_scan_params_t config,
    static const ble_gap_scan_params_t m_scan_param =
    {
        1,              // Active scanning not set. if 0 return advtisting data, if 1return advertising data and respone data
        0,              // Selective scanning not set.
        NULL,           // No whitelist provided.
        SCAN_INTERVAL,
        SCAN_WINDOW,
        0x0000          // No timeout.
    };
    

    code :

    uint32_t opt_id = BLE_GAP_OPT_SCAN_REQ_REPORT;
    ble_options.gap_opt.scan_req_report.enable = 1;
    ble_stack_init();
    err_code = sd_ble_opt_set(opt_id, &ble_options);
    APP_ERROR_CHECK(err_code);
    
Reply
  • I know why this sitution occure, the name in response data , I add some code and change the

    ble_gap_scan_params_t config,
    static const ble_gap_scan_params_t m_scan_param =
    {
        1,              // Active scanning not set. if 0 return advtisting data, if 1return advertising data and respone data
        0,              // Selective scanning not set.
        NULL,           // No whitelist provided.
        SCAN_INTERVAL,
        SCAN_WINDOW,
        0x0000          // No timeout.
    };
    

    code :

    uint32_t opt_id = BLE_GAP_OPT_SCAN_REQ_REPORT;
    ble_options.gap_opt.scan_req_report.enable = 1;
    ble_stack_init();
    err_code = sd_ble_opt_set(opt_id, &ble_options);
    APP_ERROR_CHECK(err_code);
    
Children
No Data
Related