Arduino AT not working (Arduino UNO and HC-06)
Use a macro like this to send AT commands:
 #include &lt;SoftwareSerial.h&gt;

 SoftwareSerial btSerial(2, 3); // RX, TX
 /*
  * Connect pin 2 Arduino to pin TX HC-06 
  * Connect pin 3 Arduino to pin RX HC-06
  */
 void setup() {

 Serial.begin(9600);

 Serial.println(&quot;Enter AT commands:&quot;);

 btSerial.begin(9600);

 }

 void loop()

 {

 if (btSerial.available())

 Serial.write(btSerial.read());

 if (Serial.available())

 btSerial.write(Serial.read());
 delay(1000);
 //btSerial.print(&quot;AT+PIN4321&quot;);
 //btSerial.print(&quot;AT+NAMEAlibaba&quot;);
 //btSerial.print(&quot;AT+BAUD4&quot;);


 }


You may have another port set on the HC 06 instead of 9600, like I had.
If so, try this code with all the possible port numbers and changing something like the password, and everytime you run the code - go check if it worked, this way you will find in wich port number you have your module.


good luck