BLE5.2 CIS Data 在刷新点(Flush Point)前后SN和NESN变化机制探讨

BLE5.2 CIS Data PDU在刷新点(Flush Point)前后SN和NESN变化机制探讨。首先申明一下,以下理解不一定正确,都是根据Core5.2 Spec和LL.TS.p17 Spec的理解,如有误欢迎大家提出来,可以发我邮箱[email protected]一起探讨。【以下图示已修订2020/4/20】

1.FT点后SN和NESN变化机制举例1:

BLE5.2 CIS Data 在刷新点(Flush Point)前后SN和NESN变化机制探讨_第1张图片

2.FT点后SN和NESN变化机制举例2:

BLE5.2 CIS Data 在刷新点(Flush Point)前后SN和NESN变化机制探讨_第2张图片
备注:
1.可以看到S在第一个Event的SubEvent4发送CIS NULL PDU,不应该发CIS Empty PDU,因为CIS Empty PDU属于CIS Data PDU,存在刷新点,那么对端如果没有到该笔数据的话,势必需要S重发,看起就不合理了。
2.请注意,如果S根本没有接收到数据包,它就不能发送,因为它不知道时序。对S来说三个黑盒这里应该是收到了M的数据包但是CRC是错误的,因为图示S这种情况下都向M发包了,说明肯定之前收到了M的数据包了。
至于如何知道接收到的对端数据对应的CisPayloadNum:
以M向S发的CIS Data PDU举例,比如在CIS Event1开始处才收到一笔NEW包(CIS Event0期间收到的包CRC均是错误的),收到的这笔数据的SN我们可以知道是0,那么可以推断出来这笔数据的CisPayloadNum是2或者0,即要么是P2,要么是P0包,如果是P2的话,那么S此时肯定已经收到P1了,但是我们目前只收到1笔NEW包,如果是P1包SN判断又不满足,因为P1包的SN为1,所以只能是P0包,也就是CisPayloadNum0。

3.Flush Timeout和Flush Points(参考Core5.2 | Vol 6, Part B, Page3005):

The burst of payloads associated with the CIS event where cisEventCounter has the value E shall consist of payloads with cisPayloadNumber between E × BN and (E + 1) × BN - 1.
4.5.13.5 Flush Timeout and Flush Points
The Flush Timeout (FT) parameter is the maximum number of CIS events that may be used to transmit (and retransmit) a given CIS Data PDU. FT shall be between 1 and 255. Each CIS Data PDU shall have a flush point: a point in time at which that PDU shall be discarded by the Link Layer. The flush point of a PDU in a burst occurs immediately after U subevents in the CIS event with cisEventCounter equal to (E + FT – 1), where:
E = floor (cisPayloadNumber ÷ BN)
U = NSE – floor (NSE ÷ BN) × (BN – 1 – cisPayloadNumber mod BN) BLE5.2 CIS Data 在刷新点(Flush Point)前后SN和NESN变化机制探讨_第3张图片Figure 4.54: Example of flush points with BN=2, FT=1, and NSE=4

假设BN=2, FT=1, E = 5, NSE=4,则 cisPayloadNumber ∈ [5*2, (5+1)*2-1] = [10, 11],
Unum10 = 4 - floor(4/2)x(2-1-10%2) = 2,
Unum11 = 4 - floor(4/2)x(2-1-11%2) = 4,
突发中PDU的刷新点在CIS事件中的U子事件之后立即发生,cisEventCounter等于(E+FT–1)= 5+1-1 = 5,所以cisPayloadNumber=10和cisPayloadNumber=11分别对应的刷新点就发生在E = 5事件号时对应的Unum10=2和Unum11=4两处。
发送端可以很清楚的知道当前发送的CIS Data PDU的刷新点FT,接收端如何知道当前接收的这笔CIS Data PDU对应的FT是在哪里呢?

4.发送和接收sn和nesn流程图(参考Core5.2 | Vol6, Part B, Page2995):

5.FT点前后sn和nesn变化机制(参考Core5.2 | Vol6, Part B, Page2997):

  • 发送端

When the transmitting Link Layer either does not send a CIS Data PDU or sends one but does not receive an acknowledgment for that PDU by the time the flush point occurs (see Section 4.5.13.5), the transmitSeqNum shall be incremented by one and the PDU shall not be retransmitted after the flush point.

  • 接收端

When the Link Layer expecting to receive a CIS Data PDU either does not receive that PDU or fails to acknowledge the PDU by the time the flush point occurs, the nextExpectedSeqNum shall be incremented by one and the Link Layer shall not expect the PDU to be retransmitted after the flush point.

6.ACK Sequence(参考LL.TS.p17 | Page835):

BLE5.2 CIS Data 在刷新点(Flush Point)前后SN和NESN变化机制探讨_第4张图片

7.参考文档:

[1] Core Specification, Versions 5.2
[2] LL.TS.p17 Specification

你可能感兴趣的:(BLE5.2,CIS,Data,ACK,FlushPoint)