0

Hi I am trying to get RSSI value from my HC-05 bluetooth module that is in master mode. I wrote some code but it did not work. Terminal shows nothing. Can you help me get through this? My HC-05 is in AT command mode and I am trying to get RSSI caused by another HC-05 module across the room. After I get whole RSSI entry I will parse required part somehow. I read other posts about this and they will not be of help to me.

Code:

#include <SoftwareSerial.h>
//master device 2
SoftwareSerial BT(5, 6); // RX, TX
String data;

void setup() {

Serial.begin(9600);

Serial.println("Enter AT commands:");

BT.begin(38400);

}

void loop(){

BT.write("AT+INQ\n\r");
while(!BT.available()){}
data = BT.read();
Serial.print(data);

delay(5000);
}
EEguy
  • 177
  • 9
  • What do you get? What evidence do you have at this point of valid response to any AT command querries, and that the modules are even in radio communication with one another? – Chris Stratton Aug 21 '20 at 20:24
  • no they are unpaired I kind of solve the issue but I get a lot of error response from bluetooth most of AT commands that I send end up with error messages. – EEguy Aug 21 '20 at 20:35
  • Beware if EMI errors – Tony Stewart EE75 Aug 22 '20 at 00:41

0 Answers0