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.

关于协调器重新上电PanId改变问题



   您好,现在我的网络里面有1个协调器和1个路由器(均编译了NV_INIT和NV_RESTORE),运行的程序是SerialApp,PanId是2,Chanel 0x0B,如果协调器先上电建立网络,然后路由器上电加入网络,双方串口发数据,均能正常接收,现在协调器重新上电,路由器一直工作,这时候发现协调器的PanId为3,加入不到原有的网络中;如果关掉路由器,协调器在重新上电,PanId为2,路由器在上电,还是可以正常收发数据;问题是我编译了NV_RESTORE和NV_INIT的,现在的解决办法是修改了下面的函数:

uint16 ZDApp_CoordStartPANIDConflictCB( uint16 panid )

{

#if defined ( NV_RESTORE )   

    return ( panid + 0 );

#else 

    return ( panid + 1 );

#endif

}

这样在路由器不掉电的情况下协调器重新上电后还能加入原有的网络,请告知问题的原因,谢谢!!!