1
\$\begingroup\$

I seem to see that the HC-06 device behaves like a serial device with TX/RX. I also understand that this needs to be "connected" to a blue tooth master to send/receive data. Is there a way that I can tell from the HC-06 end whether or not it has a connection to its partner?

I plan to drive the HC-06 through an Arduino.

\$\endgroup\$
0
\$\begingroup\$

There are two ways, due to the limited HC-06 AT command set and lack of hardware support (This varies by revision or carrier board, your milage may vary). I got my limited information from http://mcuoneclipse.com/2013/06/19/using-the-hc-06-bluetooth-module/

The first is by connecting to the high end of the led on the carrier board (or to pin 24). If it is blinking/switching on and off, it is not paired. If it is a steady high/solid light, you are paired to the pc.

The second is to send an AT command. For example, if you send AT when not paired, you will get back OK. If you send AT while paired, you will not get a response. You can use this to know what is happening.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you that was most helpful. The second answer troubles me though ... when it is paired, won't sending AT cause the receiver to receive those two characters? \$\endgroup\$ – Kolban Jun 12 '15 at 0:54
  • \$\begingroup\$ Yes. That's a trade off. The hc-06 firmware is very very dumb down simple. It's meant to be a transparent serial like. If you want something better go with a hc -05 \$\endgroup\$ – Passerby Jun 12 '15 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.