HC-05 is in AT mode tried sent AT but no response afterward

Hi! I'm new here and I have a problem with Bluetooth HC-05. I tried to follow several tutorial that available on Google and YouTube.

Marty Currey is the best tutorial so far
link: HC-05 FC-114 and HC-06 FC-114. Part 2 – Basic AT commands

I need to point out that my Bluetooth already in AT command mode (it blinking every 2 sec) but every time I tried to send command as "AT" it shows no respond at all. As shown in the picture bellow

here is the code:

// Basic bluetooth test sketch. HC-0x_FC-114_01_9600
//  Uses hardware serial to talk to the host computer and software serial for communication with the bluetooth module
//
//  Pins
//  BT VCC to Arduino 5V out. 
//  BT GND to GND
//  Arduino D3 to BT RX through a voltage divider
//  Arduino D2 BT TX (no need voltage divider)
//
//  When a command is entered in the serial monitor on the computer 
//  the Arduino will relay it to the bluetooth module and display the result.
//
// The HC-0x FC-114 modules require CR and NL

#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX


char c = ' ';
boolean NL = true;

void setup() 
{
      Serial.begin(9600);
      Serial.println("Sketch HC-0x_FC-114_01_9600");
      Serial.println("Arduino with HC-0x FC-114 is ready");
      Serial.println("Make sure Both NL & CR are set");
      Serial.println("");
      
      // FC-114 default baud rate is 9600
      BTSerial.begin(9600);  
      Serial.println("BTserial started at 9600");
      Serial.println("");
      
}

void loop()
{

    // Read from the Bluetooth module and send to the Arduino Serial Monitor
    if (BTSerial.available())
    {
        c = BTSerial.read();
        Serial.write(c);
    }
    
      
  
    // Read from the Serial Monitor and send to the Bluetooth module
    if (Serial.available())
    {
        c = Serial.read();
        BTSerial.write(c);   
        
        // Echo the user input to the main window. The ">" character indicates the user entered text.
        if (NL) { Serial.print(">");  NL = false; }
        Serial.write(c);
        if (c==10) { NL = true; }
    }

}

I've been working for days and I have no clue what did I do wrong, please help me

Please read the forum guidelines to see how to post code, errors and program output. Images of code, errors and screen shots are less than ideal.

Did you put the HC05 into AT mode by holding the button while powering the HC05?

thank you, I added the code.

Yes I did it by holding the button above the En pin while connecting the vcc to 5V pin

And the LED flashes twice quickly every 2 seconds?

Can you post a photo that clearly shows your wiring?

I just saw the code. Could not read the image on my phone.

The baud rate for AT mode is 38400. You must start BTSerial at 38400.

BTSerial.begin(38400);  

9600 is the default for communication mode.

Here is the Martyn Currie page that I used to set up my HC05 modules.

it's difficult to take photo of the wiring in a good angle but I connect:

RXD to pin 2
TXD to pin 3
GND to GND pin beside the 5 V
VCC to 5V pin
I did all the wiring without voltage divider

I tried it and changed my baud rate at 38400 and it shows garbage output.

every time I set the baud rate at 38400 the serial monitor always shows garbage output

SoftwareSerial BTSerial(2, 3);

The RX of the HC05 goes to the TX (pin 3) of the Arduino.
The TX of the HC05 goes to the RX(pin 2) of the Arduino.

It works at 9600 baud rate but only with your link :Arduino with HC-05 (ZS-040) Bluetooth module – AT MODE!
thank you so much but I wonder why it shows garbage output at 38400 baud rate if the 38400 is the baud rate for AT mode?

There are 4 places baud rates in that setup. The Serial baud rate that the Arduino uses to communicate with the IDE serial monitor are 2 and the BTSerial baud rate that the Arduino uses to communicate with the HC05 are 2. Each must match its counterpart. Serial at 9600 for the Serial port and 9600 for serial monitor. 38400 for BTSerial and the (default) 38400 for HC05 AT mode. If you have 38400 for Serial and 9600 for serial monitor you can get garbage. I wonder if that was not the case, before?

I understand thank you so much!

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