HC-05 蓝牙 RSSI 不适用于 Arduino [英] HC-05 bluetooth RSSI not working with Arduino
问题描述
我的 HC-05 蓝牙模块无法输出 RSSI 值.我连续发出以下命令:
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*
INQ 命令后,模块开始快速闪烁.我认为这意味着它已退出 AT 命令模式,并且我对 INQ 请求没有响应.我必须在 INQM 之前发出 INIT 命令?否则它会返回一个错误(16).
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).
我什至尝试过购买不同品牌的 HC-05,但这没有帮助.
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:为了了解更多信息,我还有一个 AT+VERSION?命令在那里,并且对版本的响应很好.唯一不起作用的是 AT+INQ...这是我启动串行监视器时的输出:
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:模块开始闪烁后,我仍然可以与它通话:AT+状态"-> +状态:查询中但是如何从模块中获取对 INQ 命令的响应?
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?
推荐答案
尝试
at+inq\r\n
根据 this,第 17 页
HC-05 的流程应该是:
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
这篇关于HC-05 蓝牙 RSSI 不适用于 Arduino的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!