User's Manual

Enhanced Class 1 Bluetooth v2.1 Module
User’s Guide
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852-2923-0610
www.lairdtech.com/wireless
57
CONN-GUIDE-BT740_v0.2
8.7.2 Response Packets
The format for response packets is displayed in Table 8-3.
Table 8-3: Response packet format
Octet
Field
Description
0
LENGTH
Total length of this packet, including this octet
1
CHANNEL
Always zero
2
CMD_ID
Echoed from the command packet (Shall be > 0 and < 128)
3
FLOW_OUT
Bit 0 to 6 specify a mask. A clear bit means the host should NOT send any
more packets to that corresponding data channel.
Bit 7 is always 0 and is an extension bit in the future.
4
STATUS
Zero means success, otherwise see section “STATUS values”
N..M
DATA[]
Data as required and has meaning specific to the response for CMD_ID
8.7.3 Event Packets
The format for event packets is displayed in Table 8-4.
Table 8-4: Event packet format
Octet
Field
Description
0
LENGTH
Total length of this packet, including this octet
1
CHANNEL
Always zero
2
EVT_ID
Described in subsequent chapters, but bit 7 is always set,
hence >= 128
3
FLOW_OUT
Bit 0 to 6 specify a mask. A clear bit means the host should NOT send any
more packets to that corresponding data channel.
Bit 7 is always zero and is an extension bit in the future.
N..M
DATA[]
Data as required and has meaning specific to the response for EVT_ID
The only difference between a response and an event packet is that octet 2 is defined as CMD_ID in the
former and EVT_ID in the latter; in addition, the STATUS field is missing in the event packet.
The value of CMD_ID will be in the range 0 to 0x3F and EVT_ID will take values in the range 0x80 to
0xFF. This allows bit 7 of that octet to be decoded whether the packet is a response packet or an event
packet.
The value of STATUS is in the range of 0 to 255. A value of zero means SUCCESS and any other value
is a failure, where the value gives more details of the failure type. The values of STATUS are defined in a
‘C’ header file which can be obtained on request from Laird.