Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 1.48 KB

File metadata and controls

56 lines (45 loc) · 1.48 KB

HC05 Bluetooth Module

In order to configure HC05 (or HC06), we use AT Commands.

Setup

  • Upload Bare Minimum Code from Arduino examples to Arduino.
  • Connect:
    • Arduino RX0 to HC05 TXD
    • Arduino TX0 to HC05 RXD
    • Arduino GND to HC05 GND
    • Arduino 5V to HC05 VCC
    • Arduino
  • Press and hold the push button on the HC-05 module (Instead can supply Arduino 5V to HC05 EN ).
  • Supply power to the module.

Checklist of parameters to set:

  • Password
  • UART parameters (baud rate, stop bit, parity)
  • Role
  • Bind address
  • CMODE value

AT Commands

  1. Make sure that both the Bluetooth modules have the same password.

    • Set with AT+PSWD
  2. Also make sure that UART parameters in each module are:

    • baud rate: 115200
    • stop bit: 1
    • parity: 0
      AT+UART=115200,1,0
  3. Set roles in each module as follows:

    • In one module, set role to 0 to make it slave: AT+ROLE=0
    • In another module, set role to 1 to make it master: AT+ROLE=1
  4. Bind the address of slave to the master.

    • Get address of slave first and note it: AT+ADDR? (e.g. 0021:09:01183A)
    • Then set the bind address in master: AT+BIND=21,9,1183A (Leading 0s can be ignored; also replace : with ,)
  5. Change the value of CMODE in both modules to 0. 'CMODE=1' means 'connect to any address'.
    AT+CMODE=1

Reference for AT commands


Home