当我向HM10 BLE蓝牙模块发送任何命令时,它通过蓝牙而不是处理命令的HM10模块发送命令。例如,我希望发送AT并让模块响应" OK",但它发送文本" AT"通过蓝牙连接。我试过发送没有蓝牙连接的命令,同样的事情发生了。我也试过通过蓝牙而不是连接到设备的串口发送命令,我得到同样的东西。
答案 0 :(得分:3)
When HM10 is connected to remote ble device it is in transparent mode. To put it into AT mode you need break connection or not establish it at all. For breaking connection use reset/break pins. Reset is 12 pin and Break seems to be 23 pin. It has sense to look IMME parameter of the module (page 32 of datasheet).
IMME Query/Set Module work type
1: When module is powered on, only respond the AT Command, don’t do anything. Until AT + START, AT+CON, AT+CONNL commands is received.
0: When power on, module will start work immediately Default: 0
Also be carefull with strings endings, usually string doesn't need to be terminated with any symbol at all: AT
, but some H11 need the string to end with CRLF: AT\r\n