HC-05 not responding to At command

CaptSSure

Is your device in AT mode?

For AT Mode, you need to plug the power source while holding down the reset button on the module. The long slow blinks shows that we are in AT Command mode.

The process may be different for your exact board. Google is your friend here.

HTH

a7

Yes ... but the sender prints the same AT >>> AT must be AT >>> OK

That depends on the code that you did not post. Read the forum guidelines to see how to properly post code and some good information on making a good post.

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please post a wiring diagram. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

at command was working. It happened after entering AT+ROLE=2 ((((Slave-Loop)))) and entering AT+RESET

#include <SoftwareSerial.h>
 
SoftwareSerial Bluetooth(10,11);
 
void setup() {
  Serial.begin(38400);
Serial.println("Enter AT commands:");
  Bluetooth.begin(38400);
}
 
void loop() {
  while (Serial.available()) {
      
      Bluetooth.write(Serial.read());
  }
  while (Bluetooth.available()) {
       Serial.write(Bluetooth.read());
  }
}

The light flashes slowly. It is in AT mode. but

When I send AT, everything is the same.

Is the JY-MCU HC05 module the exact module that you have?

Did you know that the HC05 pins are not 5V tolerant? While they may work for some time you should not apply 5V to the RX pin nor the KEY/ENable pin. Wiring the module as shown could have damaged it. Recommended wiring fro a 5V Arduino and HC05 module below.

The code that you posted works well on my Uno with a HC05 module ( JY-MCU) in AT mode with the EN (KEY) pin tied to 3.3V.

You may read and carry out the following steps:

HC5-uno
Figure-1:

(1) TX line of HC05 is of 5V logic and hence can be directly connected with SRX-pin of UNO. RX line of HC05 is not 5V tolerant; the pin likes 3.3V logic. The 5V signal level of the STX pin of UNO is dropped to about 3.4V ((5V/(2.2k + 4.7k))*2.2k = 3.4V) by the voltage divider circuit of R1-R2.

(2) Practicing AT (American Telecommunication) Commands with Bluetooth

AT commands allow to set/reset various operating features of the Bluetooth Module.
(a) Make connection among BT, UNO, and PC as per Fig-1.

(b) Upload the following sketch in UNO.

#include <SoftwareSerial.h>
SoftwareSerial SUART(10, 11); // SRX = 10, STX = 11

void setup()
{
   Serial.begin(9600);
   SUART.begin(38400); //AT data transmission rate; normal operating Bd = 9600
}

void loop()
{
    if (SUART.available())
   {
       char x = SUART.read();
       Serial.print(x);
   }
   
   if (Serial.available())
   {
       char c = Serial.read();
       SUART.print(c);
   }
}

(c) Do not pair the BT with any device.
(d) Disconnect power +5V line of BT from UNO.
(e) Connect EN-pin of BT with 3.3V point of UNO.
(f) Open SM at Bd = 38400. Select NL & CR option in the Line ending tab.
(g) Hold down the micro switch of BT.
(h) Connect +5V line of BT.
(i) 2/3 Second later, release the micro switch of BT.
(j) Check that Red LED of BT blink once in about 2-sec.
(k) Focus the cursor in the InputBox of Serial Monitor.
(l) Type AT and then click on the Send Button.
(m) In my case, I see OK message on the OutputBox of Serial Monitor.
(n) Example of few AT Commands (fig-2):
ATCommnads

Tried everything and got the same result

at command was working. It happened after entering AT+ROLE=2 ((((Slave-Loop)))) and entering AT+RESET

This is a video explaining the problem

https://youtu.be/FRqSREodv8I

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.