ZigBee Link Status 理解

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21352095/article/details/84404973

以下内容摘自ZigBee 2015 Pro文档《docs-05-3474-21-0csg-zigbee-specification》
3.6.3.4 Link Status Messages
Wireless links may be asymmetric, that is, they may work well in one direction but not the other. This can cause route replies to fail, since they travel backwards along the links discovered by the route request.For many-to-one routing and two-way route discovery (nwkSymLink = TRUE), it is a requirement to discover routes that are reliable in both directions. To accomplish this, routers exchange link cost measurements with their neighbors by periodically transmitting link status frames as a one-hop broadcast. The reverse link cost information is then used during route discovery to ensure that discovered routes use high-quality links in both directions.

译:
3.6.3.4链路状态消息
无线链路可以是不对称的,也就是说,它们可以在一个方向上工作但在另一个方向上不能工作。 这可能导致路由回复失败,因为它们沿着路由请求发现的链路向后传播。对于多对一路由和双向路由发现(nwkSymLink = TRUE),需要发现可靠的路由 在两个方向。 为实现此目的,路由器通过周期性地发送链路状态帧作为单跳广播来与其邻居交换链路成本测量。 然后在路由发现期间使用反向链路成本信息,以确保发现的路由在两个方向上使用高质量链路。

在Z-Stack 3.0.2的定义
typedef struct
{
uint8 txCounter; // Counter of transmission success/failures
uint8 txCost; // Average of sending rssi values if link staus is enabled
// i.e. NWK_LINK_STATUS_PERIOD is defined as non zero
uint8 rxLqi; // average of received rssi values
// needs to be converted to link cost (1-7) before used
uint8 inKeySeqNum; // security key sequence number
uint32 inFrmCntr; // security frame counter…
uint16 txFailure; // higher values indicate more failures
} linkInfo_t;

在抓包中,我们可以开到的信息有:
link status

  1. txCost:
    Average of sending rssi values if link staus is enabled, i.e. NWK_LINK_STATUS_PERIOD is defined as non zero.Average of sending rssi values if link staus is enabled, i.e. NWK_LINK_STATUS_PERIOD is defined as non zero.

  2. rxLqi:
    average of received rssi values, needs to be converted to link cost (1-7) before used

  3. 在上图中,该路由的Link Status只有一个邻居0x0000,Outgoing cost:它到0x0000的link cost为1,Incoming cost:0x0000到它的link cost也是为1。
    这两个数据都是根据LQI来计算的,也就是说间接的反映了链路接收质量。1代表最好,7代表最差,0代表没有记录。

  4. Each link status entry contains the network address of a router neighbor:表明Link Status只包含邻居表中的Router,Coordinator信息。

  5. 路由广播Link Status 的默认周期为15s,一般不用改动,因为广播半径为1(在其信号范围内路由可以接收到,但不会转发),不会对网络造成很大影响,除非将很多路由放在空间很小的地方。

猜你喜欢

转载自blog.csdn.net/qq_21352095/article/details/84404973