NRF52840-Beacon_Scanner icon indicating copy to clipboard operation
NRF52840-Beacon_Scanner copied to clipboard

Read UUID,RSSI value?

Open vivekalways opened this issue 6 years ago • 6 comments

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

vivekalways avatar Nov 13 '18 06:11 vivekalways

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.

manumonti avatar Nov 13 '18 10:11 manumonti

thanks a lot...

vivekalways avatar Nov 14 '18 16:11 vivekalways

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!

martatracktio avatar Nov 29 '18 16:11 martatracktio

Hi, yes , i got it ..

vivekalways avatar Dec 04 '18 10:12 vivekalways

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.

manumonti avatar Dec 04 '18 10:12 manumonti

Hi manumonti, Thanks. it ll helpful for others..please release asap..

vivekalways avatar Dec 05 '18 04:12 vivekalways