Go Down

Topic: Getting HC-06 back into AT-command mode? (Read 194 times) previous topic - next topic

wiseby

I've read a lot of forums the past month to solve a problem with my HC-06 BT module.

The module paires with my phone and tablet just fine, but i havn't been able to send any data because the baud is of.
Now I need to get it back into AT-mode to do the changes. How do I accomplish this? 
I successfully configured it the first time I used it (before pairing with a device).

The HC-05 has a pin to pull high to escape the data-transmission mode. But the HC-06 has not.
I have looped through all the possible baudrates with a Python script but it refuses to send me an OK.

I have also tried pulling pins high/low as any documentation guides me to do.

Have anyone else had this problem and got it to work?

Thanks in advance!

Nick_Pyner

#1
Feb 22, 2018, 01:05 am Last Edit: Feb 22, 2018, 05:35 am by Nick_Pyner
There is no "getting back" involved, tThe HC-06 is in AT mode by default, and stays that way until a device connects with it.
The module paires with my phone and tablet just fine, but i havn't been able to send any data because the baud is of.
You could always change the baud rate in your Arduino code.
I have also tried pulling pins high/low as any documentation guides me to do.
No, it doesn't.  No HC-06 documentation would guide you to pull a pin low. If you are referring to the command
Code: [Select]
pinMode(0, INPUT_PULLUP);
it is no more than a precaution to prevent Bluetooth powering Arduino, it can usually be ignored, and it has nothing to do with AT commands anyway.

There is only one baud rate to use in order to send AT commands - 9600.

wiseby

So you are saying that even if i reconfigured the BT device to baud 115200 it still only accepts AT-commands at 9600 bauds?

I have already tried connecting and configure it with baudrate 9600 without success.

I also by accident configured it with a different parity mode than default, could this cause the problem?

Nick_Pyner

So you are saying that even if i reconfigured the BT device to baud 115200 it still only accepts AT-commands at 9600 bauds?
That is correct, thereby allowing you the luxury of not needing to write down the baud rate on a piece of paper you will probably loose.
Quote
I have already tried connecting and configure it with baudrate 9600 without success
No comment - other than that 9600 is the correct rate, and your lack of success is due to something else.
Quote
I also by accident configured it with a different parity mode than default, could this cause the problem?
I assume you didn't "by accident configured it", you attempted to configure it, and failed. The different parity mode could be a problem, but I'm pretty sure you didn't do any lasting damage.

wiseby

The only thing I can say is different from the first time I configure it is that I have paired it and the LED is flashing 2 times/sec (first time I fired it up it flashed slower, perhaps 1 blink/sec).

The powerdraw of the module indicates that it's searching for pairable device.


Nick_Pyner

I think this is all nonsense. If you are seeing a slow flash, about 1 flash/ 2sec, it is probably because you are using an HC-05, which explains quite a lot, and you just think you have an HC-06 problem. Similarly, you can measure what power draw you like, but HC-06 is a slave device and doesn't search for anything.

The 2Hz flash applies to both HC-05 and HC-06, and means no more than "power on, ready to connect". 

I don't believe there is any LED signal signifying anything to do with AT commands on the HC-06. This is because it is in AT mode by default.

Similarly, the LED keeps flashing when you pair with the phone, and the only indication of a successful pair is on the phone.

You only see a change in LED when a connection is made.

Go Up