Zigbee协调器相关问题
Zigbee如何自动识别网内有没有协调器,没有再把自己作为协调器...
如果是协调器,将会自建网络。
你需要在节点编译的时候吧Coordinator和Router两种类型都编译进去。
To configure the device as either a router or a coordinator, you need to ensure that you have the following lines defined. Typically these lines are defined in the files f8wCoord.cfg which should be included in the IAR--> (tab)Project--> Options, C/C++ compiler tab Extra Options.
You will need to set zgDeviceLogicalType according to the required logical type (ZG_DEVICETYPE_COORDINATOR, or ZG_DEVICETYPE_ROUTER before calling the ZDOInitDevice() function to start the device.
/* Coordinator Settings */
-DZDO_COORDINATOR // Coordinator Functions
-DRTR_NWK // Router Functions
接下来你要去网络发现的时候对收到beacon做判断,是否是0x0000发出来的
void ZDO_beaconNotifyIndCB( NLME_beaconInd_t *pBeacon )