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

get RSSI on nRF52840 with NCS

I'm working on NCS 1.6.1.

I'd like to confirm if my method to get the RSSI is correct.

i test with a sample "peripheral_uart"

after BT connected, i printk the (NRF_RADIO->RSSISAMPLE)

the result like:

42

40

46

39

is it the correct RSSI? (then just to add a minus, -42, -40, ,,,)  

  • Hi instead of reading it directly from the RADIO register, it is highly recommended to use sdc_hci_cmd_sp_read_rssi API from the nrfx library that is also available with the NCS

    you might need to enable the below features in config

    CONFIG_BT_CTLR_ADVANCED_FEATURES=y
    CONFIG_BT_CTLR_CONN_RSSI=y

  • it seems hard to trace out how to feed parameter, what is the handle?

    typedef __PACKED_STRUCT
    {
    uint16_t handle;
    } sdc_hci_cmd_sp_read_rssi_t;

    do you have a example of how to call the sdc_hci_cmd_sp_read_rssi ? 

  • It is the connection handle as mentioned in the documentation for that API

     * For an LE transport, a Connection_Handle is used as the Handle command
     * parameter and return parameter. The meaning of the RSSI metric is an
     * absolute receiver signal strength value in dBm to ±6 dB accuracy. If the RSSI
     * cannot be read, the RSSI metric shall be set to 127.

Related