My Solution for HC-06 AT+NAME:name - ERROR:(0)

Hello everyone.
I'm going to share my unfortunate experience with this module. It's very annoying and the commands can be different from what you see out there. But in my case, this list worked on the HC-06( HC-05_ATCommandSet.pdf).

What wasn't working for me was setting the parameters, such as NAME and PSWD...
Then I ‘discovered’ in my module that the sending order of \n and \r mattered.

My code looks like this all the time:

int32_t AT_CMD(const char *s){
	int len = 0;
	len = sprint(strBuffer,"%s\n\r",s);
...
}

After much searching, I haven't solved the problem.
I'd like to point out that all the requests work this way (AT+ RESET, NAME, UART, PSWD...).
But if I sent AT+NAME:HC000, it returned ERROR:(0)

So I decided to change the order from \n\r to \r\n and it worked.

int32_t AT_CMD(const char *s){
	int len = 0;
	len = sprint(strBuffer,"%s\r\n",s);
...
}

Seriously.... kkkk
I hope it helps someone.

No habla espanol...? You're in an english forum, try this instead

Hi @ledsyn ,

actually it is Portuguese ...

I found @rafaelcremm 's post in a different thread and used deepL to create a translation:

See https://forum.arduino.cc/t/solved-hc-05-not-responding-to-at-commands/1287949/15

much easier for most of us ...

:wink:

P.S.: I actually found reading Portuguese is much easier to understand (with some Latin, French and Spanish language knowledge) than by listening ...

1 Like

I noticed that post, thanks. Anyway, I hope Rafael understand english, or can be transferred to the Portuguese forum to get the proper response. :upside_down_face:

1 Like

Thank you very much for your help and willingness!!!
I edited the text with your translation.

I don't see any problem in posting or viewing texts in other languages.
Translators are there for that. lol

1 Like

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