我使用的是1.2.2a的协议栈,写死了panid。现在想实现协调器上电后判断网络是否建立,如果已经建立则自动切换为路由加入网络,否则创建网络。请问要怎么实现?
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.
我使用的是1.2.2a的协议栈,写死了panid。现在想实现协调器上电后判断网络是否建立,如果已经建立则自动切换为路由加入网络,否则创建网络。请问要怎么实现?
你可以在发现:
/*********************************************************************
* @fn ZDApp_CoordStartPANIDConflictCB()
*
* @brief Returns a PAN ID for the network layer to use during
* a coordinator start and there is another network with
* the intended PANID.
*
* @param panid - the intended PAN ID
*
* @return PANID to try
*/
uint16 ZDApp_CoordStartPANIDConflictCB( uint16 panid )
{
return ( panid + 1 );
}