Zigbee end device bound to another device always issues broadcasts to resolve the short network address based on target's MAC

Hi,

I tried searching public question on the matter and wasn't able to find anything reminiscent of the problem I have.

I'm developing a presence sensor using ZigBee protocol for communications. The device is an end device. Among other things it implements a client on/off cluster

for the purposes of direct binding and sending on/off commands directly to appliances (smart lights, smart sockets, etc.).

In principle it works and in a small testing network (2 devices: the said presence sensor and a smart socket) binding my presence sensor to a smart socket works without problems.

However when I tried for testing purposes adding the presence sensor to a much bigger zigbee network (90+ devices: 37 routers, 55 end devices) the results were highly mixed.

When bound to one of smart sockets, the binding seems to work, on/off commands are issued, received and executed in a timely manner with an acceptable minimal latency.

However in another case binding to a smart bulb although succeeds in terms of a binding operation, when it comes to an actual transmission of on/off commands the outcome is highly unreliable:

it works sometimes, much more often a really big delay happens.

I've used Wireshark to sniff the traffic that's happening and was able to conclude that said delays are there due to my presence sensor sending "ZigBee Device Profile: Network Address Request" broadcast requests always to determine a short network address of the target smart bulb. Smart bulb responses with own address as requested. However shortly after (say, when 'Off' command is sent after presence is no more detected), it sends again the same set of broadcast requests to figure out the network address it literally got just half a minute ago.

This suggests that for whatever reason it doesn't store the translation for MAC->address in the address table. The only "workaround" I have at the moment is to add my presence sensor device directly via the smart bulb I want to control, so that it's a direct parent node in the mesh. Then the commands are issued with a valid short address immediately without sending tons of broadcast requests.

I've tried "turning the knobs" like:

#define ZB_CONFIG_OVERALL_NETWORK_SIZE 100 
#define ZB_CONFIG_HIGH_TRAFFIC
#define ZB_CONFIG_APPLICATION_COMPLEX

#include <zb_mem_config_common.h>

#undef ZB_CONFIG_IOBUF_POOL_SIZE
#define ZB_CONFIG_IOBUF_POOL_SIZE 128
#undef ZB_CONFIG_SCHEDULER_Q_SIZE
#define ZB_CONFIG_SCHEDULER_Q_SIZE 64
#undef ZB_CONFIG_APS_DUPS_TABLE_SIZE
#define ZB_CONFIG_APS_DUPS_TABLE_SIZE 64
#define ZB_CONFIG_NWK_DISC_TABLE_SIZE 32U

but this doesn't seem to help.

What am I missing? Is there some other setting I could tweak?

I'm using ZigBee R23 Add-on, 1.2.1

if that matters.

Thanks!  

Related