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.

请教 ZDP_MgmtPermitJoinReq 用法!

请教一下我现在想实现协调器上面通过一个按键来实现,终端和路由在一定的时间内可以加入协调器

//事件按键处理
void GenericApp_HandleKeys( uint8 shift, uint8 keys )
{
  (void)shift;  // Intentionally unreferenced parameter
  
  if ( keys & HAL_KEY_SW_6 )
  {
     //   LED_D2=~LED_D2;
  }

  if ( keys & HAL_KEY_SW_5 )
  {

   zAddrType_t dstAddr;
    LED_D2=~LED_D2;
    // enable permit joining on all routers
/*
  dstAddr.addrMode = AddrBroadcast;
  dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVZCZR;            
  ZDP_MgmtPermitJoinReq(&dstAddr, 0xFF, 1, FALSE);            
*/

  // disable permit joining on all routers
  dstAddr.addrMode = AddrBroadcast;
  dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVZCZR;            
  ZDP_MgmtPermitJoinReq(&dstAddr, 0x00, 1, FALSE);
    
  }

1、在协调器下载程序后我触发按键中断,LED_D2灯亮起,然后我给终端和路由上电可是我的路由和终端还是加到了

我的协调器里面了,请问一下是不是我哪里设置错了

2、还有我想协调器刚上电就不让终端和路由加入协调器

3、现在我的协调器里面我已经加了NV_RESTORE