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:
{
xbee900HP.getOwnMacLow(); // Get 32 lower bits of MAC Address
xbee900HP.getOwnMacHigh(); // Get 32 upper bits of MAC Address
}
Related variables:
xbee900HP.sourceMacHigh[0-3] → stores the 32 upper bits of MAC address
xbee900HP.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:
Figure: MAC address

PAN ID

The Personal Area Network Identifier (PAN ID) is the Network ID. The user network identifier. Nodes must have the same network identifier to communicate. Only modules with matching IDs can communicate with each other so all the nodes in the same network must have the same PAN ID. If using OEM network IDs, 0xFFFF will use the factory value.
Parameter range: From 0 to 0x7FFF
Default: 0x7FFF
Example of use:
{
uint8_t panid[] = { 0x7F, 0xFF };
xbee900HP.setPAN(panid);
xbee900HP.getPAN();
}
Related variables:
xbee900HP.PAN_ID[0-7] → stores the 16-bit PAN ID. It is stored in the two first positions.
XBee configuration example:

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:
{
xbee900HP.setNodeIdentifier("node01");
xbee900HP.getNodeIdentifier();
}
Related variables:
xbee900HP.nodeID[0-19] → stores the 20-byte max string Node Identifier

Available frequencies

XBee 900HP defines 64 channels that are spaced 400 kHz apart:
  • 902-928MHz : 64 channels
Figure: Available frequencies for XBee 900HP
This read-only command can be queried to return a bitfield of the frequencies that are available in the module's region of operation. Each bit corresponds to a physical channel. Channels are spaced 400 kHz apart:
Bitfield
Frequency (MHz)
Bitfield
Frequency (MHz)
Bit 0
902.400
Bit 32
915.200
Bit 1
902.800
Bit 33
915.600
Bit 2
903.200
Bit 34
916.000
Bit 3
903.600
Bit 35
916.400
Bit 4
904.000
Bit 36
916.800
Bit 5
904.400
Bit 37
917.200
Bit 6
904.800
Bit 38
917.600
Bit 7
905.200
Bit 39
918.000
Bit 8
905.600
Bit 40
918.400
Bit 9
906.000
Bit 41
918.800
Bit 10
906.400
Bit 42
919.200
Bit 11
906.800
Bit 43
919.600
Bit 12
907.200
Bit 44
920.000
Bit 13
907.600
Bit 45
920.400
Bit 14
908.000
Bit 46
920.800
Bit 15
908.400
Bit 47
921.200
Bit 16
908.800
Bit 48
921.600
Bit 17
909.200
Bit 49
922.000
Bit 18
909.600
Bit 50
922.400
Figure: Available frequencies on XBee 900HP
Parameter range: From 0x1FFFFFF to 0x00FFFFFFFFFFFFFFFF
Default:
  • USA/Canada version → 0x00FFFFFFFFFFFFFFFF (channels 0 -- 63)
  • Australia version → 0x00FFFFFFFE00000000 (channels 33 -- 63)
  • Brazil version → 0x00FFFFFFFE00000FFF (channels 0 -- 11, 33 -- 63)
Example of use:
{
xbee900HP.getAvailableFreq();
}
Related variables:
xbee900HP._availableFreq[0-7] → stores the available frequencies bitfield

Channel mask

The channel mask command allows channels to be selectively enabled or disabled. This is useful to avoid using frequencies that experience unacceptable levels of RF interference. This command is a bitfield. Each bit in the bitfield corresponds to a frequency as defined in the "Available Frequencies" section. When a bit in the Channel Mask and the corresponding bit in the Available Frequencies are both set to 1 then that physical channel may be chosen by the module as an active channel for communication.
The minimum number of channels required for operation can be queried with the Minimum Frequencies (MF) command. If a Channel Mask setting would result in less than MF active channels being enabled, then an error will be returned. If there are more active channels enabled than required by MF, then the first MF frequencies will be used (higher active frequencies may be unused in favor of lower ones).
All modules in a network must use an identical set of active channels. Separate networks which are in physical range of each other should use different Preamble Patterns (HP) and/or Network ID's (ID) to avoid receiving data from the other network.
Parameter range: From 0x1FFFFFF to 0x00FFFFFFFFFFFFFFFF
Default: 0xFFFFFFFFFFF7FFFF
Channel 19 (910.000 MHz) is disabled by default. This channel has approximately 2 dBm worse receiver sensitivity than other channels. It is suggested not to use this channel.
The user must keep in mind that depending on the region, the XBee module supports different frequency channels. Although it is possible to enable all channels in the channel mask, the XBee module will be forced to use the available channels for the corresponding region. More precisely, the available frequencies for each region are:
Region
Bitfield
Channels
USA/Canada
0x00FFFFFFFFFFFFFFFF
0 – 63
Australia
0x00FFFFFFFE00000000
33 – 63
Brazil
0x00FFFFFFFE00000FFF
0 – 11, 33 – 63
Example of use:
{
uint8_t channelMask[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
xbee900HP.setChannelMask( channelMask );
xbee900HP.getChannelMask();
}
Related variables:
xbee900HP._channelMask[0-7] → stores the channel mask
XBee configuration example:

Minimum frequency count

This read-only command can be queried to determine the minimum number of channels that must be enabled with the Channel Mask command for proper operation in the module\'s region of operation.
Parameter range:
From 1 to 50
Default:
USA/Canada → 25
Australia → 25
Brazil → 25
Example of use:
{
xbee900HP.getMinFreqCount();
}
Related variables:
xbee900HP._minFreqCount → stores the minimum frequency count value
XBee configuration example:

Preamble ID

Only modules with matching preamble IDs can communicate with each other. Different preamble IDs minimize interference between multiple sets of modules operating in the same vicinity. When receiving a packet this is checked before the network ID, as it is encoded in the preamble, and the network ID is encoded in the MAC header.
Parameter range: From 0x00 to 0x07
Default: 0x00
Example of use:
{
xbee900HP.setPreambleID( 0x00 );
xbee900HP.getPreambleID();
}
Related variables:
xbee900HP._preambleID → stores the preamble ID
XBee configuration example: