ZDO NWK DISCOVERY REQ

=Description= This command allows a device to initiate a network scan. This will search each specified channel to see if there is a Zigbee network on that channel.

You will receive in response a ZDO_BEACON_NOTIFY_IND containing information about the network(s) found, if any, followed by a ZDO_NWK_DISCOVERY_CNF when the scan is complete.

'''Note: the scan will interrupt normal network operation for this node (since it needs to switch channels) so you must leave the network first. See ZDO_MGMT_LEAVE_REQ.'''

=Library Function= Library function since version 1653.

zdoNetworkDiscoveryRequest(uint32_t channelMask, uint8_t scanDuration) in zdo.c

=Usage=

Fields:
 * Scan Channels: A channel mask of which channels to scan. The more channels scanned, the longer it will take.
 * Scan Duration: How long to scan each channel. Refer to zdo.h for scan duration codes.

Fields:
 * Status: 0 if success, else an error code. Error codes include:
 * 0x02 – Invalid Parameter
 * 0xC2 – ZNwkInvalidRequest. if the device is already on a network. User ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request.
 * 0xFC – MAC_SCAN_IN_PROGRESS if a channel change is in progress.
 * 0x1A – MAC_NO_RESOURCE if the operation could not complete because no memory resource were available