DigiMesh Networking Guide
Power gain and sensitivity
Synchronizing the network
Security and data encryption
Code examples and extended information
Before starting to use a module, it needs to be initialized. During this process, the UART to communicate with the module has to be opened and the XBee switch has to be set on.
function initializes all the global variables, opens the correspondent UART and switches the XBee on. The baud rate used to open the UART is defined on the library (115200 bps by default).
It returns nothing.
The initialized variables are:
: specifies the protocol used (DIGIMESH in this case).
: specifies the position to use in received packets.
: specifies the options in Node Discovery.
: specifies the time to be awake before go sleeping.
: specifies the time to be sleeping.
: specifies the channels to scan.
: specifies the time to scan each channel.
: specifies the time the channels will be scanned.
: specifies if encryption mode is enabled.
: specifies the power transmission level.
: specifies the time RSSI LEDs are on.
: specifies the options for sleeping.
: specifies the maximum number of hops expected to be seen in a network route.
: specifies the maximum random number of network delay slots before rebroadcasting a network packet.
: specifies the maximum number of route discovery retries allowed to find a path to the destination node.
: specifies the maximum number of network packet delivery attempts.
Example of use:
The OFF() function closes the UART and switches the XBee off.
Example of use: