BLE scan raw data (p_data) gives incomplete data.

I am trying to display the p_data received data using below inside NRF_BLE_SCAN_EVT_NOT_FOUND case but I am receiving the below data.

2|1|6|1a|ff|4c|0|2|15|ff|ff|0|0|ff|ff|0|0|ff|ff|0|0|ff|ff|0|0|ff|11|2|a5|bf|6a|0|2c|39|0|20|1f|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|

instead of receiving

2|1|6|1a|ff|4c|0|2|15|ff|ff|0|0|ff|ff|0|0|ff|ff|0|0|ff|ff|0|0|ff|11|2|a5|bf|2|a|4|a|16|0|ff|55|ff|11|2|a5|41|88|9|9|54|43|5a|30|30|31|37|36

Note: above payload, HEX data is separated by '|' symbol.

In the above payload data type Type: a and Type: 16 is not getting displayed on the received data. But on the contrary, note even though we can't see it on raw data but we can fetch the data by using ble_advdata_parse() function. why this is happening ? why so?

I have even tried to increase NRF_BLE_SCAN_BUFFER value but no luck

Thanks and regards,

Neeraj Dhekale

Parents Reply
  • Neeraj Dhekale said:
    But here my question is if the nrfConnect app is able to get all these raw data without any connection to the beacon.

    You don't need a connection, however it's likely the raw data is split into two packets here.

    For a central device you can on the BLE_GAP_EVT_ADV_REPORT event check the p_ble_evt->evt.gap_evt.params.adv_report.type.scan_response field if the received packet is a scan response or not. When starting scanning you need to set the scan_params.active=1 to request scan response packets before calling sd_ble_gap_scan_start().

    So, can you check if you get the remaing data in the scan_response?

    Best regards,
    Kenneth

Children
Related