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.