HC-06 Bluetooth module




HC-06 is a Bluetooth TTL transceiver module, designed for serial communication using Serial Port Profile (SPP)

SPP emulates serial connection replacing wired RS-232 communication

HC-06 module has the same hardware as HC-05 module, but has firmware with limited number of AT commands

It can be used only as a slave device; i.e. can only be used to accept connections from master Bluetooth devices

HC-06 can not connect itself to slave Bluetooth devices

Default settings of HC-06 are: baud rate 9600 bps, no parity, 8 data bits, 1 stop bit, PIN code 1234

To use AT commands the Bluetooth module must not be connected wirelessly

To configure HC-06 module the following device can be used:

Android phone (1) with USB OTG support and terminal emulator, connected through USB OTG cable (2) to USB/TTL converter (3) such as FTDI, CP2102, CH340 or PL2303. TTL pins of USB/TTL converter are connected to TTL pins of Bluetooth TTL module (4). The steps for configuring Bluetooth module are as follows:

Start terminal emulator.

Click connection menu button to open USB device attach dialog.

Click dialog button to attach USB device

Click settings button to open settings menu to setup terminal emulator.

Set send end line to none.

Now you can send AT commands to Bluetooth module from terminal emulator command line

Here are AT commands supported by HC-06

AT response OK : Bluetooth module confirms connection

AT+BAUD1 response OK1200 : baud rate is set to 1200 bps

If you change Baud rate all you have to do to continue sending AT commands is to change baud rate in terminal emulator settings

AT+BAUD2 response OK2400 : baud rate is set to 2400 bps

AT+BAUD3 response OK4800 : baud rate is set to 4800 bps

AT+BAUD4 response OK9600 : baud rate is set to 9600 bps

AT+BAUD5 response OK19200 : baud rate is set to 19200 bps

AT+BAUD6 response OK38400 : baud rate is set to 38400 bps

AT+BAUD7 response OK57600 : baud rate is set to 57600 bps

AT+BAUD8 response OK115200 : baud rate is set to 115200 bps

AT+NAMExxxxx response OK setname : module name is set to xxxxx

AT+PINxxxx response OK setPIN : module PIN code is set to four digits xxxx

AT+VERSION response xxxVx.x : firmware version is x.x

If firmware version is greater than 1.5, parity can be changed. To send AT commands same parity for USB/TTL converter should be set in terminal emulator settings only once after attaching USB/TTL converter with Bluetooth module to Android device

AT+PN response OK None : parity is set to none

AT+PO response OK Odd : parity is set to odd

AT+PE response OK Even : parity is set to even