Step 1: Video for better understanding
AT Commands stands for Attention command
AT commands mode is used to change default settings of Bluetooth module..
When if there some need like to change the BT device name, device role like master or slave, Password of device BT module need to set in AT Command mode and default setting can change.
Step 2: Material required
Following items need to set HC-05 BT Module in AT Command
As this tutorial only covers the HC-05 bluetooth module so first check your BT module is HC-O5
1) Bread board
2) HC-05 Bluetooth module
3) Arduino board with cable
4) Some jumper wires
Step 3: Identify your BT module
First thing you need to do is identify your module. It can be either HC05 or HC06. Both the modules are same in functionality except the pinout. Also HC05 can act as both master and slave whereas HC06 functions only as slave. It’s hard to differentiate between the two only by seeing. One probable way would be checking the back of the breakout board. If it has “JY-MCU” written on the back, it’s probably a HC06. Mine has “ZS-040” written and it is a HC05. And the HC06 module I tested had a bluetooth sign behind with three pcb footprints To confirm the device identity, you can power up the module, search for new device on your pc or mobile, and look for HC05 or HC06 on found device list.
Step 4: If key pin is not present or not connected
Some models of the breakout board do not have the key pin, instead they have an EN (enable) pin or WAKE UP pin which may or may not be connected to any pin just like the STATE pin. In that case you’ll have to solder a wire to the 34th pin of the bt module. I soldered a male header to mine but if you can’t solder or don’t want to, then you can just hold a wire (the pointy end of a male to male jumper wire would be convenient ) while connecting the Vcc to 5volt. Once the bt module is in AT mode, you can release the wire.
In video i have cover both of then how to get them in AT command mode
Step 5: Wiring detail, sketch, document
Now time to wire your BT device with arduino
BT MODULE ARDUINO BOARD
Sketch to upload on Arduino board
PDF for AT COMMAND list
Step 6: Entering AT commands
Type “AT” (without the quotes) on the serial monitor and press enter. if “OK” appears then everything is all right and the module is ready to take command. Now you can change the name of the module, retrieve address or version or even reset to factory settings. To see the default name, type AT+NAME. The name will be prompted, by default it is HC-05 or JY_MCU or something like that. To change the name just type AT+NAME=your desired name.
Here is an important note, if the key pin is not high, i.e. not connected to Vcc while receiving AT commands(if you did not solder the wire and released it after the module entered AT mode), it will not show the default name even after giving right command. But you can still change the name by the command mentioned above. To verify if the name has really changed, search the device from your pc/mobile. The changed name will appear. To change baud rate, type AT+UART=desired baud rate. Exit by sending AT+RESET command. Most useful AT commands are AT : Ceck the connection. AT+NAME : See default name AT+ADDR : see default address AT+VERSION : See version AT+UART : See baudrate AT+ROLE: See role of bt module(1=master/0=slave) AT+RESET : Reset and exit AT mode AT+ORGL : Restore factory settings AT+PSWD: see default password More detailed AT commands are given in the pdf.