Getting the RSSI of a connected device on nRF54L15 and nRF54H20. Or via advertising.

Hello, 

I am trying to get the RSSI value of a connected device on the nRF54L15, the same thing with our nrf54H20 device (nRF54H20 would be great if i can retrieve it via scanning an advertisement also). I tried this code but with no success. Could you recommend me which function to use, configs to enable, etc.

Best regards,

Mikael 

  • Greeting Mikael,

     

    nRF54H20 would be great if i can retrieve it via scanning an advertisement also

    You should be able to get the rssi within the callback when starting scanning, like this:

    https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.2.0/samples/bluetooth/peripheral_gatt_write/src/peripheral_gatt_write.c#L59-L66

     

    I am trying to get the RSSI value of a connected device on the nRF54L15

    For a connected device, you can follow the sequence here to enable/fetch the RSSI per connection:

    https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.2.0/samples/bluetooth/hci_pwr_ctrl/src/main.c#L69

     

    When you connect to the peripheral (built for nrf54l15dk/nrf54l15/cpuapp on ncs v3.2.0), it will print the RSSI over the logging interface:

    Connected (0) - RSSI = -29
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -31
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -33
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -32
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -33
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -33
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -33
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -33
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -29
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -30
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -34
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -46
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -48
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -40
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -37
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -37
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -37
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -41
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -39
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    Connected (0) - RSSI = -40
    Adaptive Tx power selected = -20
    Actual Tx Power: -20
    Connection (0) TXP = -20
    

     

    Kind regards,

    Håkon

Related