Saturday, August 27, 2016
AT Command mode of HC 05
AT Command mode of HC 05
HC-05 Bluetooth Module support both Master and Slave roles. We can set it in AT Command mode. There are a number of variant of HC-05, and different ways to enter AT Command mode. For my samples, there is a button on the lower-right, above EN pin. Its used to enter AT Command mode when power-on.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuqGCGLvrNYOp0YMiWkQCGJ2G3pVzOVcXYtKgF6LN40XyzoBkRQYCa1gKw7DFy9efwV3WpLLmhRy0Bc-1S8kPZX9cSNImQ6BH-Qd1ypIbRzwrVUM0C_GLNrpuOJfvsUUDheTQCUQ229Hk/s640/HC-05_02.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq64nZg4k9XPDGYToqe0RaIq8ZPe46UarN8DbQx3PByaDVL6uEXdgdzYd063_OntEG9ZAKLhXh8GK_k86nLx7gT7VSkdub6buDEm88KTKa9W_V7NzcgRMpQkaVhr7bb7vEti7me-LPk8A/s640/FTDI_HC-05.png)
This video show how to connect PC to HC-05, via FTDI USB-to-Serial adapter, power-on HC-05 in AT Command mode, and enter AT Command using Arduino Serial Monitor to check setting of HC-05.
Please notice both FTDI USB-to-Serial adapter and HC-05 have to work on the same voltage, both 3.3V or both 5V.
- Connect FTDI and HC-05
FTDI Tx - HC-05 Rx
FTDI Rx - HC-05 Tx
FTDI GND - HC-05 GND
(no power apply to HC-05 now)
- Connect FTDI to PC using USB cable.
- You can check the COM port connect to FTDI in Deviec Manager.
- Start Arduino IDE, and run Tools > Serial Monitor.
- Set baud rate 38400 and select "both NL & CR".
- Press the on-board button of HC-05.
- Apply power to HC-05.
- The on-board LED of HC-05 will blink slowly.
- Now its in AT Command mode.
- You can type AT command in Arduino Serial Monitor to check or set the setting of HC-05.
Some useful command:
AT : return OK if connect correctly.
AT+NAME : get/set name of the device. Nothing return in my sample.
AT+ADDR : display default address
AT+VERSION : display firmware version
AT+UART : get/set serial communication setting; such as baud, number of stop bit, and parity.
AT+ROLE: get/see role of bt module(1=master/0=slave)
AT+RESET : Reset and exit AT mode
AT+ORGL : Restore factory settings
AT+PSWD: get/set default PIN
reference:
- iteadstudio: Serial Port Bluetooth Module (Master/Slave) : HC-05
- HC-03/05 Embedded Bluetooth Serial Communication Module
AT command set