Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HC-05 bluetooth RSSI not working with Arduino

I cannot get my HC-05 bluetooth modules to output RSSI values. I issue it the following commands in series:

AT+INIT
  -> *OK*
AT+INQM=1,9,48
  -> *OK*
AT+INQ
  -> *No response, it starts flashing rapidly, indicating AT mode is no longer active*

After the INQ command, the module it starts flashing rapidly. I think this means it has exited AT command mode, and I get not response on the INQ request. I have to issue the INIT command before the INQM? as otherwise it gives back an error(16).

I have even tried purchasing a different make of the HC-05, but that did not help.

Why is this happening, and how can I solve it?

EDIT: Just for some more info, I also have an AT+VERSION? command in there, and that responds just fine with the version. The only thing that does not work is the AT+INQ... Here is the output when I start up my serial monitor:

bt2bt HC module - version a
BtSetCmdMode 1
BtReset
Set as Master
OK

+VERSION:2.0-20100601
OK

OK


OK

UPDATE: I can still talk to the module after it starts flashing: "AT+STATE" -> +STATE:INQUIRING But how can I get the responses to the INQ command out of the module?

like image 943
Houen Avatar asked Apr 22 '14 13:04

Houen


2 Answers

Try

at+inq\r\n

Accordin to this , page 17

The process for HC-05 should be:

at+init\r\n ---- Initialize the SPP profile lib( can’t repeat initialization) 
     -> OK 

at+iac=9e8b33\r\n ----Inquire Bluetooth device has an access code 
     -> OK 

at+class=0\r\n ----Inquire the Bluetooth device type 

at+inqm=1,9,48\r\n 

At+inq\r\n ----inquire the Bluetooth device around 
like image 44
kobi Avatar answered Oct 20 '22 01:10

kobi


I occurred the same problem. I found a odd thing. I press a small button in my HC-05 and power on HC-05. Then I can enter AT mode. then I can use AT command like at+class=0,at+role=1. But if I tried to type at+inq ,i cannot see any response. But....... I tried a special action. I pressed the small button in my HC-05,and "keep press" ,not to release it.and try at+inq command.... wow...it work.... I don't know why ..but maybe you can try it. some special AT+command need to press the button (pull pin 34(key) high).even if hc-05 has been in AT mode.

like image 96
user5062578 Avatar answered Oct 20 '22 00:10

user5062578