zigbee-shepherd icon indicating copy to clipboard operation
zigbee-shepherd copied to clipboard

checkOnline in controller ZMemError

Open splitice opened this issue 7 years ago • 2 comments

There is a function in controller.js _checkOnline which attempts by way of iteration of the database to determine what devices are online and joined to the network. The node descriptor request in this function always returns 0x10 - 0x11 corresponding to ZMemError & ZBufferFull which ensures the devices are never detected and hence marked as online.

This is using the ZNP build from Zigbeer.

splitice avatar May 09 '17 06:05 splitice

I slowed the querying down and now most of the time it returns with a status code of 0, still ZNP online devices time out. & I can see with a packet sniffer that no node description request is actually being sent by the coordinator dongle.

Route Request packets do go out for those devices which are not on the network however. Those on the network are sent no packets.

splitice avatar May 09 '17 07:05 splitice

Ok,

so there is two bugs in this function:

  1. Performing all of these (and anything else going on in the background, which is quite alot during initialization) at once results in memory exhaustion on the dongle.

  2. The timeout of 5s is insufficient for devices that sleep. In fact the devices I tested never return when queried here. If the device is not allowed to sleep during init, i.e for an IAS sensor if it is being toggled throught init then it does respond. ' I propose replacement of this method with an LQI based query to the routers in the network. This way the sleeping end devices are not involved.

splitice avatar May 10 '17 06:05 splitice