第一部分:HCI协议(八)具体的HCI command和event(1、Generic Events)

时间:2024-05-23 08:49:20

个人感觉按照core 4.2分类容易理解,这部分只记录常用的(LE的暂时不写):

1、Generic Events

第一部分:HCI协议(八)具体的HCI command和event(1、Generic Events)

(1)Command Complete Event

第一部分:HCI协议(八)具体的HCI command和event(1、Generic Events)

参数说明:

Num_HCI_Command_Packets(1 Octet):取值范围0-255;表示 Host可以向Controller发送的HCI command packets数量(这个参数是0表示停止向controller发送command,Command_Opcode是0x0000, Num_HCI_Command_Packets>=1表示controller已经准备好接收command)

Command_Opcode(2 Octet):引起这个event的HCI command的操作码

Return_Parameters(根据具体指令):对应具体HCI command的要求返回的参数

(2)Command Status Event

第一部分:HCI协议(八)具体的HCI command和event(1、Generic Events)

参数说明:

Status(1 Octet):0x00表示command被挂起;0x01-0xFF error code

Num_HCI_Command_Packets(1 Octet):取值范围0-255;表示 Host可以向Controller发送的HCI command packets数量(这个参数是0表示停止向controller发送command,Command_Opcode是0x0000, Num_HCI_Command_Packets>=1表示controller已经准备好接收command)

Command_Opcode(2 Octet):引起这个event的HCI command的操作码

(3)Hardware Error Event

第一部分:HCI协议(八)具体的HCI command和event(1、Generic Events)

这个指令用来表示controller发生了Hardware Error

参数说明:

Hardware_Code1 Octet):取值范围0x00-0xFF;