This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

get rssi

Hi,I would like to know how to obtain slave rssi through broadcast data before two Bluetooth devices connect successfully

Parents
  • Hi,

    To be able to get RSSI from nearby devices, the devices will have to transmitt something that your central can receive. If you setup the phone to do BLE advertising like a peripheral device, you can get the RSSI from the advertising report that you receive with the BLE_GAP_EVT_ADV_REPORT event in the ble_evt_handler in the central examples. You can print the RSSI value using the following line:

    NRF_LOG_INFO("RSSI: %d", p_ble_evt->evt.gap_evt.params.adv_report.rssi);

    cheers
    karthikeyan
Reply
  • Hi,

    To be able to get RSSI from nearby devices, the devices will have to transmitt something that your central can receive. If you setup the phone to do BLE advertising like a peripheral device, you can get the RSSI from the advertising report that you receive with the BLE_GAP_EVT_ADV_REPORT event in the ble_evt_handler in the central examples. You can print the RSSI value using the following line:

    NRF_LOG_INFO("RSSI: %d", p_ble_evt->evt.gap_evt.params.adv_report.rssi);

    cheers
    karthikeyan
Children
Related