Drogue IoT RAK811
A network driver for a RAK811 attached via a UART.
Currently requires the RAK811 to be flashed with a 2.x version of the AT firmware.
At first, the UART must be configured and handed to the driver. The uart must implement the embedded_hal::serial
traits.
Usage
let = uarte
.split
.unwrap;
let driver = new
.unwrap;
In order to connect to the gateway, the LoRa node needs to be configured with the following:
- Frequency band - This depends on where you live.
- Mode of operation - This can either be LoRa P2P which allows the node to send and receive data directly from another LoRa node, or LoRaWAN which connects the node to a gateway.
The driver can be used to configure the properties in this way:
driver.set_band.unwrap;
driver.set_mode.unwrap;
In addition, the following settings from the TTN console must be set:
- Device EUI
- Application EUI
- Application Key
driver.set_device_eui.unwrap;
driver.set_app_eui
// Secret generated by network provider
driver .set_app_key.unwrap;
To join the network and send packets:
driver.join.unwrap;
// Port number can be between 1 and 255
driver.send.unwrap;