I apologize if this question is stupid
I want to read data in p_adv_report.
I use the command NRF_LOG_INFO ("name =% x ", * p_adv_report-> data.p_data);
but it's meaningless
Please help me, I'm the freshman
Thanks
I apologize if this question is stupid
I want to read data in p_adv_report.
I use the command NRF_LOG_INFO ("name =% x ", * p_adv_report-> data.p_data);
but it's meaningless
Please help me, I'm the freshman
Thanks
Hi,
Yes, this would be meaningless. You are printing the pointer (address) to the data as a hex number. If you want to dump the whole advertising packet that could be done like this:
NRF_LOG_HEXDUMP_INFO(p_adv_report-> data.p_data, p_adv_report->data.len);
As you write something about "name" Is suspect you may want to parse the advertising packet looking for something specific as well. In that case, you may want to look at ble_advdata_parse().