This util sends encrypted lorapackets to the network server using the semtech udp-protocol.
-
Install the dependencies:
pip3 install -r requirements.txt
-
Clone the repository
-
Set the required environment variables in the file src/example.env and rename it to ".env"
-
Execute main.py with command line parameters:
usage: main.py [-h] [-v] [-d] message fcnt positional arguments: message message to be sent as a hex string fcnt current framecount optional arguments: -h, --help show help message and exit -v, --verbosity increase output verbosity -d, --dryrun generate the UDP message without sending it
Example usage:
cd src ./main.py "01AB" 123 -v
The program will then:
- encrypt the provided message/payload
- calculate the MIC (Message Integrity Code),
- construct the PHYPayload,
- encode it to base64,
- construct the UDP PUSH_DATA message,
- send the UDP datagram to the specified IP address and port using UDP. (unless the command line parameter "-d" or "--dryrun" is passed)
- A lot of parameters that can be individually set in PHYPayload or the UDP message have been hardcoded to be equal to observed parameters in our testbed. Future versions of this tool might make this further customizable.
- LoraWAN specification
- Lora-net/packet_forwarder