HC-05 Bluetooth AT Commands

HC-05 works in two modes:

1. Command Mode: Where it accepts AT Commands
2. Data Mode: Where it transmits and receives data.

Default: Data Mode

Format of the Command Mode : AT+<Parameter>

In the previous post we have seen parameter field can be VERSION, STATE, UART, NAME and ROLE.

In this post we will be seeing some more commands

The commands varies based on the role(slave/master) in which it is present which can be found by typing AT+ROLE command.

HC-05 In Slave Role:

This can be set by typing AT+ROLE=0

1. AT+ADDR:Displays the MAC Address
Eg: +ADDR:2014:4:92741

2. AT+RMAAD: This will clear all the paired devices and the return of the command will be OK

3. AT+ORGL:  This will be resets to defaults and return of the command will be OK which means it is successful

HC-05 in Master Role:

This can be set by typing AT+ROLE=1

1.AT+INIT: Start serial port profile(SPP). If you get return value as 17 , it means its already loaded

2.AT+CMODE=0 : Allow connection to any address

3. AT+PSWD . Returns the pin which will be used while pairing. You can change the pin also by typing AT+PSWD=0000.

4. AT+RESET. After role is changed reset is required.

5. AT+INQM=0,5,5: Standard mode, stop searching after 5 devices are found or 5 seconds are completed

6. AT+INQ: Inquiry for the devices. This should be done after AT+INIT. Now you can see the LED starts blinking fastly





References:
1. https://arduino-info.wikispaces.com/BlueTooth-HC05-HC06-Modules-How-To

Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig