# HC-05 not going into AT command mode

**URL:** <https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367>\
**Category:** Networking, Protocols, and Devices\
**Created:** [March 19, 2020, 11:48pm UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367 "2020-03-19T23:48:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![commiccannon](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@commiccannon](https://forum.arduino.cc/u/commiccannon)\
**Post date:** [March 19, 2020, 11:48pm UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/1 "2020-03-19T23:48:18Z")

</div>

Recently got a HC-05 read this tutorial [Arduino with HC-05 (ZS-040) Bluetooth module – AT MODE | Martyn Currey](http://www.martyncurrey.com/arduino-with-hc-05-bluetooth-module-at-mode/) and despite hours of trying i was not able to get the module to go into AT command mode (LED was always flashing fast). The module dosnt have a button but i trye shorting the button pads with a jumper and also tried applying 3.3v to pin 34 as the tutorial recommended. Any suggestions.

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [March 20, 2020, 12:41am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/2 "2020-03-20T00:41:48Z")

</div>

It sounds like you are doing all the right things and you are in the right place to get the good oil. Note that there are some variations in commands. Check line endings and carriage returns.

---

<div class="post-metadata">

**Author:** ![commiccannon](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@commiccannon](https://forum.arduino.cc/u/commiccannon)\
**Post date:** [March 21, 2020, 7:39am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/3 "2020-03-21T07:39:27Z")

</div>

What do you mean by check line endings and carriage returns. i have both nl and cr on in the serial monitor.

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [March 21, 2020, 1:31pm UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/4 "2020-03-21T13:31:32Z")

</div>

I meant that. Now check wiring RxRx.

---

<div class="post-metadata">

**Author:** ![commiccannon](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@commiccannon](https://forum.arduino.cc/u/commiccannon)\
**Post date:** [March 23, 2020, 9:32pm UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/5 "2020-03-23T21:32:44Z")

</div>

Ok tried that way and tried putting tx -tx and rx-rx

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [March 24, 2020, 1:06am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/6 "2020-03-24T01:06:56Z")

</div>

> commiccannon:  
> and tried putting tx -tx and rx-rx

If you understand what Tx and Rx actually mean, you have probably worked out by now that that was a particularly dumb idea.

Prompted by:

1. the absence of a button, and

2. you used a jumper to pin 34 instead of simply using the EN pin  
here are two shots in the dark:

3. if your board has four pins, you have an HC-06, not an HC-05.

4. If your board has six pins, connect Bluetooth in the kosher manner, no jumpers.  
Try the following,

```arduino
/* One Shot
 Kudos to marguskohv - he sowed the seed....
Serial monitor is just aide memoire
 */
#include <SoftwareSerial.h>
SoftwareSerial Serial1(2, 3); // RX | TX
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.print("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(1000);
  Serial.println(command);
  command = ""; // No repeats
}

void loop(){
}  //one-shot - nothing here

```

Note the pins and the baud rate. Turning serial monitor on will reset the programme. If you see an OK, you have an HC-06, not an HC-05. HC-06 is in AT mode by default.

---

<div class="post-metadata">

**Author:** ![commiccannon](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@commiccannon](https://forum.arduino.cc/u/commiccannon)\
**Post date:** [March 25, 2020, 2:46am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/7 "2020-03-25T02:46:00Z")

</div>

Thanks for all your help. Tried that, still not working. Not sure what the kosher manner is and my board has 4 pins and 6 spots for pins. It did come pre-soldered so its not that i didnt put some on. and i cannot use the en pin because pin 34 is not soldered onto the board.

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [March 25, 2020, 6:14am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/8 "2020-03-25T06:14:17Z")

</div>

> commiccannon:  
> my board has 4 pins and 6 spots for pins. It did come pre-soldered so its not that i didnt put some on. and i cannot use the en pin because pin 34 is not soldered onto the board.

OK, I repeat

> Nick\_Pyner:
> 
> 1. if your board has four pins, you have an HC-06, not an HC-05.

While my HC-06 is soldered with all connections, your's not being soldered at pin 34 is quite understandable, as there is nothing there anyway.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 11:19am UTC](https://forum.arduino.cc/t/hc-05-not-going-into-at-command-mode/643367/9 "2021-05-06T11:19:35Z")

</div>


