Node Discovery
XBee modules provide some features for discovering and searching nodes.
Structure used in discovery
Discovering nodes is used to discover and report all modules on its current operating channel and PAN ID.
To store the reported information by other nodes, a structure called 'Node' has been created. This structure has the next fields:
MY
: 16-bit Network Address of the reported moduleSH[4]
andSL[4]
: 64-bit MAC Source Address of the reported moduleNI
: Node Identifier of the reported modulePMY
: Parent 16-bit network address. It specifies the 16-bit network address of its parentDT
: Device Type (Not used in 802.15.4)ST
: Status (Reserved)PID
: Profile ID. Profile ID used to application layer addressingMID
: Manufacturer ID. ID set by the manufacturer to identify the moduleRSSI
: RSSI of last hop
To store the found brothers, an array called scannedBrothers
has been created. It is an array of structures Node
. To specify the maximum number of found brothers, it is defined a constant called MAX_BROTHERS
. It is also a variable called totalScannedBrothers
that indicates the number of brothers that have been discovered. Using this variable as index in the scannedBrothers
array, it will be possible to read the information about each node discovered.
Example of use:
Related variables:
Scan network example: https://development.libelium.com/dm-10-scan-network/
Searching specific nodes
Another possibility for discovering a node is searching for a specific one. This search is based on using the Node Identifier. The NI of the node to discover is used as the input in the API function responsible of this purpose.
Example of use:
Related variables:
Node search example: https://development.libelium.com/dm-11a-node-search-tx/ https://development.libelium.com/dm-11b-node-search-rx/
Node discovery to a specific node
When executing a Node Discovery all the nodes respond to it. If its Node Identifier is known, a Node Discovery using its NI as an input can be executed.
Example of use:
Related variables:
Node Discovery Time
It is the amount of time (NT) a node will wait for responses from other nodes when performing a ND. Range: 0X20 to 0X2EE0 [x100 ms]. Default value: 0x0082.
Example of use:
Available information:
Last updated