# HC-05 Error AT Commands

**URL:** <https://forum.arduino.cc/t/hc-05-error-at-commands/1141102>\
**Category:** Networking, Protocols, and Devices\
**Created:** [June 24, 2023, 1:25am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102 "2023-06-24T01:25:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ascendingc](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ascendingc](https://forum.arduino.cc/u/ascendingc)\
**Post date:** [June 24, 2023, 1:25am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/1 "2023-06-24T01:25:31Z")

</div>

Hi All! Been trying to connect my 1 bluetooth module as slave and other as master.

Everything works great until i get to the AT Commands... AT Test command works, with an "OK" but all other commands come back with the same error.  
I been at this for 2 days now researching and trying to get it working, so im kinda lost now lol i've tried with Arduino Nano, anddd an Arduino Uno R3. Same results for both and i have tried the separate HC-05 module (I have 2)  
I'll buy you a cookie if you can help! \<3  
Light comes on for 2 seconds stays off for 2. And i've changed the pins between 8 and 9 as suggested from other tutorials i've seen

[https://imgur.com/a/mRn4yiN](https://imgur.com/a/mRn4yiN)

```arduino
#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // RX | TX
 
const long baudRate = 38400; 
char c=' ';
boolean NL = true;
 
void setup() 
{
    Serial.begin(9600);
    Serial.print("Sketch: "); Serial.println( __FILE__ );
    Serial.print("Uploaded: "); Serial.println( __DATE__ );
    Serial.println(" ");
 
    BTserial.begin(baudRate);  
    Serial.print("BTserial started at "); Serial.println(baudRate);
    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; }
    }
 
}

```

```arduino
//SERIAL MONITOR//
>AT
>AT
OK
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)

```

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [June 24, 2023, 1:33am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/2 "2023-06-24T01:33:18Z")

</div>

How sure are you that they are HC05 modules? Post photos of the front and back of the modules.

I wrote a tutorial on how I got my HC05 modules into full AT mode. The method work for all of the HC05 modules that I own (8 or 10 pieces). \>\> [Setting HC05 (ZS-040) to AT mode](https://forum.arduino.cc/t/setting-hc05-zs-040-to-at-mode/1059616)

---

<div class="post-metadata">

**Author:** ![ascendingc](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ascendingc](https://forum.arduino.cc/u/ascendingc)\
**Post date:** [June 24, 2023, 2:27am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/3 "2023-06-24T02:27:52Z")

</div>

I have the exact model you have. The ZS-040 but i'll give your tutorial a go, and see how it works

---

<div class="post-metadata">

**Author:** ![ascendingc](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ascendingc](https://forum.arduino.cc/u/ascendingc)\
**Post date:** [June 24, 2023, 3:04am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/4 "2023-06-24T03:04:14Z")

</div>

Your wonderful human 🥰 But... Im having an issue though. As you can see, my Bind doesnt match, it changed the d into an f?

```arduino
BTserial started at 38400
 
>AT
OK
>AT+CMODE?
+CMODE:0
OK
>AT+CMODE=0
OK
>AT+BIND=98da,50,021ed1
OK
>AT+BIND?
+BIND:98da:50:021ef1
OK

```

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [June 24, 2023, 6:54am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/5 "2023-06-24T06:54:44Z")

</div>

> [@ascendingc](#):
>
> Your wonderful human

Thank you.

> [@ascendingc](#):
>
> my Bind doesnt match,

I have never seen that. I have no idea what is happening, sorry.

---

<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:** [December 21, 2023, 6:54am UTC](https://forum.arduino.cc/t/hc-05-error-at-commands/1141102/6 "2023-12-21T06:54:49Z")

</div>

Closed on December 21, 2023, 6:54am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
