HCI数据包格式分类

HCI Packet在Host和Control之间进行传输,通常有四种Command,ACL Data  SCO/eSCO Data 和 Event,

  1. HCI Command Packet;
  2. HCI ACL Data Packets:
  3. HCI Synchronous Data Packets:(SCO and eSCO)
  4. 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。

1 HCI Command Packet

 HCI数据包格式分类_第1张图片

 

HCI数据包格式分类_第2张图片

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系统协议栈中有使用。

2 HCI ACL Data Packets:

HCI数据包格式分类_第3张图片

 HCI数据包格式分类_第4张图片

数据包分组标志: 

HCI数据包格式分类_第5张图片 广播标志:

HCI数据包格式分类_第6张图片

 3 HCI Synchronous Data Packets:(SCO and eSCO)

HCI数据包格式分类_第7张图片

HCI数据包格式分类_第8张图片

HCI数据包格式分类_第9张图片

HCI数据包格式分类_第10张图片4  HCI Event Packet: 

HCI数据包格式分类_第11张图片

 

HCI数据包格式分类_第12张图片

 

你可能感兴趣的:(蓝牙)