Getting RSSI values of Multiple Devices Using HC-05

I'm trying to use an HC-05 module wired to an arduino to collect the RSSI values of multiple other bluetooth devices, specifically another arduino+HC-05 pair and a Raspberry Pi 3B. I'm using a simple arduino program seen below to write AT commands to the master HC-05 through the serial monitor.

#include <SoftwareSerial.h>

SoftwareSerial Bluetooth(2,3);
void setup() {
  Serial.begin(38400);
  Bluetooth.begin(38400);
}
 
void loop() {
  while (Serial.available()) {
      delay(1);
      Bluetooth.write(Serial.read());
  }
  while (Bluetooth.available()) {
       Serial.write(Bluetooth.read());
  }
}

To collect the RSSI values I'm using the AT+INQ command, with AT+INQM=1,9,20. However I'm confused by the output I'm getting:

11:05:25.021 -> OK
11:05:53.837 -> +INQ:2816:A8:5A4B0F,2A010C,FF9C,
11:05:56.807 -> +INQ:0021:11:01A32B,1F00,FF9C,HC-05
11:06:00.777 -> +INQ:0021:11:01A32B,1F00,FF9C,HC-05
11:06:00.965 -> +INQ:2816:A8:5A4B0F,2A010C,FF9C,
11:06:05.986 -> +INQ:2816:A8:5A4B0F,2A010C,FF9C,
11:06:08.347 -> +INQ:0021:11:01A32B,1F00,FF9C,HC-05
11:06:16.275 -> +INQ:0021:11:01A32B,1F00,FF9C,HC-05
11:06:16.787 -> +INQ:2816:A8:5A4B0F,2A010C,FF9C,
11:06:20.552 -> +INQ:2816:A8:5A4B0F,2A010C,FF9C,
11:06:23.451 -> OK

So it can detect the other HC-05 device and what I assume is the raspberry pi, however as I understand the third parameter should be the RSSI value, which in this case is always FF9C for both devices.

This is strange because the two devices are different distances away from the HC-05 I'm commanding, and I was under the impression that RSSI would 1) be dependent on distance and 2) remain inconsistent even when devices are close together.

I'm curious as to what others make of this. Am I using the AT+INQ command incorrectly, misinterpreting the output, or just entirely misguided in what I'm attempting to do?

Appreciate any advice.

Once the receivers are overloaded by the RF signal, the RSSI is meaningless. Test again with the devices MUCH further apart.

Thanks, this appears to be the case. I tested it by hooking up an HC-05 to a portable power supply and walking away while the other module ran the AT+INQ command. Got the following output:

14:47:16.753 -> OK
14:47:41.376 -> +INQ:0021:11:01AA42,1F00,FFF3,HC-05
14:47:47.823 -> +INQ:0021:11:01AA42,1F00,FF9C,HC-05
14:48:09.497 -> OK

When I was walking away it read RSSI=FFF3, and when I came back it returned to RSSI=FF9C.

I have the same problem as you. I have tried your code and used HC-05 as well, but the output of RSSI is always FF9C no matter what I have done (walking away with a portable power supply also). I am really confused. Is there any suggestion to deal with it?
Appreciate any advice.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.