当前位置:网站首页>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
边栏推荐
- 容器环境minor gc异常频繁分析
- Understand ThreadLocal in one picture
- Linear time sequencing
- 新的职业已经出现,怎么能够停滞不前 ,人社部公布建筑新职业
- NFT liquidity market security issues occur frequently - Analysis of the black incident of NFT trading platform quixotic
- Transformer中position encoding实践
- 安信证券属于什么档次 开户安全吗
- Smart Logistics Park supply chain management system solution: digital intelligent supply chain enables a new supply chain model for the logistics transportation industry
- APOC自定义函数和过程
- Maximum subarray and matrix multiplication
猜你喜欢
Smart Logistics Park supply chain management system solution: digital intelligent supply chain enables a new supply chain model for the logistics transportation industry
2022PMP考试基本情况详情了解
go-micro教程 — 第二章 go-micro v3 使用Gin、Etcd
PingCode 性能测试之负载测试实践
照明行业S2B2B解决方案:高效赋能产业供应链,提升企业经济效益
kaili不能输入中文怎么办???
Transformer中position encoding实践
Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
如何实现一个延时队列 ?
Yanwen logistics plans to be listed on Shenzhen Stock Exchange: it is mainly engaged in international express business, and its gross profit margin is far lower than the industry level
随机推荐
Readis configuration and optimization of NoSQL (final chapter)
Smart Logistics Park supply chain management system solution: digital intelligent supply chain enables a new supply chain model for the logistics transportation industry
Median and order statistics
What grade does Anxin securities belong to? Is it safe to open an account
[Acwing] 58周赛 4490. 染色
长城证券开户安全吗 证券账户怎么开通
detectron2安装方法
基于wifi控制的51单片机温度报警器
高度剩余法
最大子数组与矩阵乘法
leetcode刷题目录总结
Is it safe for Bank of China Securities to open an account online?
APOC custom functions and procedures
Unity interview questions (continuously updated)
Yanwen logistics plans to be listed on Shenzhen Stock Exchange: it is mainly engaged in international express business, and its gross profit margin is far lower than the industry level
Start by counting
How to "use" Perl modules in directories that are not in @inc- How do I 'use' a Perl module in a directory not in @INC?
egg. JS learning notes
Array filter fliter in JS
Object.keys()的用法