I have two hc-05 modules that work fine with my tablet and phone. When I connect the hc-05 to my arduino and serial monitor , I cannot communicate to reset the defaults with the HC-05. I can get it to go into AT mode by using the Vcc and the button on the HC-05 but it will not return any messages via the serial monitor.
Welcome to the forum
Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE
How is the module connected to the Arduino? What Arduino are you using?
What baud rate is set for the serial monitor? What code if any are you using?
This Martyn Currie page may be of interest. Arduino with HC-05 (ZS-040) Bluetooth module – AT MODE | Martyn Currey
That does not prove the Rx/Tx wiring is correct. If you are programming with Arduino, Rx,TX and Tx,Rxp
Here is the code and wiring that I use to put my HC05s into AT mode to set them up. Note that the EN pin connects to 3.3V, NOT 5V. See the comments at the top of the program. This code and wiring has worked with every HC05 that I have tried it with.
// AT command mode for HC05 by c goulding AKA groundfungus
// connect software serial RX (Uno pin 2) to HC05 TX
// connect software serial TX (Uno pin 3) to HC05 RX through
// voltage divider (1K and 2K resistors)
// tie the EN pin to 3.3V, Make sure 3.3V, 5V will damage
// enter AT. First time may get ERROR.
// try again, should get OK.
#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // RX | TX
const long baudRate = 38400;
char c = ' ';
boolean NL = true;
void setup()
{
Serial.begin(38400);
BTserial.begin(baudRate);
Serial.print("BTserial started at ");
Serial.println(baudRate);
Serial.println("Ready for AT commands");
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;
}
}
}
Sample program output:
BTserial started at 38400
Ready for AT commandsAT
ERROR:(0)
AT
OK
AT+UART?
+UART:9600,0,0
OK
AT+ADDR?
+ADDR:98d3:91:fded9d
OK
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.