Node parameters
When configuring a node, it is necessary to set some parameters which will be used lately in the network, and some parameters necessary for using the API functions.

MAC address

A 64-bit RF module's unique IEEE address. It is divided in two groups of 32 bits (High and Low).
It identifies uniquely a node inside a network due to it can not be modified and it is given by the manufacturer.
Example of use:
1
{
2
xbeeDM.getOwnMacLow(); // Get 32 lower bits of MAC Address
3
xbeeDM.getOwnMacHigh(); // Get 32 upper bits of MAC Address
4
}
Copied!
Related variables:
1
xbeeDM.sourceMacHigh[0-3] // stores the 32 upper bits of MAC address
2
xbeeDM.sourceMacLow [0-3] // stores the 32 lower bits of MAC address
Copied!
Besides, XBee modules provide a sticker on the bottom side where the MAC address is indicated. MAC addresses are specified as 0013A200xxxxxxxx.
Figure : MAC adress

PAN ID

A 16-bit number that identifies the network. It must be unique to differentiate a network. All the nodes in the same network should have the same PAN ID.
Example of use:
1
{
2
uint8_t panid[2]={0x33,0x31}; // array containing the PAN ID
3
xbeeDM.setPAN(panid); // Set PANID
4
xbeeDM.getPAN(); // Get PANID
5
}
Copied!
Related variables:
1
xbeeDM.PAN_ID[0-1] → stores the 16-bit PAN ID
Copied!

Node identifier

It is an ASCII string of 20 characters at most which identifies the node in a network. It is used to identify a node in the application level. It is also used to search a node using its NI.
Example of use:
1
{
2
xbeeDM.setNodeIdentifier("node01");
3
xbeeDM.getNodeIdentifier();
4
}
Copied!
Related variables:
1
xbeeDM.nodeID[0-19] // stores the 20-byte max string Node Identifier
Copied!

Channel

This parameter defines the frequency channel used by the module to transmit and receive.
When working on 2.4 GHz band, DigiMesh defines 16 channels to be used, 12 of them are available in this hardware version:
    2.405-2.465 GHz : 12 channels
Figure : Operating frequency bands on 2.4 GHz
Channel Number
Frequency
0x0C -- Channel 12
2,405 -- 2,410 GHz
0x0D -- Channel 13
2,410 -- 2,415 GHz
0x0E -- Channel 14
2,415 -- 2,420 GHz
0x0F -- Channel 15
2,420 – 2,425 GHz
0x10 -- Channel 16
2,425 – 2,430 GHz
0x11 -- Channel 17
2,430 – 2,435 GHz
0x12 -- Channel 18
2,435 – 2,440 GHz
0x13 -- Channel 19
2,440 – 2,445 GHz
0x14 -- Channel 20
2,445 – 2,450 GHz
0x15 -- Channel 21
2,450 – 2,455 GHz
0x16 -- Channel 22
2,455 – 2,460 GHz
0x17 -- Channel 23
2,460 – 2,465 GHz
Figure: Channels frequency numbers on 2.4 GHz
Example of use:
1
{
2
xbeeDM.setChannel(0x0C);
3
xbeeDM.getChannel();
4
}
Copied!
Related variables:
1
xbeeDM.channel // stores the operating channel
Copied!

Network hops

It specifies the (NH) maximum number of hops expected to be seen in a network route. This value does not limit the number of hops allowed, but it is used to calculate timeouts waiting for network acknowledgments. Parameter range: 1 to 0xFF. Default: 0x07.
Example of use:
1
{
2
xbeeDM.setNetworkHops(0x07);
3
xbeeDM.getNetworkHops();
4
}
Copied!
Related variables:
1
xbeeDM.networkHops // stores the number of hops selected
Copied!

Network delay slots

It specifies the (NN) maximum random number of network delay slots before rebroadcasting a network packet. One network delay slot is approximately 13 ms. Parameter range: 0 to 0x0A. Default: 0x03.
Example of use:
1
{
2
xbeeDM.setNetworkDelaySlots(0x03);
3
xbeeDM.getNetworkDelaySlots();
4
}
Copied!
Related variables:
1
xbeeDM.netDelaySlots // stores the number of delay slots
Copied!

Mesh network retries

It specifies the (MR) maximum number of network packet delivery attempts. If MR is non-zero, packets sent will request a network acknowledgment, and can be resent up to MR+1 times if no acknowledgments are received. Parameter range: 0 to 7. Default: 1.
Example of use:
1
{
2
xbeeDM.setMeshNetworkRetries(0x01);
3
xbeeDM.getMeshNetworkRetries();
4
}
Copied!
Related variables:
1
xbeeDM.meshNetRetries // stores the number of network packet delivery attempts
Copied!
Last modified 1yr ago