Figure: XBee 868LP
Figure : Available frequencies for XBee 868LP
Encryption is provided through the AES 128 bits algorithm. Specifically through the type AES-CTR. In this case the Frame Counter field has a unique ID and encrypts all the information contained in the Payload field which is the place in the link layer frame where the data to be sent is stored.
The way in which the libraries have been developed for module programming means that encryption activation is as simple as running the initialization function and giving it a key to use in the encryption.
The classic topology for this type of network is Star topology, as the nodes can establish point to point connections with brother nodes through the MAC address.
Figure: Star topology
This module can be connected to both SOCKET0 and SOCKET1 on the Waspmote board.
Figure : Module connected to Waspmote in SOCKET0
In order to connect the module to the SOCKET1, the user must use the Expansion Radio Board.
The Expansion Board allows to connect 2 communication modules at the same time in the Waspmote sensor platform. This means a lot of different combinations are possible using any of the wireless radios available for Waspmote: 802.15.4, ZigBee 3, DigiMesh, 868 MHz, 900 MHz, LoRa, WiFi, NB-IoT / Cat-M, 4G, Sigfox, LoRaWAN, Bluetooth Pro, Bluetooth Low Energy and RFID/NFC. Besides, the following Industrial Protocols modules are available: RS-485/Modbus and CAN Bus.
Some of the possible combinations are:
- LoRaWAN - 4G
- 802.15.4 - Sigfox
- 868 MHz - RS-485
- NB-IoT / Cat-M - WiFi
- DigiMesh - 4G
- NB-IoT / Cat-M - RFID/NFC
- WiFi - 4G
- CAN Bus - Bluetooth
In the next photo you can see the sockets available along with the UART assigned. On one hand, SOCKET0 allows to plug any kind of radio module through the UART0. On the other hand, SOCKET1 permits to connect a radio module through the UART1.
Figure: Use of the Expansion Board
The API provides a function called
ON()in order to switch the XBee module on. This function supports a parameter which permits to select the SOCKET. It is possible to choose between
Selecting SOCKET0 (both are valid):
In the case 2 XBee 868LP modules are needed (each one in each socket), it will be necessary to create a new object from WaspXBee868LP class. By default, there is already an object called xbee868LP normally used for regular SOCKET0.
In order to create a new object it is necessary to put the following declaration in your Waspmote code:
WaspXBee868LP xbee868LP_2 = WaspXBee868LP();
Finally, it is necessary to initialize both modules. For example, xbee868LP is initialized in SOCKET0 and xbee868LP_2 in SOCKET1 as follows:
The rest of the functions are used the same way as they are used with older API versions. In order to understand them we recommend to read this guide.