No response from HC-06

I am trying to get a response from HC-06 with Ardhuino Nano. What is working: - The Arduino Nano is functioning: a LED is controlled - I can pair the HC-06 to my Android phone - I can see with a logic analyzer the serial signal toggle on the HC-06 Rx input (both at the 5V source and after 66% lower (with 3 1K Ohm resistors)

What is not working: - I get to response from the HC-06 Tx pin, after issuing the AT command

What I am not sure of: - Are the RxD and TxD pins active low? I can see them high all the time, and the Tx from the Arduino going low when active (when AT command is issued). Is there a pull-up somewhere? - I tried to run with the Arduino Nano Rx & Tx, and then switched to two digital outputs. I think it should work. Shout it? The reason I did it is because the connectivity of Tx & Rx from the Nano somehow caused the interface to the PC, so I couldn't download code.

What I didn't try so far: - to check if the printing on the HC-06 is correct - could it be the maker made a mistake and misplaced Rx & Tx?? - to replace the HC-06. I have another one, but if I damaged the first one, I don't want to damage the second one as well....

Any idea?

Thanks!

yigalb: What is working: - I can pair the HC-06 to my Android phone

This may be the problem. If you are in communications mode, you are not in AT mode, so don't expect any response from your AT commands. You might try putting the logic analyser in the bottom drawer where it belongs and read the HC-06 data sheets instead. If your wiring is kosher, and you ensure that HC-06 is not connected to the phone, you might get a result.

  • to check if the printing on the HC-06 is correct - could it be the maker made a mistake and misplaced Rx & Tx?

Probably not. It is much more likely that you have the connections the wrong way round. Pairing the phone only proves the power is the right way round. It IS possible that there is a solder bridge across the pins. I have heard of that - once.

About pairing - the device can be paired, but it is not paired any more. I still get no result from the device. I think wiring is OK - I doubled checked it.

Pairing is done at the phone end. This is fixed irrespective of the condition or location of bluetooth. The only way it can be “not paired any more” is that you have specifically unpaired it in the bluetooth settings in the phone. If it really is not paired now, and you have not done this, I guess it was never paired in the first place. As I said, Arduino is not involved in pairing, it just provides the power. If you have another means of getting 5v to HC-06, you could use that instead.

Your problem may simply be one of procedure, or even just nomenclature, and you might find the following background notes useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

It does not address AT commands but it is better that you walk before you run, and just get it working reliably.

I will read the material - thank you.
Just to make it clear - the device can be paired.
When I wrote “not paired anymore” I meant it is not paired because I unpaired it.
So it doesn’t explain the no answer.

OK. You understand things better than I thought!

As guided, I read the data sheet first. The data sheet is not really needed, but still it was a good idea to review it. Thanks for the hint.

The child’s guide made the difference. I am at page 14 and have a working communication over the BT. Cool - that’s all I need. yet I will read the rest of the guide tomorrow. I promise.

I didn’t check yet if the “OK” is being sent as a response to the “AT” command - but since it is working, I am happy.

Now I am bothered with the inability to download SW while the BT device is connected. The arduino project should be placed in a sealed box and it will not be so easy to unplug and re-plug the BT device when new software version is avilable. I can add a a switch to disconnect the TX/RX pins (“prog mode”), but wouldn’t it be better to use D pins for the serial communication?

Yigal

yigalb: have a working communication over the BT. Cool - that's all I need. I didn't check yet if the "OK" is being sent as a response to the "AT" command - but since it is working, I am happy

Good. Getting it running, and doing something useful, is the important bit. It may even be all you ever need. It took me years to send an AT command, and even then it was misguided.

Now I am bothered with the inability to download SW while the BT device is connected

Using software serial is never a good idea - ever. The advantages of using hardware serial outweigh the disadvantages, which are better fixed by getting a Mega or something. Having said that, once you are comfortable using hardware, and getting used to disconnecting Bluetooth while programming, it won't be hard to change to using software serial if you really feel you need to. The memory loss and the speed hit you incur by doing so may not be a problem. Having a toggle switch in Bluetooth power line is a pretty good idea. I used to put a jumper in the Bluetooth 5v line on a shield. That was not such a good idea.

Nick_Pyner: The advantages of using hardware serial outweigh the disadvantages

I totally agree. It would be a shame to waste software resources while a good hardware exists.

[/quote]

Nick_Pyner: Having a toggle switch in Bluetooth power line is a pretty good idea. I used to put a jumper in the Bluetooth 5v line on a shield. That was not such a good idea.

Some devices can be damaged if the power is disconnected while their input signals are active. I guess only one of the TX/TX signals is causing the mismatch with the USB download (Is the Nano's RX signal driven by two sources?) , so perhaps it would be better to place the jumper on the logic signal. On the other hand, if the IOs of the BT chip are protected against reverse voltage, disconnecting the power would be more practical - much easier, and also causing less noises on the data signal. Did you try it? I will try getting the BT's chip data sheet to see if the IOs are protected.

yigalb: Did you try it?

LOL, no. I use Megas, and Bluetooth is on Serial2. When I used Unos, I never noticed a problem, and was never scientific about it. I just pulled Bluetooth out of the multi connector. I make no particular recommendation, I just thought a single break in the 5v line was simplest.