RSSI value on nRF Connect app DIFFERENT to RSSI value from read_conn_rssi function from Bluetooth sample app: HCI Power Control

Hi,

I am developing the nRF52833 DK with NCS v2.00.

I am using a function in my source code that reads the current RSSI of the connection. The function, read_conn_rssi (attached below), is taken from the Bluetooth sample, Bluetooth: HCI Power Control. I am printing the RSSI (using printk) on the nRF terminal. I am also connecting the SoC to my Android phone and reading the remote RSSI using the macros provided on the app. The RSSI on the application is always different to the RSSI that is read from the read_conn_rssi function. The RSSI on the nRF Connect app is always about ~15-20 dBm weaker than that read by the read_conn_rssi function.

Any idea why this may be? Perhaps someone could please repeat this experiment and see if there is also a discrepancy in RSSI readings?

Thanks very much,

Adam

static void read_conn_rssi(uint16_t handle, int8_t *rssi)
{
	struct net_buf *buf, *rsp = NULL;
	struct bt_hci_cp_read_rssi *cp;
	struct bt_hci_rp_read_rssi *rp;

	int err;

	buf = bt_hci_cmd_create(BT_HCI_OP_READ_RSSI, sizeof(*cp));
	if (!buf) {
		printk("Unable to allocate command buffer\n");
		return;
	}

	cp = net_buf_add(buf, sizeof(*cp));
	cp->handle = sys_cpu_to_le16(handle);

	err = bt_hci_cmd_send_sync(BT_HCI_OP_READ_RSSI, buf, &rsp);
	if (err) {
		uint8_t reason = rsp ?
			((struct bt_hci_rp_read_rssi *)rsp->data)->status : 0;
		printk("Read RSSI err: %d reason 0x%02x\n", err, reason);
		return;
	}

	rp = (void *)rsp->data;
	*rssi = rp->rssi;

	net_buf_unref(rsp);
}

Parents
  • Hi Adam! 

    This is actually expected behavior.

    RSSI (Received Signal Strength Indicator) is a term used to measure the relative quality of a received signal to a client device. The RSSI  will vary depending on a lot of factors. 

    In your case, there will most likely be variations to RSSI due to different radios (on the phone and the nRF), they will have different antennas, sensitivity etc. that will affect the RSSI.

    Br 
    Joakim

  • Thanks Joakim,

    I know that the macros calculate the RSSI of a signal received by the android device. Are you saying that the above function (which is in the peripheral source code) calculates the RSSI of a received signal by the peripheral?

    If so, is there any way to send the RSSI of Central device to the peripheral? 

    Is there possibly an algorithm that relates these two different RSSI values?

    Thanks,

    Adam 

  • Hi. 

    Sorry, maybe I didn't explain well enough in my last post. 

    The RSSI is an indication of the signal strength. RSSI is very sensitive to external factors as well as the RF design of your device. 
    You will most likely see different values for the RSSI on the phone and on the nRF device due to the design differences, different antennas, sensitivity etc. 

    Please let me know if I am misunderstanding something here. 

    Br, 
    Joakim

Reply
  • Hi. 

    Sorry, maybe I didn't explain well enough in my last post. 

    The RSSI is an indication of the signal strength. RSSI is very sensitive to external factors as well as the RF design of your device. 
    You will most likely see different values for the RSSI on the phone and on the nRF device due to the design differences, different antennas, sensitivity etc. 

    Please let me know if I am misunderstanding something here. 

    Br, 
    Joakim

Children
Related