Overview
HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol)
module, designed for transparent wireless serial connection setup.
Serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR
(Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio
transceiver and baseband. It uses CSR Bluecore 04-External single
chip Bluetooth system with CMOS technology and with AFH(Adaptive
Frequency Hopping Feature). It has the footprint as small as
12.7mmx27mm. Hope it will simplify your overall design/development
cycle.
Go shopping Serial Port Bluetooth Module (Master/Slave):HC-05
(IM120723009)
Specifications
Hardware Features
Typical -80dBm sensitivity
Up to +4dBm RF transmit power
Low Power 1.8V Operation ,1.8 to 3.6V I/O
PIO control
UART interface with programmable baud rate
With integrated antenna
With edge connector
Software Features
Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity,
Data control: has.
Supported baud rate:
9600,19200,38400,57600,115200,230400,460800.
Given a rising pulse in PIO0, device will be disconnected.
Status instruction port PIO1: low-disconnected, high-connected;
PIO10 and PIO11 can be connected to red and blue led separately.
When master and slave
are paired, red and blue led blinks 1time/2s in interval, while
disconnected only blue led blinks 2times/s.
Auto-connect to the last device on power as default.
Permit pairing device to connect as default.
Auto-pairing PINCODE:”0000” as default
Auto-reconnect in 30 min when disconnected as a result of beyond
the range of connection.
Hardware
PIN
PIN # PAD Type Description Note
Name
GND 13,21,22 VSS Ground Pot
Integrated 3.3V(+) supply with
3.3
12 3.3V On-chip linear regulator output
VCC
within 3.15-3.3V
AIO0 9 Bi-directional Programmable input/output line
AIO1 10 Bi-directional Programmable input/output line
Bi-directional Programmable input/output line,
AIO0 23
RX EN control output for LNA (if fitted)
Bi-directional Programmable input/output line,
AIO1 24
TX EN control output for PA (if fitted)
PIN
PIN # PAD Type Description Note
Name
PIO2 25 Bi-directional Programmable input/output line
PIO3 26 Bi-directional Programmable input/output line
PIO4 27 Bi-directional Programmable input/output line
PIO5 28 Bi-directional Programmable input/output line
PIO6 29 Bi-directional Programmable input/output line
PIO7 30 Bi-directional Programmable input/output line
PIO8 31 Bi-directional Programmable input/output line
PIO9 32 Bi-directional Programmable input/output line
PIO10 33 Bi-directional Programmable input/output line
PIO11 34 Bi-directional Programmable input/output line
PIN
PIN Name PAD Type Description Note
#
CMOS input with Reset of low.input
RESETB 11 weak internal pull- debouncde so must be low
up for >5MS to cause a reset
CMOS output, tri-
UART request to send,
UART_RTS 4 stable with weak
active low
internal pull-up
CMOS input with
UART clear to send, active
UART_CTS 3 weak internal pull-
low
down
CMOS input with
UART_RX 2 weak internal pull- UART Data input
down
CMOS output, tri-
UART_TX 1 stable with weak UART Data output
internal pull-up
CMOS input with
Serial peripheral interface
SPI_MOSI 17 weak internal pull-
data input
down
PIN
PIN Name PAD Type Description Note
#
CMOS input with Chip select for serial
SPI_CSB 16 weak internal pull- peripheral interface,
up active low
CMOS input with
Serial peripheral
SPI_CLK 19 weak internal pull-
interface clock
down
CMOS input with
Serial peripheral
SPI_MISO 18 weak internal pull-
interface data output
down
USB_- 15 Bi-directional
USB_+ 20 Bi-directional
NC 14
Synchronous PCM data
PCM_CLK 5 Bi-directional
clock
Synchronous PCM data
PCM_OUT 6 CMOS output
output
Synchronous PCM data
PCM_IN 7 CMOS input
input
PCM_SYN Synchronous PCM data
8 Bi-directional
C strobe
AT command Default
How to set the mode to server (master):
1. Connect PIO11 to high level.
2. Power on, module into command state.
3. Using baud rate 38400, sent the “AT+ROLE=1\r\n” to module, with
“OK\r\n” means setting successes.
4. Connect the PIO11 to low level, repower the module, the module
work as server (master).
AT commands: (all end with \r\n)
1. Test command:
Command Respond Parameter
AT OK -
2. Reset
Respon
Command Parameter
d
AT+RESET OK -
3. Get firmware version
Command Respond Parameter
AT+VERSION? +VERSION:<Param> OK Param : firmware version
Example:
AT+VERSION?\r\n
+VERSION:2.0-20100601
OK
4. Restore default
Command Respond Parameter
AT+ORGL OK -
Default state:
Slave mode, pin code :1234, device name: H-C-2010-06-01 ,Baud
38400bits/s.
5. Get module address
Command Respond Parameter
AT+ADDR +ADDR:<Param> Param: address of Bluetooth
? OK module
Bluetooth address: NAP: UAP : LAP
Example:
AT+ADDR?\r\n
+ADDR:1234:56:abcdef
OK
6. Set/Check module name:
Command Respond Parameter
Param: Bluetooth module
AT+NAME=<Param> OK
name (Default :HC-05)
AT+NAME? +NAME:<Param> OK Param: Bluetooth module
(/FAIL) name (Default :HC-05)
Example:
AT+NAME=HC-05\r\n set the module name to HC-05
OK
AT+NAME=ITeadStudio\r\n
OK
AT+NAME?\r\n
+NAME: ITeadStudio
OK
7. Get the Bluetooth device name:
Command Respond Parameter
Param1,Param 2 : the
AT+RNAME? 1. +NAME:<Param2>
address of Bluetooth
<Param1> OK 2. FAIL
device
Example: (Device address 00:02:72:od:22:24,name:ITead)
AT+RNAME? 0002,72,od2224\r\n
+RNAME:ITead
OK
8. Set/Check module mode:
Command Respond Parameter
Param: 0- Slave 1-Master
AT+ROLE=<Param> OK
2-Slave-Loop
+ROLE:<Param> Param: 0- Slave 1-Master
AT+ ROLE?
OK 2-Slave-Loop
9. Set/Check device class
Command Respond Parameter
AT+CLASS=<Param Param: Device
OK
> Class
1. +CLASS:<Param> OK 2. Param: Device
AT+ CLASS?
FAIL Class
10. Set/Check GIAC (General Inquire Access Code)
Command Respond Parameter
Param: GIAC (Default :
AT+IAC=<Param> 1.OK 2. FAIL
9e8b33)
AT+IAC +IAC:<Param> Param: GIAC (Default :
OK 9e8b33)
Example:
AT+IAC=9e8b3f\r\n
OK
AT+IAC?\r\n
+IAC: 9e8b3f
OK
11. Set/Check -- Query access patterns
Command Respond Parameter
Param: 0——
inquiry_mode_stand
ard 1——
inquiry_mode_rssi
AT+INQM=<Param>,<Para Param2: Maximum
1.OK 2. FAIL
m2>, <Param3> number of Bluetooth
devices to respond
to Param3: Timeout
(1-48 : 1.28s to
61.44s)
AT+ INQM? +INQM : Param: 0——
<Param>,<Param inquiry_mode_stand
ard 1——
inquiry_mode_rssi
Param2: Maximum
number of Bluetooth
2>, <Param3> OK
devices to respond
to Param3: Timeout
(1-48 : 1.28s to
61.44s)
Example:
AT+INQM=1,9,48\r\n
OK
AT+INQM\r\n
+INQM:1, 9, 48
OK
12. Set/Check PIN code:
Command Respond Parameter
Param: PIN code (Default
AT+PSWD=<Param> OK
1234)
+ PSWD :<Param> Param: PIN code (Default
AT+ PSWD?
OK 1234)
13. Set/Check serial parameter:
Paramet
Command Respond
er
Param1:
Baud
AT+UART=<Param>,<Param2>,< Param2:
OK
Param3> Stop bit
Param3:
Parity
Param1:
Baud
+UART=<Param>,<Par Param2:
AT+UART?
am2>, <Param3> OK Stop bit
Param3:
Parity
Example:
AT+UART=115200,1,2,\r\n
OK
AT+UART?
+UART:115200,1,2
OK
14. Set/Check connect mode:
Command Respond Parameter
Param: 0 - connect fixed
AT+CMODE=<Param> OK address 1 - connect any
address 2 - slave-Loop
+ Param: 0 - connect fixed
AT+ CMODE? CMODE:<Param> address 1 - connect any
OK address 2 - slave-Loop
15. Set/Check fixed address:
Command Respond Parameter
Param: Fixed address (Default
AT+BIND=<Param> OK
00:00:00:00:00:00)
+ BIND:<Param> Param: Fixed address (Default
AT+ BIND?
OK 00:00:00:00:00:00)
Example:
AT+BIND=1234,56,abcdef\r\n
OK
AT+BIND?\r\n
+BIND:1234:56:abcdef
OK
16. Set/Check LED I/O
Paramet
Command Respond
er
Param1:
0- PIO8
low drive
LED 1-
PIO8 high
drive
AT+POLAR=<Param1,<Para
OK
m2> LED
Param2:
0- PIO9
low drive
LED 1-
PIO9 high
drive LED
AT+ POLAR? + Param1:
POLAR=<Param1>,<Param 0- PIO8
2> OK low drive
LED 1-
PIO8 high
drive LED
Param2:
0- PIO9
low drive
LED 1-
PIO9 high
drive LED
17. Set PIO output
Command Respond Parameter
Param1: PIO number
AT+PIO=<Param1>,<Param2
OK Param2: PIO level 0- low 1-
>
high
Example:
1. PIO10 output high level
AT+PI0=10,1\r\n
OK
18. Set/Check – scan parameter
Para
Command Respond
meter
AT+IPSCAN=<Param1>,<Para OK Para
m2>,<Param3>,<Param4> m1:
Query
time
interv
al
Para
m2 :
Query
durati
on
Para
m3 :
Pagin
g
interv
al
Para
m4 :
Call
durati
on
AT+IPSCAN? +IPSCAN:<Param1>,<Param Para
2>,<Param3>,<Param4> OK m1:
Query
time
interv
al
Para
m2 :
Query
durati
on
Para
m3 :
Pagin
g
interv
al
Para
m4 :
Call
durati
on
Example:
AT+IPSCAN =1234,500,1200,250\r\n
OK
AT+IPSCAN?
+IPSCAN:1234,500,1200,250
19. Set/Check – SHIFF parameter
Para
Command Respond
meter
AT+SNIFF=<Param1>,<Param OK Para
m1:
Max
time
Para
m2:
Min
time
2>,<Param3>,<Param4> Para
m3:
Retry
time
Para
m4:
Time
out
AT+ SNIFF? +SNIFF:<Param1>,<Param2> Para
,<Param3>,<Param4> OK m1:
Max
time
Para
m2:
Min
time
Para
m3:
Retry
time
Para
m4:
Time
out
20. Set/Check security mode
Command Respond Parameter
AT+SENM=<Param1>,<Par 1. OK 2. FAIL Param1:
am2>
0——
sec_mode0+off
1——
sec_mode1+
non_secure
2——
sec_mode2_
service
3——
sec_mode3_l
ink
4——
sec_mode_u
nknown
Param2:
0——
hci_enc_mod
e_off
1——
hci_enc_mod
e_pt_to_pt
2——
hci_enc_mod
e_pt_to_pt_an
d_b cast
AT+ SENM? + Param1:
SENM:<Param1>,<Para 0——
m2> OK sec_mode0+off
1——
sec_mode1+
non_secure
2——
sec_mode2_
service
3——
sec_mode3_l
ink
4——
sec_mode_u
nknown
Param2:
0——
hci_enc_mod
e_off
1——
hci_enc_mod
e_pt_to_pt
2——
hci_enc_mod
e_pt_to_pt_an
d_b cast
21. Delete Authenticated Device
Command Respond Parameter
AT+PMSAD=<Param Param: Authenticated Device
OK
> Address
Example:
AT+PMSAD =1234,56,abcdef\r\n
OK
22. Delete All Authenticated Device
Respon
Command Parameter
d
AT+ RMAAD OK -
23. Search Authenticated Device
Command Respond Parameter
1. OK 2.
AT+FSAD=<Param> Param: Device address
FAIL
24. Get Authenticated Device Count
Command Respond Parameter
AT+ADCN? +ADCN:<Param> OK Param: Device Count
25. Most Recently Used Authenticated Device
Command Respond Parameter
AT+MRAD + MRAD:<Param> Param: Recently Authenticated
? OK Device Address
26. Get the module working state
Command Respond Parameter
Param: "INITIALIZED" "READY" "PAIRABLE"
+ STATE:
AT+ "PAIRED" "INQUIRING" "CONNECTING"
<Param>
STATE? "CONNECTED""DISCONNECTED"
OK
"NUKNOW"
27. Initialize the SPP profile lib
Command Respond Parameter
1. OK 2.
AT+INIT -
FAIL
28. Inquiry Bluetooth Device
Command Respond Parameter
+INQ: <Param1>, Param1:Address Param2 :
AT+INQ <Param2>, <Param3> Device Class Param3 : RSSI
…. OK Signal strength
Example:
AT+INIT\r\n
OK
AT+IAC=9e8b33\r\n
OK
AT+CLASS=0\r\n
AT+INQM=1,9,48\r\n
At+INQ\r\n
+INQ:2:72:D2224,3E0104,FFBC
+INQ:1234:56:0,1F1F,FFC1
+INQ:1234:56:0,1F1F,FFC0
+INQ:1234:56:0,1F1F,FFC1
+INQ:2:72:D2224,3F0104,FFAD
+INQ:1234:56:0,1F1F,FFBE
+INQ:1234:56:0,1F1F,FFC2
+INQ:1234:56:0,1F1F,FFBE
+INQ:2:72:D2224,3F0104,FFBC
OK
29. Cancel Inquiring Bluetooth Device
Command Respond Parameter
AT+ INQC OK -
30. Equipment Matching
Command Respond Parameter
AT+PAIR=<Param1>,<Param2> 1. OK 2. Param1 :Device
FAIL Address Param2:Time
out
31. Connect Device
Command Respond Parameter
1. OK 2.
AT+LINK=<Param> Param : Device Address
FAIL
Example:
AT+FSAD=1234,56,abcdef\r\n
OK
AT+LINK=1234,56,abcdef\r\n
OK
32. Disconnect
Command Respond Parameter
1. +DISC:SUCCESS OK 2.
Param :
+DISC:LINK_LOSS OK 3. +DISC:NO_SLC
AT+DISC Device
OK 4. +DISC:TIMEOUT OK 5.
Address
+DISC:ERROR OK
33. Energy-saving mode
Command Respond Parameter
AT+ENSNIFF=<Param> OK Param : Device Address
34. Exerts Energy-saving mode
Command Respond Parameter
AT+ EXSNIFF
OK Param : Device Address
=<Param>