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

Random beacon value(UUID, TxPower, RSSI, ...) on nRF52840 with NRF52 SDK 17.0.2

Hi developer,

I am trying to understand Beacon behavior and program. I am using BLE_Central multilink example to get informaiton from Beacons.

I added the below code in the function "ble_evt_handler" from main.c. 

case BLE_GAP_EVT_ADV_REPORT:
        {
            printf("Advertise received.\n");
            scan_start();
            bsp_board_led_on(CENTRAL_SCANNING_LED);

            memmove(uuid, p_gap_evt->params.adv_report.data.p_data, p_gap_evt->params.adv_report.data.len);

            printf("UUID: %02x%02x%02x%02x%02x%02x\t", uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5]);
				
            printf("TX_POWER: %d\t", p_gap_evt->params.adv_report.tx_power);
            
            printf("RSSI: %d\n", p_gap_evt->params.adv_report.rssi);
            
            //nrf_ble_scan_on_adv_report(p_scan_data, p_adv_report);

            //printf("Address = %d\t TxPower = %d\t RSSI = %d\n", p_adv_report->direct_addr.addr, p_adv_report->tx_power, p_adv_report->rssi);
            
        } break;

My beacons are off, but I got values and the values not from beacons are still printed even after the beacons are turned on.

I couldn't receive the beacon values.

Should I add something more?

Thanks for your help

Parents
  • Hi!

    The BLE Central Multilink sample has a name filter enabled to filter out all advertising packets without the name "Nordic_Blinky", so I don't think these packets should be making their way to the application layer at all. 

    Have you modified the code at all, a part from the portion you showed in your ticket?

    I will test this a bit here, to see if my understanding is correct.

    I can also suggest setting up a BLE sniffer and Wireshark to see all BLE packets, and to check if your Beacons are advertising.

    Best regards,

    Heidi

  • Hi again, you must have modified more of the code because uuid is not defined in the event handler so the code doesn't run. What SDK version are you on?

Reply Children
No Data
Related