Other Parts Discussed in Thread: CC2530
请教一下,TI的工程师。
同一个网络下,只有一个协调器,那如果同一个环境下,有两个协调器。 终端加入那个网络?
是进行能量扫描, 加入最近的一个协调器吗?
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.
您可以参考ZigBee Home Automation Specification的Chapter8. http://zigbee.org/Standards/ZigBeeHomeAutomation/download.aspx
EZMODE 是ZigBee网络里面Commission的一种方式。
具体你可以参考以下几个文档
1)C:\Texas Instruments\Z-Stack Home 1.2.0\Documents\Z-Stack Home Developer's Guide.pdf
2)C:\Texas Instruments\Z-Stack Home 1.2.0\Documents\Z-Stack Home Sample Application User's Guide.pdf
3)ZigBee Home Automation Profile Specification http://www.zigbee.org/zigbee-for-developers/applicationstandards/zigbeehomeautomation/ 在页面底部注册后可以下载
在f8wconfig.cfg文件中
/* Define the default PAN ID.
*
* Setting this to a value other than 0xFFFF causes
* ZDO_COORD to use this value as its PAN ID and
* Routers and end devices to join PAN with this ID
*/
-DZDAPP_CONFIG_PAN_ID=0xFFFF
您可以设置自己的PANID,0xFFFF是随机PANID
修改入网机制,协调器拒绝Associate Request,这样可以让所有协调器收到所有节点的Associate Request。然后再根据Associate Request带的IEEE地址,指定哪些协调器允许哪些设备入网。
我可以帮你搞定这个,加我QQ 786416271。
你好, Susan Yang 。
如果万一 A家设备节点 加入了B家协调器的网络, 我在A设备节点上 按键, 让其主动离开 B协调器组建的网络, 重新搜索网络使其正确联网。 并且B协调器 NLME_PermitJoiningRequest(0) 禁止。 你看这样可以吗? 期待你的回复。
主动离开协调器网络
void Meter_Leave(void)
{
NLME_LeaveReq_t leaveReq;
osal_memset((uint8 *)&leaveReq,0,sizeof(NLME_LeaveReq_t));
osal_memcpy(leaveReq.extAddr,NLME_GetExtAddr(),Z_EXTADDR_LEN);
leaveReq.removeChildren = 1;
leaveReq.rejoin = 0;
leaveReq.silent = 0;
NLME_LeaveReq( &leaveReq );
}
使用了NV_RESTORE后, 如果联网错误。 A家设备 联上了 B家协调器。 该怎么纠正这个错误?
1、修改ZCD_NV_STARTUP_OPTION的值,重新加入其他协调器
zgWriteStartupOptions(ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE)
2、主动退出现在的网络, 重新加入其他协调器。
NLME_LeaveReq_t tmp_LeaveReq;
tmp_LeaveReq.removeChildren = FALSE;
tmp_LeaveReq.rejoin = FALSE;
tmp_LeaveReq.extAddr = NULL;
NLME_LeaveReq(&tmp_LeaveReq);
或者是用其他方法?
您可以先看一下官方说明
"If the application would like to force a "new" join, the application should set the ZCD_STARTOPT_DEFAULT_NETWORK_STATE bit in the ZCD_NV_STARTUP_OPTION NV item before calling this function. "New" join means to not restore the network state of the device. Use zgWriteStartupOptions() to set these options [zgWriteStartupOptions(ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE);]."
zGlobals.c中有这两个函数,第二个就是上面所用的函数
uint8 zgReadStartupOptions( void ) //启动时读取ZCD_NV_STARTUP_OPTION的值
uint8 zgWriteStartupOptions( uint8 action, uint8 bitOptions ) //修改ZCD_NV_STARTUP_OPTION的值