Node parameters

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

Node address

Each module must have a unique address of 8 bits.

It identifies uniquely a node inside a network. It is necessary to assign the address value each time the module is set on.

The node address 0 and the node address 1 are reserved to broadcast communication and to the network central node respectively. In order to respect this, users must assign the node address 1 to the module in the central node and node addresses from 2 to 255 to all the other nodes in their network. That means a network will consist of:

  • 1 central node. Address value equal to 1

  • Up to 254 nodes. Address values from 2 to 255

The user must not assign the node address 0 to any node since it is reserved to indicate the module we want to perform a broadcast transmission.

Example of use:

{
    sx1272.setNodeAddress(2); // Set the Node address into REG_NODE_ADDRESS register
    sx1272.getNodeAddress(); // Get the assigned Node address
}

Related variables:

sx1272._nodeAddress → stores the Node address

The module rejects packets destined to other nodes, although it is actually receiving all the packets in the network while it is in receiving state.

Frequency band

There are two frequency bands available to work with this module, 868 MHz and 900 MHz ISM bands. Depending on the country the user is located, one or the other will be chosen. Inside each frequency band there are several channels, so the user can choose among them.

Note: To know what band is legal in your country, please check the ITU region map. Region 1 ISM free band is 868 MHz and Region 2 ISM free band is 900 MHz. You must also check the legal restrictions by region to use the proper configuration and channel. It is the responsibility of the users to know the allowed frequency band and channels in their country, and use them. Ignoring this, could lead to considerable penalties.

Channel

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

There are 8 channels defined to be used in the 868 MHz band and 13 channels to be used in the 900 MHz band. They can be observed in the following figures.

Figure: Channels used by the LoRa module in 868 MHz and 900 MHz

Example of use:

{
    sx1272.setChannel(CH_00_900); // Set channel
    sx1272.getChannel(); // Get Channel
}

Related variables:

sx1272._channel → stores the operating channel

SX1272 configuration example:

Last updated