HC-06 Troubleshooting

I am trying to change the name of my HC-06 using this tutorial
https://maker.pro/arduino/projects/how-to-change-the-bluetooth-module-name-easily-with-arduino

#include <SoftwareSerial.h>


SoftwareSerial mySerial(10, 11); // RX, TX
String command = ""; // Stores response of bluetooth device
// which simply allows \n between each
// response.

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
Serial.println("Type AT commands!");
// SoftwareSerial "com port" data rate. JY-MCU v1.03 defaults to 9600.
mySerial.begin(9600);
}

void loop()
{
// Read device output if available.
if (mySerial.available())
{

while(mySerial.available())
{ // While there is more to be read, keep reading.
command += (char)mySerial.read();
}
Serial.println(command);
command = ""; // No repeats

}

// Read user input if available.
if (Serial.available())
{
delay(10); // The DELAY!
mySerial.write(Serial.read());
}

}

I am using Arduino Pro Mini 3.3V so I didnt use divider.

It doesn't response when I try to send AT commands on serial monitor. Then when I connect it to my phone and send message, the message will be displayed to the serial monitor.

I try changing No line ending, Newline, Carriage return ,and NL and CR but nothing happens.
What is the problem?

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

My HC-06 reacts to AT commands only on startup.
See also.

Answer: There are many types of hc06, the one that have have a connection of Tx to Tx and Rx to Rx, serial monitor is directly communicating with the hc06.

No, there isn't. There is only one type of HC-06 but there are two (only) ways of programming it.
The most common way is by using the Arduino, and that commonly via software serial, which is what you claim you did, and in which case the connections are Rx-Tx and Tx - Rx.

My other hc06 have a AT command to change the password is of AT+PSWD="1234" and the one that I using now is AT+PIN1234. Also their IC has different brand and model. The code that I post will enable to communicate with the other hc06 but not the one that I am using.

Count the pins on the breakout board.

AT+PSWD is for HC-05 (6 pins)
AT+PIN is for HC-06
(usually 4 pins)

What you say may be true, but I don't think that is part of your problem.