BC04-B at Commandc
BC04-B at Commandc
BC04-B at Commandc
AT COMMANDS
Page 1 of 22
Users can through a serial interface and BC04-B chips for communication, serial
interface use Tx, Rx two root signal lines, baud rate support
1200,2400,4800,9600,14400,19200,38400,57600,115200,230400,460800 and 921600
bps. The default of baud rate is 9600 bps.
BC04-B Bluetooth serial interface module (hereinafter referred to as the module)
has two kinds of work modes: Master, Slave mode. Configure method is as follows:
PIO (4)---soft/hardware master-slave setting port: set low (or impending) for
hardware settings master-slave mode, set 3.3 V high level for software setting
master-slave mode; If choose hardware setting master-slave mode, can use the PIO (5)
to set; If choose software settings master-slave mode, can use AT commands inquires
and set (AT + ROLE).
PIO (5)---hardware master-slave setting port: 3.3 V high level setting Master
mode, grounding (or impending) setting for Slave mode.
AT COMMANDS INSTRUCTIONS
BC04-B Bluetooth serial interface module has two kinds of commands: commands
and indications. (Note this: AT commands all case, all with command carriage returns,
line feeds character end: \ r \ n).
ICommands
Command 1Testing Connection Commands
Command
AT
Answer
OK
Parameter
None
AT+VERSION
Answer
+VERSION=< Para1>
Parameter
<Para1> Firmware version,
Bluetooth version
local
HCI
number,
version,
HCI
Example
AT+VERSION\r\n
Page 2 of 22
+BOLUTEK Firmware V2.1, Bluetooth V2.1, HCI V2.1, HCI Rev37, LMP V4, LMP SubV37
AT+HELP
Answer
Parameter
Command
none
Description
---------------------------------------------------AT Check if the command terminal work
normally
AT+RESET
Software reboot
Command 4Inquires/SetName
Command
Answer
Parameter
AT+NAME
+NAME=<Para1>
AT+NAME< Para1>
1.+NAME=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed*
defaultBC04-B
*< Error_Code > for the error code, please see appendix 1
AT+DEFAULT
answer
OK
parameter
None
AT+ RESET
Answer
OK
Parameter
None
Command 7Inquires/SetPIN
Command
Answer
Parameter
AT+PIN
+PIN=<Para1>
<Para1>pin code
AT+PIN< Para1>
1.+PIN=<Para1>
OKsuccess
2.ERROR=<Error_Code>failed
default1234
Page 3 of 22
Answer
AT+BAUD
+BAUD=<Para1>
AT+BAUD< Para1>
1.+BAUD=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
Parameter
<Para1>baud rate
1---1200
2---2400
3---4800
4---9600
5---19200
6---38400
7---57600
8---115200
9---230400
A---460800
B---921600
C---1382400
default4---9600
Note: after changing the baud rate, not the default 9600, if set parameters or data
communication in the later, need to use the setting baud rate.
Answer
AT+COD
+COD=<Para1>,<Para2>
AT+COD< Para1>,<Para2>
1.+COD=<Para1>,<Para2>
OKsuccess
2.ERROR=<Error_Code>
failed
Parameter
< Para1 > :local equipment
types (length must for six
byte), its effect in slave mode
< Para2 > : filter equipment
types, its effect in master
mode, used for filtering to
equipment (if setting 000000,
its returning all search of
equipments)
The default: 001f00, 000000
In order to effectively around to many Bluetooth implementation filtering, and rapid inquiry
or be inquires the custom Bluetooth device, the user can set the standard for the module
Bluetooth device types, such as 001f00 (hex).
AT+ROLE
Answer
+ROLE=<Para1>
Parameter
<Para1>
Page 4 of 22
AT+ROLE< Para1>
1.+ROLE=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
0---slave
1---master
The default:0 slave
Note: in hardware Settings master-slave mode condition, can use AT + ROLE inquiry, set
command can't change a master-slave mode. In the software installed master-slave mode
condition, this command mode in the next set master-slave on effective when electricity.
Answer
Parameter
AT+IAC
+IAC=<Para1>
AT+IAC< Para1>
code
The default9e8b33
Set specific see appendix 2:
inquires introductions
Access Code set to GIAC (General Inquire Access Code: 0x9e8b33) General inquires the Access
Code, can be used to find or be found all around the Bluetooth device; In order to effectively in
many Bluetooth devices around the rapid inquires custom or be inquires Bluetooth devices,
users can access the module inquires into GIAC and LIAC code set outside of the numbers, such
as e8b3f9.
AT+RNAME< Para1>
Answer
Parameter
1.OKsuccess
2.ERROR=<Error_Code>
failed
Example
Bluetooth device address00:11:22:33:44:55Device nameBC04-B
AT+RNAME00,11,22,33,44,55\r\n
OK
+RNAME=BC04-B
AT+INQM
Answer
+INQM=<Para1>,<Para2>,<Para3
>
Parameter
<Para1>inquiry mode
0inquiry_mode_standard
Page 5 of 22
AT+INQM<
Para1>,<Para2>,<Para3>
1.+INQM=<Para1>,<Para2>,<Para
3>
OKsuccess
2.ERROR=<Error_Code>
failed
1inquiry_mode_rssi
2inquiry_mode_eir
Length: 1 byte
<Para2> : most Bluetooth
device response number
length: 2 bytes
<Para3> : the biggest
inquires the overtime
Overtime scope: 1-30
(converted into time:
1.28-61.44 seconds)
Length: 2 bytes
The default value: 1,9,30
(hex)
RSSI access mode: according to receiving signal strength around a visit default access the
strongest signal Bluetooth devices.
Example:
AT + INQM1, 5, 12-set inquires the access mode: according to the RSSI pattern search, more
than five Bluetooth device response is terminated inquiry, set for overtime 48 * 1.28 = 61.44
seconds
+ INQM = 1,5,30
OK
answer
parameter
AT+CMODE
+CMODE=<Para1>
AT+CMODE< Para1>
1.+CMODE=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
command
Bluetooth
Binding address: for from equipment, if has the memory address, it can't be matched with
inquires, can only be it memory device to connect; On the equipment, if has the memory
address, is always try to connect it to the memory of the equipment; So when binding address,
once a device memory address, the connection is only in it and it is established between the
memory of the equipment, and will not establish a connection with other equipment. So, in the
binding address, if hope to establish a connection with other equipment, it must be clear
memory address.
Page 6 of 22
Don't binding address: from the devices can be matched with inquires; The equipment will
have been connected to the memory devices, until clear memory address, the main equipment
began to search and matching new equipment.
answer
parameter
AT+BIND
+BIND=<Para1>
AT+BIND<Para1>
+BIND=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
<Para1>
Set bingding Bluetooth address
11,22,33,44,55,66
Reply Bluetooth address format
11:22:33:44:55:66
The Default00:00:00:00:00:00
When using this command to set up each other's Bluetooth address, unless through the key or
remove address command (AT + CLEAR) to remove address, as the main equipment Bluetooth
module will have been trying to connect the address until success. As the Bluetooth module
from equipment if not binding address, can be any other main equipment link; If need to bind
the address, use the command set the binding of address.
Example
In the designated Bluetooth address connection mode, binding Bluetooth device address:
15:51:35: ef: CD: ab
Command and response as follows
AT+BIND11,22,33,44,55,66\r\n
+BIND=11:22:33:44:55:66
OK
AT+CLEAR
answer
OK
parameter
none
The module will remember the address of the other after paring success, this command can
be used to clear the memory address (not binding mode) or the binding address(binding mode).
AT+UARTMODE
AT+ UARTMODE<Para1>,<Para2>
answer
parameter
+UARTMODE=<Para1>,<Para2
>
1.
UARTMODE=<Para1>,<Para2>
OK success
2.ERROR=<Error_Code>
Page 7 of 22
2: parity checking
failed
The default: 0, 0
AT+LADDR
answer
parameter
+LADDR=<Para1>
AT+STATE
answer
+STATE=<Para1>
parameter
<Para1> Bluetooth module working
state
Return values
0INITIALIZING
1READY
2INQUIRING
3PAIRABLE
4CONNECTING
5CONNECTED
AT+INQ
answer
OK
parameter
none
Note: after the beginning of inquires, equipment for the meeting for Bluetooth address. Specific
format see instructions 8(INQS, INQ: Bluetooth address, equipment type, RSSI instructions,
INQE), RSSI whether to return to the command ,can use AT + INQM to be set.
Example
AT+IAC9e8b33\r\n Set any access code Bluetooth devices
+ IAC=9e8b33
OK
AT+COD001f00\r\n Set Bluetooth device type
+COD=001f00
OK
AT+INQM1,9,30\r\n Mode Settings Take RSSI signal strength instructions, more than
nine Bluetooth device response is terminated inquiry, set overtime
for 61.44 seconds
AT+INQ
OK
+INQS
Page 8 of 22
+INQ11:22:33:44:55:66,001f00,-90
+INQaa:bb:cc:dd:ee:ff,001f00,-71
information
Return to search to Bluetooth address equipment
information
+INQE
answer
parameter
AT+AUTOINQ
+AUTOINQ=<Para1>
AT+ AUTOINQ<Para1>
+ AUTOINQ=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
<Para1>
0search automatically
1 can not search
automatically
The Default1
Example
AT+AUTOINQ1\r\n Set search the remote Bluetooth device automatically+AUTOINQ=1
OK
AT+INQ\r\n
search the remote Bluetooth device
+INQS
+INQ 11:22:33:44:55:66,001f00,-90
Return to search to Bluetooth address
equipment information
+INQ aa:bb:cc:dd:ee:ff,001f00,-71
equipment information
+INQE
+INQS
+INQ11:22:33:44:55:66,001f00,-90
+INQaa:bb:cc:dd:ee:ff,001f00,-71
+INQE
AT+INQC
answer
OK
parameter
none
NoteThis order only works under the master mode query, stop the current query.
Page 9 of 22
answer
AT+AUTOCONN
+AUTOCONN=<Para1>
AT+ AUTOCONN<Para1>
+ AUTOCONN=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
parameter
<Para1>
0 Can not connect
automatically
1Connect automatically
The Default1
AT+CONNECT<Para1>
answer
1.OKsuccess
2. ERROR=<Error_Code>failed
parameter
<Para1>
Set
remote
Bluetooth
address
format11,22,33,44,55,66
Reply Bluetooth
format
11:22:33:44:55:66
address
answer
parameter
AT+IPSCAN
+IPSCAN=<Para1>,<Para
2>,<Para3>,<Para4>
AT+IPSCAN<Para1>,<Para2>,<Par
a3>,<Para4>
1.+IPSCAN=<Para1>,<Pa
ra2>,<Para3>,<Para4>
OKsuccess
2.ERROR=<Error_Code>
The
Default
400,200,400,200
failed
answer
parameter
AT+SENM
+SENM=<Para1>,<
Para2>
AT+SENM<Para1>,<Para2>
1.+SENM=<Para1>,
<Para2>
OKsuccess
2.ERROR=<Error_
Code>failed
answer
parameter
AT+LOWPOWER
+LOWPOWER=<Para1>
AT+ LOWPOWER<Para1>
1. +LOWPOWER=<Para1>
OKsuccess
2.ERROR=<Error_Code>failed
<Para1>
0 do not support low
power consumption
1 support low power
consumption
The Default1
answer
AT+SNIFF
+SNIFF=<Para1>,<Para2>,
<Para3>,<Para4>
AT+SNIFF<Para1>,<Para2>,
<Para3>,<Para4>
1.+SNIFF=<Para1>,<Para2>,
<Para3>,<Para4>
OKsuccess
2.ERROR=<Error_Code>
failed
parameter
<Para1>maximum time
<Para2>minimum time
<Para3>trial time
<Para4>timeout
Default 20,40,1,5
Page 11 of 22
answer
AT+ENABLEIND
+ ENABLEIND=<Para1>
AT+ENABLEIND<Para1>
1.+ENABLEIND=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
parameter
<Para1>
0 turn off
Indication up
instruction
1 turn on Indication up
instruction
Default 1
AT+LSP
answer
LSP=<Para1>,<Para2>,<Para3>
LSP=E
parameter
<Para1> serial number
0-7
<Para2>Bluetooth address
code<Para3>name
Default feedbackLSP=E
The maximum record of Bluetooth device is 8 Bluetooth addresses which have paired
before.And it will saved the record even power-off
AT+RESETPDL
answer
OK
parameter
none
AT+REMOVEPDL<Para1>
answer
OK
parameter
<Para1> serial number
0-7
AT+SUPERVISION
answer
+SUPERVISION=<Para1>
parameter
<Para1>response timeunit
Page 12 of 22
AT+SUPERVISION<Para1>
1.+SUPERVISION=<Para1>
OKsuccess
2.ERROR=<Error_Code>
failed
Second Hexadecimal
Default 5
After offline of the opposite Bluetooth Linkloss reports time During this time though
the opposite get offline, still keep connecting.
IIIndications
Indication 1Status
of Ready
Indication
parameter
+READY
none
Indication 2Status
of query
Indication
parameter
+INQUIRING
none
Indication 3Status
of pairing
Indication
+PAIRABLE
parameter
none
parameter
<Para1>Bluetooth address code
As the following format
>>aa:bb:cc:dd:ee:ff (master mode)
<<aa:bb:cc:dd:ee:ff (slave mode)
Indication 5Connected
Indication
+CONNECTED
parameter
none
Page 13 of 22
parameter
+CONNECTION FAILED
none
Indication 7Disconnect
Indication
parameter
+DISC:<Para1>
parameter
+RNAME=<Para1>
Noteif it can find the device the module will report the name of remote Bluetooth device
automatically
parameter
+INQS
query beginning
+INQ=<Para1>,<Para2>,<Para3>
<Para1>Bluetooth address
Format11:22:33:44:55:66
<Para2>type of device
<Para3> RSSI signal strength(decimal is
normalreturn when void 7fff)
Error_code(Decimal)
101
102
103
Note
Devices name which is more than 40 bytes
Paring code which is more than 16 bytes
Baud rate which is more than 1 byte
Page 14 of 22
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
121
201
202
206
207
208
209
210
211
212
213
214
215
216
217
218
220
301
203
204
205
Page 15 of 22
302
303
304
305
LAP value
Usage
0x9E8B33
0x9E8B00
The Limited Inquiry Access Code (LIAC) is only intended to be used for limited time periods in scenarios
where both sides have been explicitly caused to enter this state, usually by user action. For further
explanation of the use of the LIAC, please refer to the Generic Access Profile.
In contrast it is allowed to be continuously scanning for the General Inquiry Access Code (GIAC) and
respond whenever inquired.
Page 16 of 22
The Major and Minor classes are intended to define a general family of devices with which any particular
implementation wishes to be associated. No assumptions should be made about specific functionality or
characteristics of any application based solely on the assignment of the Major or Minor device class.
Bit no
13
14
(reserved)
15
(reserved)
16
17
18
19
20
21
22
23
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 1 Wearable
0 1
0 0 Toy
0 1
0 1 Health
1 1
X X
Page 17 of 22
change, depending on the value of the 'Major Device Class field'. When the Minor Device Class field
indicates a device class, then the primary device class should be reported, e.g. a cellular phone that can
also work as a cordless handset should use 'Cellular' in the minor device class field.
Minor Device Class field - Computer Major Class
7
bit no of CoD
Desktop workstation
Server-class computer
Laptop
Table 4: Sub Device Class field for the 'Computer' Major Class
Minor Device Class field - Phone Major Class
7
bit no of CoD
Cellular
Cordless
Smart phone
bit no of CoD
Fully available
1 - 17% utilized
17 - 33% utilized
33 - 50% utilized
50 - 67% utilized
67 - 83% utilized
83 - 99% utilized
No service available
Page 18 of 22
The exact loading formula is not standardized. It is up to each LAN/Network Access Point implementation
to determine what internal conditions to report as a utilization percentage. The only requirement is that
the number reflects an ever-increasing utilization of communication resources within the box. As a
recommendation, a client that locates multiple LAN/Network Access Points should attempt to connect to
the one reporting the lowest load.
4 3 2
7 6 5 4 3 2
bit no of CoD
Page 19 of 22
0 1 Keyboard
1 0 Pointing device
1 1 Combo keyboard/pointing device
5 4 3 2
bit no of CoD
0 0 0 0 Uncategorized device
0 0 0 1 Joystick
0 0 1 0 Gamepad
0 0 1 1 Remote control
0 1 0 0 Sensing device
0 1 0 1 Digitizer tablet
0 1 1 0 Card Reader (e.g. SIM Card Reader)
0 1 1 1 Digital Pen
1 0 0 0 Handheld scanner for bar-codes, RFID, etc.
1 0 0 1 Handheld gestural input device (e.g., "wand" form factor)
X X X X All other values reserved
7 6 5 4
bit no of CoD
X X X 1 Display
X X 1 X Camera
X 1 X X Scanner
1 X X X Printer
X X X X All other values reserved
3 2
0 0 Uncategorized, default
X X All other values reserved
Page 20 of 22
0 0 0 0 0 1 Wrist Watch
0 0 0 0 1 0 Pager
0 0 0 0 1 1 Jacket
0 0 0 1 0 0 Helmet
0 0 0 1 0 1 Glasses
X X X X X X All other values reserved
0 0 0 0 0 1 Robot
0 0 0 0 1 0 Vehicle
0 0 0 0 1 1 Doll / Action Figure
0 0 0 1 0 0 Controller
0 0 0 1 0 1 Game
X X X X X X All other values reserved
0 0 0 0 0 0 Undefined
0 0 0 0 0 1 Blood Pressure Monitor
0 0 0 0 1 0 Thermometer
0 0 0 0 1 1 Weighing Scale
0 0 0 1 0 0 Glucose Meter
0 0 0 1 0 1 Pulse Oximeter
0 0 0 1 1 0 Heart/Pulse Rate Monitor
0 0 0 1 1 1 Health Data Display
0 0 1 0 0 0 Step Counter
0 0 1 0 0 1 Body Composition Analyzer
0 0 1 0 1 0 Peak Flow Monitor
0 0 1 0 1 1 Medication Monitor
Page 21 of 22
0 0 1 1 0 0 Knee Prosthesis
0 0 1 1 0 1 Ankle Prosthesis
0 0 1 1 1 0 Generic Health Manager
X X X X X X All other values reserved
Page 22 of 22