当前位置:网站首页>Ble HCI flow control mechanism
Ble HCI flow control mechanism
2022-07-04 17:18:00 【Millennium fate】
HCI There are two flow control mechanisms
- packet-based - Control the sending and receiving based on the number of packets
- data-block-based - Control the sending and receiving based on the data length
BR/EDR By default packet-based, You can use HCI_Write_Flow_Control_Mode command Set up , and BLE Only support packet-based
One 、Host to Controller data flow control
At the beginning ,Host adopt HCI_LE_Read_Buffer_Size Command acquisition Controller Each of them ACL buffer Size , as well as ACL buffer The number of , This number is allowed Host towards Controller Continuous transmission ACL Number of bags When Host towards Controller Send a ACL After package , The number of contract awarding is allowed to be reduced 1, When the number of contracts allowed is 0 when , Can't go to Controller send out
When Controller Deal with one ACL After package , If the data has been sent to the peer device ,Controller Release ACL buffer Space , And to Host send out HCI_Number_Of_Completed_Packets event, At this time, it is allowed to add 1,Host You can continue to Controller Sent
If Controller Handle multiple at the same time ACL package ,Controller Release multiple ACL buffer Space ,HCI_Number_Of_Completed_Packets event There will be multiple connections released in ACL buffer Number , At this time, the increment of the number of contracts is allowed to be released for all connections ACL buffer The sum of the numbers
Two 、Controller to Host data flow control
Controller towards Host The flow control of the direction is off by default , Can pass HCI_Set_Controller_To_Host_Flow_Control cmd Turn on or off
Mechanism and Host to Controller be similar , At the beginning ,Host adopt HCI_Host_Buffer_Size cmd inform Controller Own each ACL buffer Size , as well as ACL buffer The number of , This number is allowed Controller towards Host Continuous transmission ACL Number of bags
When Controller towards Host Send a ACL After package , The number of contract awarding is allowed to be reduced 1, When the number of contracts allowed is 0 when , Can't go to Host send out
When Host Deal with one ACL After package , If the data has been sent to the upper layer for processing ,Host Release ACL buffer Space , And to Controller send out HCI_Host_Number_Of_Completed_Packets command, At this time, it is allowed to add 1,Controller You can continue to Host Sent
If Host Handle multiple at the same time ACL package ,Host Release multiple ACL buffer Space ,HCI_Host_Number_Of_Completed_Packets command There will be multiple connections released in ACL buffer Number , At this time, the increment of the number of contracts is allowed to be released for all connections ACL buffer The sum of the numbers
HCI_Host_Number_Of_Completed_Packets cmd It's a special one cmd, It is not controlled by flow control ,Host Can at any time to Controller send out , And there is no corresponding event Generate
3、 ... and 、command flow control
When Host towards Controller send out command after ,Controller Will send to Host return HCI_Command_Complete event or HCI_Command_Status event, these two items. event There are parameters in num_of_allowed_command_packet, This parameter is Host Can be directed to Controller Continuous transmission command The number of
At the beginning or at any subsequent time ,Controller Can be directed to Host send out Command Opcode=0x0000 Of HCI_Command_Status event or HCI_Command_Status event, To inform Host Continuous transmission is allowed at this time command The number of
边栏推荐
- Congratulations to Mr. Zhang Pengfei, chief data scientist of artefact, for winning the campaign Asia tech MVP 2022
- go-micro教程 — 第二章 go-micro v3 使用Gin、Etcd
- 安信证券网上开户安全吗 开户收费吗
- Array filter fliter in JS
- 安信证券属于什么档次 开户安全吗
- TP configuring multiple databases
- Is it safe to open an account online
- C # realizes FFT forward and inverse transformation and frequency domain filtering
- Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
- 安信证券手机版下载 网上开户安全吗
猜你喜欢
利用win10计划任务程序定时自动运行jar包
Smart Logistics Park supply chain management system solution: digital intelligent supply chain enables a new supply chain model for the logistics transportation industry
7 RSA密码体制
PingCode 性能测试之负载测试实践
第十八届IET交直流输电国际会议(ACDC2022)于线上成功举办
Capvision Rongying's prospectus in Hong Kong was "invalid": it was strictly questioned by the CSRC and required supplementary disclosure
整理混乱的头文件,我用include what you use
Start by counting
MVC模式和三层架构
The winning rate against people is 84%, and deepmind AI has reached the level of human experts in army chess for the first time
随机推荐
智慧物流园区供应链管理系统解决方案:数智化供应链赋能物流运输行业供应链新模式
The test experience "tortured" by the PMP test is worth your review
ble HCI 流控机制
NoSQL之readis配置与优化(终章)
C# 服务器日志模块
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
C implementation defines a set of intermediate SQL statements that can be executed across libraries
从数数开始
程序员怎么才能提高代码编写速度?
Solution of commercial supply chain coordination system in the mineral industry: build a digital intelligent supply chain platform to ensure the safe supply of mineral resources
Analysis of abnormal frequency of minor GC in container environment
Go language loop statement (under Lesson 10)
Sql实现Split
Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
Median and order statistics
Learn more about the basic situation of 2022pmp examination
Blood spitting finishing nanny level series tutorial - play Fiddler bag grabbing tutorial (2) - first meet fiddler, let you have a rational understanding
Can you really use MySQL explain?
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
APOC自定义函数和过程