HC-05 stuck at baud rate of 4800

Hi,
Thanks for reading my post. I'm having difficulties with changing the settings of my HC-05; I've spent a few hours reading relevant posts here, including the comprehensive Martyn Currey guide, but none of the solutions have worked for me. I'm able to enter AT mode at 38400 baud using an Arduino Uno to communicate, and I'm getting responses. When I type "AT+UART?" it says "4800,0,0", reporting that it currently has a baud rate of 4800. I'm also able to change the HC-05 name.

I want the HC-05 to have a baud rate of 9600 for my project, for numerous unrelated reasons. However, when I enter the command "AT+UART=9600,0,0" and type "AT+UART?" it returns "9600,,,,". I saw on a post here that you have to type "AT+UART=9600,0,0\r\n", but that returned "9600,,".

After some trial and error, I typed "AT+UART=960000". Now, I don't get any responses at 38400 baud. If I change the Serial Monitor to operate at 9600 baud, I get responses again. "AT+UART?" returns "9600,0,0". Bingo, right? That's the setting I want. (Although I did find it strange that the AT mode baud rate, which should stay at 38400 even at the default 4800 baud, changes to 9600.)

Anyway, here's the real issue:
When I unplug the HC-05, power it back on, and type "AT+UART?" it returns "4800,0,0", regardless of all the approaches and results I listed above, implying that on power-up, it returns to 4800 baud.

I have access to a few HC-05's, and each of them have 4800 default baud (which is strange too since my research showed that it should be 9600), and each of them experience this same issue where they revert to "4800,0,0" on power-up.

These are the HC-05's with an EN pin and a pushbutton. I keep the EN pin high, from power-up, while in AT mode. I also read somewhere in my forum-crawling-for-answers that there's potentially a "full" AT mode, which is triggered by holding down the pushbutton at power-up time, and keeping it pressed. I tried that and got the same results.

(One last thing: I've actually been using this HC-05 with an ATmega328P that's operating at 9600, and it's been able to send and receive characters to an Android app decently. However, errors occur very frequently, which led me to check the baud rates of the ATmega328P and HC-05 and realize that they're misaligned. If I change the baud rate of the ATmega328P to 4800, they should align... But then the wrong characters are received by the Android app.)

Thank you for reading this far and I'd hugely appreciate any input anyone has! :slight_smile:

How are you determining the baud rate?

@gilshultz I'm entering HC-05's AT command mode by connecting the HC-05 to the Arduino with the following setup:

Format: Arduino -> HC-05
3V -> Vin
GND -> GND
Tx -> Tx
Rx -> Rx
3V -> EN

(I know the TX -> TX and RX -> RX seems counterintuitive, but that's what I saw on numerous tutorial articles)

Then I power-up the Arduino, enter the Arduino IDE's Serial Monitor at 38400 baud, which is the command-mode baud rate, and type "AT+UART?". The HC-05 responds with "+UART:4800,0,0" which, from what I've seen online, denotes a baud rate of 4800 and default settings for the parity bits.

Pushing the button should be enough for the commands you want. The extra commands may be accessed by applying 3.3v to the EN pin. No need to hold the button.

If an HC-05 has a default of 4800, it implies it is a fake or a dud. Having a few of them simply means you have several fakes or duds, and the fact that you cannot make a legitimate, and indeed confirmed, AT command stick when the power goes off surely confirms that.

"Decently" seems to be a relative term here, it either works error-free, or it's very indecent. While mismatched baud rate may give loose results, particularly with human interface at slower speeds, that doesn't prove anything. Much more to the point, I submit that the fact that you have matched the baud rates at 4800, and still get bad data, further confirms the Blueteeth are duds.

Being able to do anything at all with HC-05 surely confirms that your procedure and wiring are kosher.

Sorry to be so discouraging, and I don't have a solution. While there are a lot of suss HC-05s about, I believe they usually work if you just use them as they come out of the box, but I'm not sure that would have applied in your case.

Ah now, contrary to what I said, AND assuming you have HC-05 on a standard breakout board, like a ZS-040, you had better check what it says on the back of same. It normally says
Power: 3.6 - 6v
If that is what you see, why are you feeding it with 3.3v? This particularly applies if you are feeding from a Uno, which is barely up to the task. This may not be the solution to your problem, but there is no point in leading with your chin in times like these.

@Nick_Pyner Thanks a ton for all the advice. I tried the HC-05s with 5V, same exact behavior... So you're probably right that they're fakes.

Are you supposed to
AT+RESET
for the changes to stick?

@anon85221860 I tried AT+RESET after setting the baud rate to 9600, but it just reverted it back to 4800. My custom name stayed the same though.

What do you get when you request a version number?
AT+VERSION?