This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to decode advertising data?

I used nRF5_SDK_12.1.0_0d23e2a, SoftDevice 8_9_0。 The peripheral device name is "Nordic"

After central scan, i want to get the device name "Nordic",i used the following code to decode:

adv_data.p_data = (uint8_t *)p_gap_evt->params.adv_report.data; adv_data.data_len = p_gap_evt->params.adv_report.dlen;
err_code = adv_report_parse(BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE, &adv_data, &type_data);

if (err_code != NRF_SUCCESS) { // Compare short local name in case complete name does not match. err_code = adv_report_parse(BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE, &adv_data, &type_data); }

Why the ( type_data.p_data) do not have any data? How to get the "Nordic" string? Thanks.

Parents Reply Children
No Data
Related