Yeni: Yapay zekâ güvenlik duvarı tüm platformu izliyor ve her olayı sade bir dille açıklıyor. Nasıl çalıştığını görün

HC-05 answers ERROR:(0) to every AT command except plain AT

HC-05 answers ERROR:(0) to every AT command except plain AT

Çözüldü 4 4

Quick one, embarrassing probably. I’m using an HC-05 as a serial bridge so a lab balance can send weights to a gateway that forwards them to Hermetry. I want to rename the module and set its baud to 9600.

Holding the button at power-up, LED blinks slowly every 2 s, so it’s in AT mode. I’m sending from an Uno sketch that passes the Serial Monitor through to the HC-05 at 38400. “AT” gives “OK”. Everything else:

AT+NAME=BAL-07
ERROR:(0)
AT+UART=9600,0,0
ERROR:(0)
♥ 0

Maybe the baud rate is wrong? Try 9600 in the sketch.

Measure twice, poll once.
♥ 1

Same thing happened to me with one from a starter kit, following.

♥ 0

The baud is right, otherwise plain AT wouldn’t answer OK either. ERROR:(0) is the HC-05’s code for a command it couldn’t parse, and with this module that almost always means the line ending. It wants every command to end with CR+LF. If the Serial Monitor is on “No line ending” or “Newline” only, the short “AT” sometimes gets through and the longer commands don’t.

Set the monitor to “Both NL & CR”. Also type the commands in capitals, and on some firmware versions AT+NAME only works while the KEY/EN pin is held high the whole time, not only at power-up. If NAME still fails, tie KEY to 3.3 V with a wire while you send it.

AT+UART=9600,0,0 then sets the data mode baud. AT mode stays at 38400 regardless.

Kabul edilen çözüm♥ 9

Monitor was on “Newline”. Both NL & CR and NAME and UART went through at once. Kevin, the baud was fine, AT mode is always 38400 on these.

♥ 0
5 yazı görüntüleniyor – 1 ile 5 arası (toplam 5)
  • Bu konuyu yanıtlamak için giriş yapmış olmalısınız.

Sohbete katılın

Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

Paylaş