HCI Command packet

30 篇文章 4 订阅

HCI Command是有方向性的,从Host发给Controller。是2个字节的长度,OPCODE 其中,分为两部分,OCF和OGF,OGF,是上面的6bits,剩余的10个bit位是OCF。

The OGF values are defined by the Bluetooth (BT) Core specification. The LE specification has its own OGF value. Also, there is an escape OGF value so that vendor specific OCF codes can be used. The following OGF values are valid for BLE:

# Link Control Commands: 1  即。OGF :1*1024 =0x0400

# Link Policy Commands: 2  即。OGF:2*1024 =0x0800

# Controller and Baseband Commands: 3 即。OGF:3*1024 =0x0C00

# Informational Parameters: 4 即。OGF:4*1024 = 0x1000

# Status Parameters: 5.。即,OGF 5*1024 =0x1400

# Testing Commands: 6  即,OGF 6*1024 =0x1800

# LE Only Commands: 8 即,OGF 8*1024 =0x2000

# Vendor Specific Commands: 63

所以,OGF+OCF=OPCODE 即,OGF*1024+OCF=OPCODE 

../_images/hci-command-opcode.png

LE CommandsOGFOCFOpcdoe
LE Set Event Mask810x2001
LE Read Buffer Size820x2002
LE Read Local Supported Features830x2003
LE Set Random Address850x2005
LE Set Advertising Parameters860x2006
LE Read Advertising Channel TX Power870x2007
LE Set Advertising Data880x2008
LE Set Scan Response Data890x2009
LE Set Advertise Enable8100x200A
LE Set Scan Parameters8110x200B
LE Set Scan Enable8120x200C
LE Create Connection8130x200D
LE Create Connection Cancel8140x200E
LE Read White List Size8150x200F
LE Clear White Lis8160x2010
LE Add Device To White List8170x2011
LE Remove Device From White List8180x2012
LE Connection Update8190x2013
LE Set Host Channel Classification8200x2014
LE Read Channel Map8210x2015
LE Read Remote Used Features8220x2016
LE Encrypt8230x2017
LE Rand8240x2018
LE Start Encryption8250x2019
LE Long Term Key Requested Reply8260x201A
LE Long Term Key Requested Negative Reply8270x201B
LE Read Supported States8280x201C
LE Receiver Test8290x201D
LE Transmitter Test8300x201E
LE Test End Command8310x201F
LE Remote Connection Parameter Request Reply8320x2020
LE Remote Connection Parameter Request Negative Reply8330x2021
LE Set Data Length8340x2022
LE Read Suggested Default Data Length8350x2023
LE Write Suggested Default Data Length8360x2024
LE Read Local P256 Public Key 37 0x2025 LE Generate DHKey8380x2026
LE Add Device to Resolving List8390x2027
LE Remove Device from Resolving List8400x2028
LE Clear Resolving List8410x2029
LE Read Resolving List Size8420x202A
LE Read Peer Resolvable Address8430x202B
LE Read Local Resolvable Address8440x202C
LE Set Address Resolution Enable8450x202D
LE Set Resolvable Private Address Timeout8460x202E
LE Read Maximum Data Length8470x202F
BT Commands for LEOGFOCFOpcode
Disconnect160x0406
Read Remote Version Information1290x041D
Set Event Mask310x0C01
Reset330x0C03
Read Transmit Power Level3450x0C2D
Set Controller To Host Flow Control (optional)3490x0C31
Host Buffer Size (optional)3510x0C33
Host Number Of Completed Packets (optional)3530x0C35
Set Event Mask Page3630x0C63
Read Authenticated Payload Timeout41230x0C7B
Write Authenticated Payload Timeout41240x0C7C
Read Local Version Information410x1001
Read Local Supported Commands (optional)420x1002
Read Local Supported Features430x1003
Read BD_ADDR490x1009
Read RSSI550x1405

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值