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

NRF52840 uart_hci : read RSSI for connected.

Hi,

I'm in the process of integrating nrf52840 module in HCI over UART to a linux host.

So far I have been able to build the hci_uart in from the samples and bring it up on the host using btattach.

But one of the requirement for my work is to be able to issue the read rssi HCI command  ( 0x05 0x0005 <handle>) and get the RSSI for the existing connections and NOT DEVICES IN RANGE WHICH ARE NOT CONNECTED.

so far,

connected to a LE device using bluetoothctl.

used ./hcitool con to get the connection handle.

Connections:
< LE 98:07:2D:12:57:20 handle 0 state 1 lm MASTER AUTH ENCRYPT

then,

./hcitool ./hcitool cmd 05 00005 00 00

< HCI Command: Read RSSI (0x05|0x0005) plen 2 #263 [hci0] 190.169593
Handle: 0
> HCI Event: Command Complete (0x0e) plen 7 #264 [hci0] 190.172417
Read RSSI (0x05|0x0005) ncmd 1
Status: Command Disallowed (0x0c)
Handle: 0
RSSI: 72 dBm (0x48)

it always gives constatnt 72 dBm with the Status: Command Disallowed (0x0c).

BT_CTLR_CONN_RSSI_SUPPORT

BT_CTLR_CONN_RSSI

are both set as well.

What might be the reason for this behavior?

Cheers.

Related