BT Classic Command Format

Command frame format is shown below. This description is for a Little Endian System.

Figure 1 - Command Frame Format

The following table provides the general description of the frame descriptor.

Frame Descriptor

WordFrame Descriptor
Word0 W0[15:0]Bits [11:0] – Length of the frame
Bits [15:12] – 2 (indicates Bluetooth packet).
Word1 W1[15:0]Bits [15:0] – Packet type
Word2 W2[15:0]Reserved
Word3 W3[15:0]Reserved
Word4 W4[15:0]Reserved
Word5 W5 [15:0]Reserved
Word6 W6 [15:0]1. (0x0000) when sent from host to module.
2. When sent from module to host (as response frame), it contains the status.
Word7 W7 [15:0]Reserved

Three types of frames will get exchanged between the module and the host.

  1. Request/Command Frames - These are sent from Host to Module. Each Request/ Command has an associated response with it.

  2. Response Frames – These are sent from Module to Host. These are given in response to the previous Request/Command from the Host. Each command has a single response.

  3. Event Frames – These are sent from Module to Host. These are given when there are multiple responses for a particular Request/Command frame. There is an Asynchronous message to be sent to host.

The following are the types of frame requests and responses and the corresponding codes. The commands are different for both Classic and LE modes. The below Table lists the Command, Response and Event frames in BT Classic mode.

In both the modes, the corresponding code is to be filled in W1 [15:0] mentioned in the Table above.

Command IDs In BT Classic Mode

CommandCommand ID
Set Local Name0x0001
Query Local Name0x0002
Set Local COD0x0003
Query Local COD0x0004
Query RSSI0x0005
Query Link Quality0x0006
Query Local BD Address0x0007
Set Profile Mode0x0008
Set Device Discover Mode0x0009
Get Device Discover Mode0x000A
Set Connection Mode0x000B
Get Connection Mode0x000C
Set Pair Mode0x000D
Get Pair Mode0x000E
Remote Name Request0x000F
Remote Name Request Cancel0x0010
Inquiry0x0011
Inquiry Cancel0x0012
Bond or Create Connection0x0013
Bond Cancel or Create Connection Cancel0x0014
Unbond or Disconnect0x0015
Set Pin Type0x0016
Get Pin Type0x0017
User Confirmation0x0018
Passkey Reply0x0019
Pincode Reply0x001A
Get Local Device Role0x001B
Set Local Device Role0x001C
Get Service List0X001D
Search Service0X001E
SPP connect0X001F
SPP Disconnect0X0020
SPP Transfer0X0021
Initialize BT Module0x008D
Deinitialize BT Module0x008E
Antenna Select0x008F
Linkkey Reply0x0091
PER Transmit0x0098
PER Receive0x0099
PER Stats0x009A
PER CW mode0x009B
Sniff Mode0x009D
Sniff Exit0x009E
Sniff Subrating0x009F
Feature Bit map0x00A6
Set Antenna Tx Power Level0x00A7
AFH channel Classification0x00D2
Set SSP mode0x00A0
Set EIR data0X00A9
A2DP Connect0x0022
A2DP Disconnect0x0023
A2DP Start0x00CE
A2DP Suspend0x00CF
A2DP PCM Data0x00D0
A2DP SBC Data0x00D1
AVRCP Connect0X0024
AVRCP Disconnect0X0025
AVRCP Play0X0026
AVRCP Pause0X0027
AVRCP Stop0X0028
AVRCP Next0X0029
AVRCP Previous0X002A
HFP Connect0x002D
HFP Disconnect0x002E
HFP Phone Operator0x002F
HFP Call Accept0x0030
HFP Call Reject0x0031
HFP Dial Number0x0032
HFP Dial Member0x0033
HFP Redial0x0034
HFP Voice Recognition Active0x0035
HFP Voice Recognition Deactive0x0036
HFP Speak Gain0x0037
HFP Mic Gain0x0038
HFP Get Calls0x0039
HFP Audio0x003A
PBAP Connect0x003B
PBAP Disconnect0x003C
PBAP Contacts0x003D
Set AFH Channel Classification0x00D2
AVRCP Get Capabilities0x00D3
AVRCP Get Attributes List0x00D4
AVRCP Get Attributes Values List0x00D5
AVRCP Get Current Attribute Value0x00D6
AVRCP Set Current Attribute Value0x00D7
AVRCP Get Element Attributes0x00D8
AVRCP Get Play Status0x00D9
AVRCP Get Register Notification0x00DA
AVRCP Get Version0x00DB
AVRCP Get Attribute Text0x00DC
AVRCP Get Attribute Value Text0x00DD
AVRCP Get Battery Status0x00DE
AVRCP Get Character Sets0x00DF
AVRCP Capabilities Response0x00E0
AVRCP Attributes List Response0x00E1
AVRCP Attributes Values List Response0x00E2
AVRCP Get Current Attributes Values List Response0x00E3
AVRCP Set Current Attributes Values List Response0x00E4
AVRCP Get Element Attributes Response0x00E5
AVRCP Get Play Status Response0x00E6
AVRCP Get Register Notification Response0x00E7
AVRCP Get Attribute Text Response0x00E8
AVRCP Get Attribute Value Text Response0x00E9
AVRCP Get Battery Status Response0x00EA
AVRCP Get Character Sets Response0x00EB
AVRCP Notification0x00EC
AVRCP CMD Reject0x00ED
Add Device ID0x00EE
A2DP Get Config0x00FE
A2DP Set Config0x00FF

NOTE:

A2DP, AVRCP and HFP command IDs are not supported in the v2.1 version of the document.


Response IDs In BT Classic Mode

ResponseResponse ID
Set Local Name0x0001
Query Local Name0x0002
Set Local COD0x0003
Query Local COD0x0004
Query RSSI0x0005
Query Link Quality0x0006
Query Local BD Address0x0007
Set Profile Mode0x0008
Set Device Discover Mode0x0009
Get Device Discover Mode0x000A
Set Connection Mode0x000B
Get Connection Mode0x000C
Set Pair Mode0x000D
Get Pair Mode0x000E
Remote Name Request0x000F
Remote Name Request Cancel0x0010
Inquiry0x0011
Inquiry Cancel0x0012
Bond or Create Connection0x0013
Bond Cancel or Create Connection Cancel0x0014
Unbond or Disconnect0x0015
Set Pin Type0x0016
Get Pin Type0x0017
User Confirmation0x0018
Passkey Reply0x0019
Pincode Reply0x001A
Get Local Device Role0x001B
Set Local Device Role0x001C
Get Service List0X001D
Search Service0X001E
SPP Connect0X001F
SPP Disconnect0X0020
SPP Transfer0X0021
Initialize BT Module0x008D
Deinitialize BT Module0x008E
Antenna Select0x008F
Linkkey Reply0x0091
PER Transmit0x0098
PER Receive0x0099
PER Stats0x009A
PER CW Mode0x009B
Sniff Mode0x009D
Sniff Exit0x009E
Sniff Subrating0x009F
Feature Bit map0x00A6
Set Antenna Tx Power Level0x00A7
AFH channel Classification0x00D2
Set SSP mode0x00A0
Set EIR data0X00A9
A2DP Connect0x0022
A2DP Disconnect0x0023
A2DP Start0x00CE
A2DP Suspend0x00CF
A2DP PCM Data0x00D0
A2DP SBC Data0x00D1
AVRCP Connect0X0024
AVRCP Disconnect0X0025
AVRCP Play0X0026
AVRCP Pause0X0027
AVRCP Stop0X0028
AVRCP Next0X0029
AVRCP Previous0X002A
HFP Connect0x002D
HFP Disconnect0x002E
HFP Phone Operator0x002F
HFP Call Accept0x0030
HFP Call Reject0x0031
HFP Dial Number0x0032
HFP Dial Member0x0033
HFP Redial0x0034
HFP Voice Recognition Active0x0035
HFP Voice Recognition Deactive0x0036
HFP Speak Gain0x0037
HFP Mic Gain0x0038
HFP Get Calls0x0039
HFP Audio0x003A
PBAP Connect0x003B
PBAP Disconnect0x003C
PBAP Contacts0x003D
Set AFH Channel Classification0x00D2
AVRCP Get Capabilities0x00D3
AVRCP Get Attributes List0x00D4
AVRCP Get Attributes Values List0x00D5
AVRCP Get Current Attribute Value0x00D6
AVRCP Set Current Attribute Value0x00D7
AVRCP Get Element Attributes0x00D8
AVRCP Get Play Status0x00D9
AVRCP Get Register Notification0x00DA
AVRCP Get Version0x00DB
AVRCP Get Attribute Text0x00DC
AVRCP Get Attribute Value Text0x00DD
AVRCP Get Battery Status0x00DE
AVRCP Get Character Sets0x00DF
AVRCP Capabilities Response0x00E0
AVRCP Attributes List Response0x00E1
AVRCP Attributes Values List Response0x00E2
AVRCP Get Current Attributes Values List Response0x00E3
AVRCP Set Current Attributes Values List Response0x00E4
AVRCP Get Element Attributes Response0x00E5
AVRCP Get Play Status Response0x00E6
AVRCP Get Register Notification Response0x00E7
AVRCP Get Attribute Text Response0x00E8
AVRCP Get Attribute Value Text Response0x00E9
AVRCP Get Battery Status Response0x00EA
AVRCP Get Character Sets Response0x00EB
AVRCP Notification0x00EC
AVRCP CMD Reject0x00ED
Add Device ID0x00EE
A2DP Get Config0x00FE
A2DP Set Config0x00FF

NOTE:

A2DP, AVRCP and HFP Response IDs are not supported in the v2.1 version of the document.


Table 4. Event IDs In BT Classic Mode

EventEvent ID
Role Change Status0x1000
Unbond or Disconnect0x1001
Bond Response0x1002
Inquiry Response0x1003
Remote Device Name0x1004
Remote Name Request Cancelled0x1005
Disconnected0x1006
User Confirmation Request0x1007
User Passkey Display0x1008
User Pincode Request0x1009
User Passkey Request0x100A
Inquiry Complete0x100B
Authentication Complete0x100C
User Linkkey Request0x100D
User Linkkey Save0x100E
SSP Complete0x100F
BT Mode Changed0x1010
BT Sniff Subrating Changed0x1011
BT User Passkey Notify0x1012
SPP Receive Data0x1100
SPP Connected0x1101
SPP Disconnected0x1102
A2DP Connected0x1200
A2DP Disconnected0x1201
A2DP Configured0x1202
A2DP Open0x1203
A2DP Start0x1204
A2DP Suspend0x1205
A2DP Abort0x1206
A2DP Close0x1207
A2DP Encoded data0x1208
A2DP PCM data0x1209
A2DP More data request0x120A
A2DP Codec Config0x120B
AVRCP Connected0x1300
AVRCP Disconnected0x1301
AVRCP Play0x1302
AVRCP Pause0x1303
AVRCP Next0x1304
AVRCP Previous0x1305
AVRCP Stop0x1306
AVRCP Notify0x1310
AVRCP Capabilities Request0x1311
AVRCP Attributes List Request0x1312
AVRCP Values List Request0x1313
AVRCP Current Attribute Value Request0x1314
AVRCP Set Attribute Value Request0x1315
AVRCP Attribute Text Request0x1316
AVRCP Value Text Request0x1317
AVRCP Character Set Request0x1318
AVRCP Battery Status Request0x1319
AVRCP Element Attribute Request0x131A
AVRCP Player Status Request0x131B
AVRCP Register Notification0x131C
HFP Connected0x1400
HFP Disconnected0x1401
HFP Ring0x1402
HFP Call caller id0x1403
HFP Audio Connected0x1404
HFP Audio Disconnected0x1405
HFP Dial Complete0x1406
HFP Answer Complete0x1407
HFP Hang Up Complete0x1408
HFP Send DTMF Complete0x1409
HFP Call wait0x140A
HFP Voice Recognition Deactivated0x140B
HFP Voice Recognition Activated0x140C
HFP Service Not Found0x140D
HFP Call Status0x140E
HFP Signal Strength0x140F
HFP Battery Level0x1410
HFP Phone Service0x1411
HFP Roaming Status0x1412
HFP Call Setup0x1413
HFP Call Held Status0x1414
PBAP Connected0x1450
PBAP Disconnected0x1451
PBAP Data0x1452

NOTE:

A2DP, AVRCP and HFP Response IDs are not supported in the v2.1 version of the document.