Posts

Showing posts with the label Bluetooth

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 (Bluetooth) Interfacing

Image
In this post we will access Arduino over Bluetooth either through ur PC or Android device. This will be useful in case when you have sensors interfaced to ur arduino board and want to send this information to ur Mobile. Things needed to do this experiment: 1. Arduino Uno 2. HC-05 Connections: 1.Connect TX of HC-05 to TX of Arduino 2.Connect RX of HC-05 to RX of Arduino 3.Connect GND of HC-05 to GND of Arduino 4.Connect VCC of HC-05 to 5V of Arduino Power up the device either by connecting USB or a battery. Now you can scan this on your PC or Android device to see whether your device is listed out. For example in Ubuntu I can run  hcitool scan and it lists out all the Bluetooth devices. Now you can see a device with name HC-05 in the list. This means your HC-05 is working properly. You can also check the same on your Android device. Now you have to pair your Ubuntu Bluetooth with HC-05. In order to achieve this: 1.Go to Bluetooth Icon, and cli...