首页 文章

HM-10返回欧元符号

提问于
浏览
0

我正在使用HM-10复制CC4A-1模块 . 在经过多次连接后,我将它与Arduino Uno R3连接起来 . 我使用Arduino串行监视器执行了一些AT命令突然在执行AT RENEW命令后停止工作 . 我也尝试过AT BAUD command but it returned error before executing AT+RENEW.
This is the output of Arduino Serial Monitor while sending data from HMBLE Terminal Android Application

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(2, 3); //RX|TX


void setup(){
  Serial.begin(9600);
  BTSerial.begin(9600); // default baud rate
  while(!Serial); //if it is an Arduino Micro
  Serial.println("AT commands: ");
}

void loop(){
  //read from the HM-10 and print in the Serial
  if(BTSerial.available())
    Serial.write(BTSerial.read());

  //read from the Serial and print to the HM-10
  if(Serial.available())
    BTSerial.write(Serial.read());
}

This is what is sent from Android Application

2 回答

  • 0

    经过google搜索后我终于找到了解决方案...我正在研究ESP8266模块,我也试图改变它的波特率并且它停止工作我googled命令我最后执行并发现错误的命令损坏模块固件我搜索并通过重新加载固件来恢复ESP8266

    上面的工作作为我的暗示我用我的HM-10模块做了同样的事情,并使用下面的链接上传了orignal HM-10模块固件,最后它的工作就像一个魅力真的很兴奋再次继续我的项目任何人面临同样的问题给下面的链接一试

    https://forum.arduino.cc/index.php?topic=393655.0

  • 0

    看一下串行输出,我猜想每当你发送“AT RENEW”命令时,波特率都没有改变 . 我怀疑这是因为查看“€”的二进制等价物,即“10000000” . UART数据被发送为低电平有效,因此它看起来正在检测一个字节的开始,但是,其余高低电平信号的时序是错误的 . 我会尝试以AT RENEW命令之前设置的波特率连接模块 .

    官方的HM-10行为是模块应该返回到9600的波特率 . 但是,我偶尔注意到它需要通过关闭然后打开来重置 . 或者,发送“AT RESET” .

    话虽如此,如果它是一个HM-10克隆,谁知道固件中真正发生了什么 .

相关问题