HC-05 Response OK AT commands only with PIN0,1 not with SoftwareSerial library

Hi everybody,
It's first time I write.
I need help because I try to conect an HC-05 (ZS-040) module with my UNO R3 but it's impossible.
I read a lot of forums information but I don't understand my mistake.
Connect:
Arduino HC-05 (ZS-040)
PIN0 (RX) ---> RXD
PIN1(TX) ---> TXD
3,3V ---> PIN34
and Arduino UNO has not running any Program (empty).

I can comunicate the AT commands from Serial Monitor (38400 Baudrate) and HC-05 response OK

When program Arduino UNO with SoftwareSerial library
I'm not be able to obtain OK response from Serial Monitor (9600 Baudrate) to AT Commands

Connect:
Arduino HC-05 (ZS-040)
PIN -10 (RX) ---> RXD (connected with resistant divisor 5k1 and 10k)
PIN -11(TX) ---> TXD
3,3V ---> PIN34

Attach the program:

#include <SoftwareSerial.h>
SoftwareSerial miBT(10,11);

void setup() {
miBT.begin(38400);
Serial.begin(9600);
Serial.println ("Listo");
}
void loop() {
if (miBT.available())
Serial.write(miBT.read());
if (Serial.available())
miBT.write(Serial.read());
}

Please help me to find the mistake and solve the problem.

The baud rate for AT mode on all of my HC05 Bluetooth modules is 38400, 9600 baud rate is the default for the communication mode.

When not using the blank sketch to send the AT commands you need to cross connect the module TX to the software serial RX and the module RX to the software serial TX. Cross connect unless using the blank pass through sketch.

Thanks for answer. I test with 9600 baud and changing RX and TX connection in Pin 10 and 11, but there aren’t response.

What you think what can I try?

Thanks

AT mode is 38400. Communication mode is 9600.

Thanks cattledog and groundFungus

I don't understand very well how works this module and the difference between baudrate for AT mode and communication mode.

Finaly, I test configuration the same Baud (38400) in AT mode and Serial Monitor and then, module response OK to AT commands, but I don't undestand why communicate if the config fo module is: AT+BAUD 9600,0,0

I show the program download to UNO and the Serial Monitor.
Please, can somebody send me link to learn how works this (for starters) or a simply explain to understand this?

I don't understand very well how works this module and the difference between baudrate for AT mode and communication mode.

AT and Communication mode are two different and independent modes of operation. It's like you could talk to a person in either English and Chinese for two different purposes.

AT mode baud rate is 38400. The baud rate cannot be changed by the user.

I don't undestand why communicate if the config for module is: AT+BAUD 9600,0,0

This is the baud rate for communications mode, and can be changed by the user. The Serial monitor has to match the baud rate for the mode being used.

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