当前位置:网站首页>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 

边栏推荐
- Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
- Use and principle of thread pool
- 整理混乱的头文件,我用include what you use
- 2022PMP考试基本情况详情了解
- World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
- Capvision Rongying's prospectus in Hong Kong was "invalid": it was strictly questioned by the CSRC and required supplementary disclosure
- Summary of tx.origin security issues
- Cypher task design and task locking mechanism of isomorphic and heterogeneous graphs
- S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
- 力扣今日题-1200. 最小绝对差
猜你喜欢

周大福践行「百周年承诺」,真诚服务推动绿色环保

Visual Studio 2019 (LocalDB)MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782

新的职业已经出现,怎么能够停滞不前 ,人社部公布建筑新职业

【Unity UGUI】ScrollRect 动态缩放格子大小,自动定位到中间的格子

Go micro tutorial - Chapter 2 go micro V3 using gin and etcd

从数数开始
Can you really use MySQL explain?

Load test practice of pingcode performance test

Solution of dealer collaboration system in building materials industry: empowering enterprises to build core competitiveness

detectron2安装方法
随机推荐
51 single chip microcomputer temperature alarm based on WiFi control
Years of training, towards Kata 3.0! Enter the safe container experience out of the box | dragon lizard Technology
To sort out messy header files, I use include what you use
PingCode 性能测试之负载测试实践
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
APOC自定义函数和过程
Inside and outside: flow chart drawing elementary: six common mistakes
基于check-point机制的任务状态回滚和数据分块任务
Object. Usage of keys()
安信证券网上开户安全吗 开户收费吗
Detailed process of DC-2 range construction and penetration practice (DC range Series)
How can programmers improve the speed of code writing?
How to contribute to the source code of ongdb core project
Redis 的内存淘汰策略和过期删除策略的区别
Embedded software architecture design - function call
[glide] cache implementation - memory and disk cache
祝贺Artefact首席数据科学家张鹏飞先生荣获 Campaign Asia Tech MVP 2022
Is it safe for Anxin securities to open an account online? Is the account opening fee charged
表单传递时,如何隐式将值传过去
Maximum subarray and matrix multiplication