HC-05 Bluetooth AT+INQ command not working

arduinoat commandsbluetooth

I have followed the directions from the site below for bluetooth comm between an Arduino board using the HC-05 and an smartphone. It works fine.

The problem is that I need to measure the RSSI from my phone and using the command AT+INQ the response from the HC-05 is "OK" and nothing else.

I paired both devices using my phone as master and the HC-05 as slave, and when I am sending commands to the HC-05 through the Arduino, the pin KEY from the HC-05 is set to high (3.3V).

Do you have any suggestion to solve the problem I am facing?

Best Answer

You have to set the module in MASTER mode to determine RSSI values. So the ideal method would be as follows:

AT+INIT
AT+CMODE=1
AT+ROLE=1
AT+IAC?
AT+INQM?
AT+INQ
AT+INQC

AT+INIT will initialize SPP,after which making CMODE=1 enables all devices to connect and then you set the module in MASTER mode(by default it is in SLAVE mode, and hence you will not be able to determine RSSI). After this the procedure is almost same as you have mentioned.

Cheers!