Posts

Showing posts with the label AT

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 : ...

Arduino HC-05(ZS-40) AT Commands

Image
The Bluetooth Module HC-05 can be act as Master and Slave. By default it is a master . It can also be configured to have different baud rates:9600, 19200,38400 etc. By default the baud rate is 38400. If you want to modify these settings. It can be acheived by sending AT Commands to the HC-05 Module. In order to send AT commands , you have to connect HC-05 Module to an USB-to-TTY module. If you dont have that like me and have an arduino board then you can use it for sending AT Commands. In order to achieve this, Open Arduino IDE Upload an empty sketch to the Arduino void setup() { } void loop() { } Connections: 1. Connect RX pin of Arduino to RX pin of HC-05(Not the other way:RX to TX) 2. Connect TX Pin of Arduino to TX pin of HC-05 . Don't connect power then before this, you have to switch HC-05 Module to AT Mode. It can be achieved in two modes: 1.One is to hold the switch and then apply the power to it, i.e. connecting VCC of Arduino to HC-05 VCC an...