zigbee3.0(Z-Stack 3.0.2)入网和退网求助

在z-stack-3.0.2,
终端使用以下函数退网
     NLME_LeaveReq_t leaveReq;
     // Set every field to 0
     osal_memset( &leaveReq, 0, sizeof( NLME_LeaveReq_t ) );
     leaveReq.removeChildren = 1;
     leaveReq.rejoin = 1;
     leaveReq.extAddr=NULL;
     leaveReq.silent = FALSE;        

     // Leave the network, and reset afterwards
     NLME_LeaveReq( &leaveReq );                                  
     if ( NLME_LeaveReq( &leaveReq ) != ZSuccess )
     {
       // Couldn't send out leave; prepare to reset anyway
       ZDApp_LeaveReset( FALSE );
     } 
当                           leaveReq.rejoin = 1;时不能进入其他协调器的网络,                          leaveReq.rejoin = 0时不能进入原来协调器的网络
协调器是用  以下函数进行建网的
bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_FORMATION | BDB_COMMISSIONING_MODE_FINDING_BINDING);
  NLME_PermitJoiningRequest(0xff);


终端是用以下函数入网
bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING | BDB_COMMISSIONING_MODE_FINDING_BINDING);

有什么方法既可以进入其他协调器的网络,又可以进入原来协调器的网络,应怎么配置?

8 个回复