NRF52840-Beacon_Scanner
NRF52840-Beacon_Scanner copied to clipboard
Read UUID,RSSI value?
hi , i m new to this NRF52840...i m using this code to scan beacon value from NRF52840..while m running this Beacon scanner, i can read packets of beacon data..how should i split that data to read RSSI value? please help me out..Thanks in advance
hi , i m new to this NRF52840...i m using this code to scan beacon value from NRF52840..while m running this Beacon scanner, i can read packets of beacon data..how should i split that data to read RSSI value? please help me out..Thanks in advance
Hi vivekalways. First of all, at this moment this application is under development (we are upgrading it to the new SDK version 15.2.0).
As you can see, the app only shows the payload of advertisements and doesn't show another data like RSSI. However, we are going to study this proposal in order to add it in the future.
Anyway, you can try something. If you look at line 85-89 of main.c, you will see the following:
case BLE_GAP_EVT_ADV_REPORT:
{
NRF_LOG_RAW_HEXDUMP_INFO (m_scan.scan_buffer.p_data, m_scan.scan_buffer.len);
NRF_LOG_RAW_INFO ("----------------------------------\r\n");
}
The function "ble_evt_handler" is responsible of show the payload of the advertisement. This function receives this parameter:
ble_evt_t const * p_ble_evt
And the structure p_ble_evt has the following field (uint8_t):
p_ble_evt.gap_evt.adv_report.rssi
So probably, you can add this:
case BLE_GAP_EVT_ADV_REPORT:
{
NRF_LOG_RAW_HEXDUMP_INFO (m_scan.scan_buffer.p_data, m_scan.scan_buffer.len);
NRF_LOG_RAW_INFO ("RSSI: %d\r\n", p_ble_evt.gap_evt.adv_report.rssi);
NRF_LOG_RAW_INFO ("----------------------------------\r\n");
}
I can't test this by now, but i hope this helps.
thanks a lot...
Hi,
I am trying the same as @vivekalways but I don't really know how to do it. Did you finally get the RSSI and UUID?
Thanks!
Hi, yes , i got it ..
Hi,
I am trying the same as @vivekalways but I don't really know how to do it. Did you finally get the RSSI and UUID?
Thanks!
Hi martatracktio,
We are working on this. We will release a new version with this suggestion implemented the following days.
Hi manumonti, Thanks. it ll helpful for others..please release asap..