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. It is used in 64- bit unicast transmissions.

Example of use:

{
xbee802.getOwnMacLow(); // Get 32 lower bits of MAC Address
xbee802.getOwnMacHigh(); // Get 32 upper bits of MAC Address
}

Related variables:

xbee802.sourceMacHigh[0-3] // stores the 32 upper bits of MAC address
xbee802.sourceMacLow [0-3] // stores the 32 lower bits of MAC address

Besides, XBee modules provide a stick on the bottom side where the MAC address is indicated. MAC addresses are specified as 0013A200xxxxxxxx.

Figure : MAC adress (XBee 3 802.15.4)

Network address

A 16-bit Network Address. It identifies a node inside a network, it can be modified at running time. It is used to send data to a node in 16-bit unicast transmissions.

Example of use:

{
xbee802.setOwnNetAddress(0x12,0x34);
xbee802.getOwnNetAddress();
}

Related variables:

xbee802.sourceNA[0-1] // stores the 16-bit network address

PAN ID

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:

{
uint8_t panid[2]={0x33,0x31};
xbee802.setPAN(panid);
xbee802.getPAN();
}

Related variables:

xbee802.PAN_ID[0-1] // stores the PAN ID
xbee802.PAN_ID[0-7] // stores the 16-bit PAN ID. It is stored in the two first positions.

• XBee configuration example: https://development.libelium.com/802-01-configure-xbee-parameters/

Node identifier

It is an ASCII string of 20 character 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:

{
xbee802.setNodeIdentifier("node01");
xbee802.getNodeIdentifier();
}

Related variables:

xbee802.nodeID[0-19] // stores the 20-byte max string Node Identifier

Channel

This parameter defines the frequency channel used by the module to transmit and receive.

802.15.4 defines 12 channels to be used.

  • 2.405-2.465 GHz : 12 channels

This module works in 2.4 GHz band, having 12 channels with a 5 MHz bandwidth per channel.

Figure : Frequency channels in the 2.4 GHz band

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: Channel frequency numbers

Example of use:

{
xbee802.setChannel(0x0D);
xbee802.getChannel();
}

Related variables:

xbee802.channel // stores the operating channel

XBee configuration example: https://development.libelium.com/802-01-configure-xbee-parameters/