Don't just try it, do it. The HC-06 must be configured @ 9600, irrespective of the baud rate it is configured to. I believe the problem with configuration is to do with timing, carriage returns etc., and it is best to do the whole job automatically.
This is the code I use. If you don't use a Mega, you can adapt it by replacing Serial1 with software serial.
/*
This is for MEGA
HC-06 only responds to 9600 internally. Even if you set the baud rate to 115200, you don’t need to know that, and you can reprogramme the module again with 9600.
JY-MCU board pins
RXÂ Â - 18Â Tx1Â Â orange
TXÂ Â - 19Â Rx1Â Â white
GNDÂ - GNDÂ Â Â Â black
VCC - 5v      red
Kudos to marguskohv - he sowed the seed....
Serial monitor is just aide memoire
*/
String command = ""; // Stores response from HC-06
void setup() {
 // put your setup code here, to run once:
 Serial.begin(9600);   //monitor
 Serial1.begin(9600);   //bluetooth
 Serial.println("AT");Â
 Serial1.print("AT");         //PING
 if (Serial1.available()) {
  while(Serial1.available()) { // While there is more to be read, keep reading.
  delay(3);
  char c = Serial1.read();
   command += c; Â
  }
 }
 delay(2000);
 Serial.println(command);
 command = ""; // No repeats
 Serial.println("AT+NAMEFosters");
 Serial1.print("AT+NAMEFosters");    //CHANGE NAME
 if (Serial1.available()) {
  while(Serial1.available()) { // While there is more to be read, keep reading.
    delay(3);
   command += (char)Serial1.read();Â
  }
 }
 delay(2000);
 Serial.println(command);
 command = ""; // No repeats
 Serial.println("AT+PIN1234");
 Serial1.print("AT+PIN1234");    //CHANGE PASSWORD
 if (Serial1.available()) {
  while(Serial1.available()) { // While there is more to be read, keep reading.
    delay(3);
   command += (char)Serial1.read();Â
  }
 }
 delay(2000);Â
 Serial.println(command);
 command = ""; // No repeats
 Serial.println("AT+BAUD8");Â
 Serial1.print("AT+BAUD8");       //CHANGE SPEED TO 115K
 if (Serial1.available()) {
  while(Serial1.available()) { // While there is more to be read, keep reading.
   command += (char)Serial1.read(); Â
   delay(2000);
   Serial.println(command);
  }
 }
}
void loop(){
}Â //one-shot - nothing here
It also depends on which HC-06 you have.
Some require commands to be upper case, some require lower case, some don't care.
Some require nl &cr characters to be appended to the command, others don't.
Most are shipped with 9600 bps but this speed is not guaranteed.
Also, double check the connections, even if you think they are correct.
For further help you need to say what exact model you have and if it has a blue LED on the daughter board or not.
I also have the same problem with my HC-06 module, I'm trying to configure it through AT commands but I receive no response from the module. I also tried uploading the sketch posted by Nick_Pyner and the same thing I have no response.
Can anybody give me some tips how to configure it?
Thanks in advance.
Hi,
I'm not.using a Mega but I'm using softwareserial for the Serial1. About the connections in TX and rx they are right, I also tried to change it and do the same so the connections I think is not the problem.