Naming Products description:
HC-05, is a master-slave integrated Bluetooth serial module, the
main switch from a directive, rich and complete instructions.
(Supply voltage 3.3V ~ 3.6V)
HC-06, is a master-slave integrated Bluetooth serial module, the
main switch from a directive, instruction than HC-05, easy to use.
(Supply voltage 3.3V ~ 3.6V)
HC-02, can only be used for the machine to use, (supports AT
commands modify the MAC address, support AT command to restore the
default parameters).
Host: to search from the device, other devices can not be search.
(With white spots on the module)
Slave: Used to be searched device and can not take the initiative
to search for other devices.
After connecting the master and slave is equivalent to using a
serial line, this time, regardless of master and slave, which is
transparent mode.
HC-02 Product Description
HC-02 Bluetooth serial communication module is based on digital
transmission module Bluetooth V2.0 Bluetooth protocol. Wireless
operating band for the 2.4GHz ISM, modulation is GFSK. Module
maximum transmit power 4dBm, receiver sensitivity -86dBm.
Stamp hole modules package, can patch welding, module size 26.9mm ×
13mm × 2.2mm, easily embedded within the client application
systems. (HC-02 can only be done from the machine)
AT instruction set
AT command to set the parameter module, the module in the
unconnected state can be AT command operation, after entering the
serial connection passthrough mode. Command with a carriage return
line feed (/ r / n) end.
Module startup takes about 150ms, so it is best on the module power
200ms before commencing AT instructions. Unless otherwise stated,
after the restart parameter module AT command set to take effect.
At the same time, modify the parameters and functions, power-down
is not lost.
1, test instructions
Instruction: AT (/ r / n)
Returns: OK.
2, modify the Bluetooth name of the instruction
Set command: AT + NAME = xxxxxxxxxxxxx (/ r / n)
Query command: AT + NAME = (/ r / n)?
The default name is Bluetooth module HC-02, can be set to a
different name (limit within 20 characters).
Example:
Send: AT + NAME = HCKJ (/ r / n)
Returns: OKsetNAME
Send:? AT + NAME = (/ r / n)
Returns: HCKJ
3, modify instruction pairing password
Set command: AT + PIN = xxxx (/ r / n)
Query command:? AT + PIN = (/ r / n)
Module default passcode is 1234, you can set other password (limit
four digits).
Example:
Send: AT + PIN = 0000 (/ r / n)
Returns: OKsetPIN
Send:? AT + PIN = (/ r / n)
Returns: 0000
4, modify the Bluetooth address of the instruction
Set command: AT + ADDR = xxxxxxxxxxxx (/ r / n)
Query command:? AT + ADDR = (/ r / n)
The address is 12 characters 0-F, or 16 hexadecimal characters.
Example:
Send: AT + ADDR = 1234567890AB (/ r / n)
Returns: OK
Setup is complete, you need to restart after the entry into force
of the module!
Send:? AT + ADDR = (/ r / n)
Returns: 12,34,56,78,90, AB
5, modify the baud rate command
Set command: AT + BAUD = x (/ r / n) (modifying only the baud rate)
AT + BAUD = x, y (/ r / n) (modify the baud rate and parity bit)
Query command: AT + BAUD = (/ r / n)?
Example:
Send: AT + BAUD = 19200
Returns: OK19200
Module serial port baud rate was revised to 19200bps, parity and
same as the original
Send: AT + BAUD = 4800, E
Returns: OK4800, EVEN
Module serial port baud rate is revised to 4800bps, parity
Send: AT + BAUD = 4800, O
Returns: OK4800, ODD
Module serial port baud rate is revised to 4800bps, Odd parity
Send: AT + BAUD = 4800, N
Returns: OK4800, NONE
Module serial port baud rate is revised to 4800bps, no parity
Send: AT + BAUD =?
Returns: 4800, NONE
The display module current baud rate and parity bits.
6, restore factory settings command
Command: AT + DEFAULT (/ r / n)
Returns: OKsetDEFAULT
The factory default parameters: NAME: HC-02
BAUD: 9600, N0NE
PIN: 1234
7, to see all the parameters instructions
Command: AT + RX (/ r / n)
Returns: NAME = HC-02 (Bluetooth name)
ADDR = xx, xx, xx, xx, xx, xx (12-bit address)
PIN = 1234 (PIN code)
BAUD = 9600, NONE (baud rate, parity)
8, see the software version command
Command: AT + VERSION (/ r / n)
Returns: HC-02V1.0,2014-08-22