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
54
CONN-GUIDE-BT740_v0.2
8.3 Packet Format
This section describes the general format of incoming and outgoing packets.
The term ‘incoming’ henceforth implies packets sent by the host to the module and ‘outgoing’ in the
reverse direction. That is, the direction terminology is module (server) centric.
All packets have octet granularity. When an octet is described as containing bit fields, it shall be taken
that bit 0 is the least significant bit and bit 7 is the most significant bit.
Subfields in the packet which require multiple octets shall be ordered so that the lowest significant octet
transmits LAST over the transport media, unless specifically described otherwise – this is also referred to
as Big Endien format. For example, a 16-bit word value requires two octets within the packet and the first
transmitted octet corresponds to the upper byte. Similarly, a 6-byte Bluetooth address transports the most
significant byte first. If the order is reversed then it is specifically highlighted in the description of
appropriate packets.
Subfields which are data arrays shall be described with the ‘[ ]’ operator in descriptions which come in
subsequent chapters.
Apart from data packets, all command, confirm, respond and event packets are of fixed size. If there isn’t
enough data to fill a packet, then the packet fills with 0s. The protocol and fixed packet format is
optimized to ensure maximum data throughput over the air. Subsequent sections describe the packets in
detail.
8.4 Host to Module Packets
These are packets used to convey commands and confirms to the module or raw data to be sent over an
open Bluetooth connection.
8.5 Command & Confirm Packets
The format for command and confirm packets is displayed in Table 8-1.
Table 8-1: Command and confirm packets
Octet
Field
Description
0
LENGTH
Total length of this packet, including this octet
1
CHANNEL
Always zero
2
CMD_ID/CNF_ID
Described in the subsequent chapters and have CMD_ or CNF_
prefixes
3
FLOW_IN
Bit 0 to 6 specify a mask. A clear bit means the module should NOT
send any more packets to that corresponding SPP data channel.
Bit 7 is always zero and is used as an extension bit in the future.
It is assumed that the host is always able to receive a response or
status packet.
4..N
DATA[]
Data as required and has meaning specific to CMD_ID or CNF_ID.
For example, if the command is to make a connection to a peer
device, then it is at least a six octet array specifying the Bluetooth
address of the peer.
The value of CMD_ID is in the range of 0 to 63 and commands are queued until a previous command is
completed by sending a response packet to the host.