IV Index
更多详细信息可以参考Mesh文档的 3.10.5 IV Update procedure
一、Secure Network beacon 中有两个字段与IV Index相关
- Flags(1Byte)的IV Update Flag(bit1) : Contains the Key Refresh Flag and IV Update Flag。
- IV Index:4Bytes,Contains the current IV Index。
A. Normal Operation – IV Update Flag = 0.
B. IV Update in Progress – IV Update Flag = 1.
二、IVI
IVI: Least significant bit of IV Index
三、节点在IV Update in Progress
- 使用当前IV Index传输。
- 使用IV Index 和 IV Index -1 处理消息。
四、节点在 Normal Operation 状态
- 收到的 Secure Network beacon 中的 IV Index(如0x00101849) 比已知的 IV Index(0x00101847) + 1 还大(即 大于 0x00101848),那么节点应该发起 Recovery procedure。
- 收到的 Secure Network beacon 中的 IV Index 等于已知的 IV Index +1 ,并且 IV Update Flag 等于 0, 那么节点应该执行一下任一操作:
1、不进入 IV Update 状态而是 直接更新IV Index。
2、进入 IV Index Recovery procedure。
3、忽略 Secure Network beacon。
- 收到的 Secure Network beacon 中的 IV Index 比已知的 IV Index + 42 还大 (0x01 + 42 = 43(0x2B),即 大于0x2B ),那么节点应该忽略 Secure Network beacon。
- 收到的 Secure Network beacon 中的 IV Index 比已知的 IV Index (如0x02)小,那么节点应该忽略Secure Network beacon。
注意:Mesh规范要求允许设备设备离开网络48周,大于48周的应该重新配网(reprovisioned)。
主子网络( primary subnet)节点收到次子网络(secondary
subnet )节点发送的 IV Index 大于主子网络的 IV Index,那么应该忽略 Secure Network beacon。
所有节点的 IV Update procedure 周期不得小于 192 小时。
After 96 hours of operating in Normal Operation, a node may initiate the IV Update procedure by transitioning to the IV Update in Progress state. When a node transitions from the Normal Operation state to the IV Update in Progress state, the IV Index on the node shall be incremented by one.
在Normal Operation 中运行 96 小时后,节点可以通过转换到 IV Update in Progress状态来启动 IV Update procedure。 当节点从Normal Operation状态转换到 IV Update in Progress 状态时,节点上的 IV Index 应增加 1。
IV Update in Progress 运行的时间在 96 ~ 144 小时之间。
A summary of the IV Update procedure is provided in
Table 3.57 below.
IV Index | IV Update Flag | IV Update Procedure State | IV Index Accepted | IV Index used when transmitting |
---|---|---|---|---|
n | 0 | Normal | n-1, n | n |
m (m=n+1) | 1 | In Progress | m-1, m | m-1 |
m | 0 | Normal | m-1, m | m |
IV Index | IV Update Flag | IV Update Procedure State | IV Index Accepted | IV Index used when transmitting |
---|---|---|---|---|
Beacon | Beacon | Beacon | Message | Message |
0x00101847 | 0 | Normal | 0x00101846, 0x00101847 | 0x00101847 |
0x00101848 | 1 | In Progress | 0x00101847, 0x00101848 | 0x00101847 |
0x00101848 | 0 | Normal | 0x00101847, 0x00101848 | 0x00101848 |