入网和退网函数都有,没有找到恢复原网络的函数,我用了下面两段代码,不过好像没有达到我想要的效果。
devState =DEV_NWK_REJOIN;
ZDApp_NetworkInit( 0 );
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.
入网和退网函数都有,没有找到恢复原网络的函数,我用了下面两段代码,不过好像没有达到我想要的效果。
devState =DEV_NWK_REJOIN;
ZDApp_NetworkInit( 0 );
您跟踪一下ZDOInitDevice 函数中ZDApp_RestoreNetworkState返回值是什么?另外您是不是开启了Trust center link key,因为只有协调器是trust center,其他设备不是trust center, 所以当终端入网时协调器必须在网络
-DSECURE=1
-DZG_SECURE_DYNAMIC=0
uint8 zgPreConfigKeys = TRUE;
因为加密而改动的
我的想法是终端通讯失败就直接进入低功耗。而不是一直在哪里寻找网络。这个可以实现么。