This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

父节点如何查询子节点已经掉线?

我先在要完成如下功能:一个路由设备(带LCD)3个终端设备(无LCD)。有两个问题想请教一下

1、3个终端设备组网成功后,发送数据给路由设备,然后路由设备的LCD分别显示3个终端已经组网成功。这个已经实现

‘2、’现在想实现路由设备检测三个设备是否已经掉网,这个该怎么实现?

3、如果3个终端设备进入低功耗模式,路由设备刚好超出通信范围,此时路由设备,怎么检测3个设备已经脱离网络?

  • 通过child aging可以实现,请问你使用的zstack版本是什么?zigbee3.0默认开启child aging
  • 协议栈版本是zstack 3.0.2
    我想获取这个child aging,但是不知道该怎么实现,有专用的API么?或者有没有相关的文档?
    终端在休眠状态下child aging也适用么?
  • 我想在child aging添加自己的自定义应用,比如用LCD显示是三个设备中的哪个已经入网,哪个已经退网。应该改哪个地方?
  • 参见ZGlobals.c
    //======= Child Aging PARENT ROUTER (ZR/ZC) configuration ========
    // You can setup a router to support Child Table Aging in 1 of 2 modes of
    // operation. The first mode is NWK_PARENT_INFO_ORPHAN_NOTIFICATION and it
    // expects end devices to use orphan scan periodically as a means of a keep-alive
    // notification to the parent. The other mode is NWK_PARENT_INFO_MAC_DATA_POLL
    // which uses the end device's MAC POLL request as the keep-alive notification.
    // The first method is preferred for new devices, where the end devices provide
    // support for it (which will be manditory in future Zigbee Home Automation
    // Specifications).
    // The second method is compatible with older end devices without the need for
    // specific child aging support.
    //
    // The method supported by the router (or coordinator) is determined at build time
    // by setting zgNwkParentInformation to either NWK_PARENT_INFO_ORPHAN_NOTIFICATION
    // or NWK_PARENT_INFO_MAC_DATA_POLL.
    //
    // End device built with Child Table Aging support both methods, the method is
    // determined by the parent and communicated at run-time.
  • 一般建議终端设备定時發送heartbeat訊息到你要检测设备是否已经掉网的路由设备,如果路由设备一段時間都沒收到终端设备定時發送heartbeat訊息就判定设备已经脱离网络
  • 发送heatbeat讯息是自己在应用层实现么?
  • 我想让终端设备尽可能的降低功耗,这种方法会导致终端功耗提高。
    如果用Child Aging方式,也是终端间隔一定时间发送一次data,路由设备间隔一段时间检测是否收到这个data么?
  • Child Aging方式是终端间隔一定时间polling或是发送一次data都算,但路由设备無法检测是否收到polling,所以我不認為Child Aging適合作為這樣的用途
  • 1、路由设备无法检测是否收到polling的理解
    Child Aging方式中路由设备是一段时间检测是否收到data或者polling,如果检测达到了就开启新一轮检测。如果未检测到就认为是丢失了。
    这个方式和heatbeat的原理是不是一样的?还是我理解错了。
  • 原理是一样,差別在Child Aging用到的polling檢查,你的應用程序沒辦法作到