当前位置:网站首页>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
边栏推荐
- 金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
- Blood spitting finishing nanny level series tutorial - play Fiddler bag grabbing tutorial (2) - first meet fiddler, let you have a rational understanding
- leetcode刷题目录总结
- Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
- Overflow: the combination of auto and Felx
- Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
- egg. JS learning notes
- 安信证券手机版下载 网上开户安全吗
- It's too convenient. You can complete the code release and approval by nailing it!
- How to choose one plus 10 pro and iPhone 13?
猜你喜欢
Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
【Go ~ 0到1 】 第六天 文件的读写与创建
程序员怎么才能提高代码编写速度?
The 18th IET AC / DC transmission International Conference (acdc2022) was successfully held online
太方便了,钉钉上就可完成代码发布审批啦!
How can programmers improve the speed of code writing?
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
C# 更加优质的操作MongoDB数据库
overflow:auto与felx结合的用法
Difference between redis' memory obsolescence strategy and expiration deletion strategy
随机推荐
时序图数据建模与产业链分析
Array filter fliter in JS
FIREBIRD使用经验总结
[acwing] 58 weeks 4489 Longest subsequence
Cypher task design and task locking mechanism of isomorphic and heterogeneous graphs
同构图与异构图CYPHER-TASK设计与TASK锁机制
【模板】【luogu P4630】Duathlon 铁人两项(圆方树)
MVC模式和三层架构
S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
太方便了,钉钉上就可完成代码发布审批啦!
将Opencv绘制图片显示在MFC Picture Control控件上
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
最大子数组与矩阵乘法
安信证券排名 网上开户安全吗
一加10 Pro和iPhone 13怎么选?
Spark 中的 Rebalance 操作以及与Repartition操作的区别
Task state rollback and data blocking tasks based on check point mechanism
散列表
Oracle监听器Server端与Client端配置实例
Two methods of MD5 encryption