HCI Packet在Host和Control之间进行传输,通常有四种Command,ACL Data SCO/eSCO Data 和 Event,
HCI Event Packet:
具体介绍可以查看蓝牙官方协议文档;
Part E: Host Controller Interface Functional Specification
简单介绍:SCO和ACL
SCO(Synchronous Connection Oriented)
ACL(Asynchronous Connectionless)
蓝牙链路分两种同步链路(SCO)和异步链路(ACL)
同步链路(SCO)类型和异步链路(ACL)类型。前者主要用于同步话音传送,后者主要用于分组数据传送。
蓝牙物理链路SCO主要用来传输对时间要求很高的数据通信, 另外的一种链路是ACL。
OCF=OpCode Command Field, OGF=OpCode Group Field
根据HCI command Packet,
OpCode的bit10~bit15 6位用来表示OGF命令码,用来表示HCI命令的种类。
OpCode bit0-bit9 10位同来表示OCF命令码,
OGF命令码 总共有8中类型的命令,分别定义如下:
For the Link Control commands, the OGF is defined as 0x01.
For the Link Policy Commands, the OGF is defined as 0x02.
For the HCI Control and Baseband Commands, the OGF is defined as0x03
For Informational Parameters Commands, the OGF is defined as 0x04
For the Status Parameters Commands, the OGF is defined as 0x05.
For the Testing Commands, the OGF is defined as 0x06.
For the LE Controller Commands, the OGF code is defined as 0x08.
The OGF of 0x3F is reserved for vendor-specific debugcommands.
0x3F命令码在android系统协议栈中有使用。
数据包分组标志: