LoRa EU Rx
This sample demonstrates receiving packets over the LoRaWAN protocol. (For EU version.)
To make Raspberry Pi communicate with the LoRa module, you should swap the serial ports of the Raspbian OS. Set "/dev/ttyAMA0" to 'serial0'. Also, disable the console on 'serial0'. For a how-to, visit swapping the serial ports topic.
To run the sample:
Download the sample code from https://github.com/Turta-io/LoRaHAT/blob/master/Samples/Python/lora_eu_rx.py
Copy the sample code to a folder on the Raspberry Pi.
Open terminal, and then go to the folder you copied the sample.
Run the sample with the following command:
Sample Code
Result
When you run the sample, it prints the incoming data, if any, from the default radio frequency. When incoming data is captured, the example output should be like this:
To stop the Python script, just press CTRL + C.
Last updated