当前位置:网站首页>Bluetooth (5) -- about retransmission
Bluetooth (5) -- about retransmission
2022-06-11 00:08:00 【yuanyun_ elber】
Finally, it comes to l2cap The layer .
L2CAP Features include agreement / Channel multiplexing , Regroup in sections (segmentation and reassembly, SAR), Flow control and error control of each channel
The channel here does not refer to the physical channel of different frequency bands , But to l2cap The layer is open to the upper application channel, The upper application is based on l2cap Layer of channel id To judge whether it belongs to you profile Of data Of .
Let's continue with the topic that we didn't finish last time .
In most cases , Yes hci Layer flow control is enough , But somehow l2cap It provides this service , It is always right for us to study .
L2cap The logical channel of can work in 5 In different modes ( It can be understood as 5 Different scenarios )
1、Basic L2CAP Mode(equivalent to L2CAP specification in Bluetooth v1.1) The default mode , When no other mode is selected , In this mode .
2、Flow Control Mode In this mode, retransmission will not be performed , But missing data can be detected , And report loss .
3、Retransmission Mode This mode ensures that all data packets can be successfully transmitted to the peer device .
4、Enhanced Retransmission Mode This mode is similar to the retransmission mode , Joined the Poll-bit And so on .
5、Streaming Mode This mode is for real-time transmission , Packets are numbered but do not need to ACK confirm . Set a timeout timer , Once the timer times out, the timeout data will be flushed .
6、LE Credit Based Flow Control Mode Be used for LE Device communication .
Generally speaking , We work in the first mode , In this mode ,l2cap The layer has no flow control and retransmission .
The retransmission of Bluetooth is actually LC The floor already has , adopt ARQ, It's basically a question and answer form .
L2cap Layer retransmission should be discussed together with flow control , stay flow control mode and retransmission mode Next , There is a kind of s-frame Special package for , Which includes seq number Information about ( Be careful , stay lc Layer provides seq, Only 0 and 1 Two kinds of , because lc Layer of arq The mechanism is strictly a question and answer , therefore seq Only 0 and 1 That's enough )
L2cap The layers are a little different , You can set a tx window, After sending multiple packets continuously , Then ask the other party to answer , The benefit of this is the improvement of efficiency .
The following is the sequence diagram of retransmission mode :

The difference between flow control mode and retransmission mode is , No retransmission in flow control mode , But it will report packet loss .
Review flow control and retransmission :
Bluetooth retransmission and flow control in general LC Layers are fine cover,l2cap Although the layer provides related services , But it is seldom used in practical applications . about LC Layer , Retransmission based on ARQ Mechanism , Flow control depends on controller buffe, from LC Layer update packet header Medium flow position . in addition , For the local hci transport Interface , There are two types of flow control , One is hci command, adopt hci command complete event Flow control , General controller Only single command is supported ; Two is hci acl data, There are two directions of flow control , adopt hci read buffer size command,hci host buffer size command,hci host number of completed packets command,hci number of completed packets event Four orders 、 Event flow control .
边栏推荐
- 【Pygame小游戏】Chrome上的小恐龙竟可以用代码玩儿了?它看起来很好玩儿的样子~
- LabVIEW displays the time and date on the waveform chart or waveform chart
- 【Pygame小游戏】剧情流推荐:什么样的游戏才能获得大家的喜欢呢?(魔鬼恋人、霸总娇妻版)
- csdn每日一练——有序表的折半查找
- [MVC&Core]ASP.NET Core MVC 视图传值入门
- MySQL命令行导入导出数据
- Deepin20菜单启动选项后自检到iwlwifi停机
- Method of converting file to multipartfile
- [pyGame games] I'm not afraid you can't walk the maze series: the ultimate AI walks the maze. After learning, it will take you to open the door to a new world ~ (with game source code)
- [pyGame games] tank battle, how many childhood games do you remember?
猜你喜欢
![[pyGame collection] please check the game guide through childhood: are there any games you have played? (attach five source codes for self access)](/img/f8/e71a1524f73364053952099e7b9588.png)
[pyGame collection] please check the game guide through childhood: are there any games you have played? (attach five source codes for self access)
![[pyGame] can the little dinosaur on chrome be played with code? It looks like fun~](/img/b4/a4140eb10658af40a8a2fc0f428b0f.jpg)
[pyGame] can the little dinosaur on chrome be played with code? It looks like fun~

LabVIEW programming specification

Leetcode-713 subarray with product less than k
![[AI card player] for the first time to see such an](/img/7b/f1965a74733e152dcc542e465112b0.png)
[AI card player] for the first time to see such an "exciting" landowner, the key factor for a high winning rate is
![[pyGame] stir up your brain and play the](/img/0c/fd558c843705af19720d790da4ff06.jpg)
[pyGame] stir up your brain and play the "24 o'clock" idea together ~ (awesome)

A simple understanding of B tree
![[pyGame collection] memory killing -](/img/97/10a4333662b49ac35e5b7433a5e6a4.png)
[pyGame collection] memory killing - "Childhood Games", how many shots did you get? (attach five source codes for self access)

LabVIEW displays the time and date on the waveform chart or waveform chart

【Pygame小游戏】“史上最炫酷贪吃蛇”驾到,FUN开玩(不好玩不要钱)
随机推荐
WinDriver compilation summary
30 | how to reset the consumer group displacement?
Flowable process deployment
[pyGame games] here it is. This Gobang game is super A. share it with your friends~
[pyGame games] interesting puzzle game: how many hamsters can you play? (source code attached)
【Pygame小游戏】《坦克大战》,那些童年的游戏你还记得几个呢?
How to measure the refresh rate of oscilloscope
LabVIEW和VDM提取色彩和生成灰度图像
[untitled]
基于华为云ECS的目标检测与识别的昇腾AI开发体验【华为云至简致远】
[pyGame games] don't look for it. Here comes the leisure game topic - bubble dragon widget - recommendation for leisure game research and development
Error report of curl import postman
[new version] new pseudo personal homepage v2.0- starze V Club
长投学堂开户安全吗?靠谱吗?
【颜值检测神器】来,请拿出你们的绝活(这颜值,对得起观众么?)
vtk.js中vtp下载
选择排序
Redis installation and common problem solving based on centeros7 (explanation with pictures)
[auto reply Script] happy new year. I typed every word myself, not forwarded it~
Basic operation of OpenCV actual combat image: this effect amazed everyone (with code analysis)