First Steps with LoRa on Raspberry Pi
The MyPi LoRa card is based on the Microchip RN2483/RN2903 LoRa module, which is essentially a non-transparent narrow band RF transmitter capable of long range comms. In this example we will walk through an example of how to configure the MyPi LoRa card.
In addition to the LoRa IO card you will need an aerial pigtail cable connected up the RF output connector(s), these are marked HF for 868/915MHz band and LF for 433Mhz Band (which is only applicable to the RN2483 LoRa module).
You can read about the capabilities of the LoRa module here :
MicroChip LoRa Product Page
The following line needs to be added to /boot/config.txt (if not already there) to enable the hardware UART0 to appear on the correct pins for the adapter card :
dtoverlay=uart0,txd0_pin=32,rxd0_pin=33
This connects the LoRa module to /dev/ttyAMA0. GPIO line 42 is connected to the module /RESET line to allow a hard reset of the module if it becomes unresponsive.
Note that it's often useful to issue a reset to the LoRa module before first use on power up to ensure it's in a responsive state.
Note - the current firmware version of the Microchip LoRa module (1.01) does not require RTS/CTS flow control but these lines have been connected up so can be enabled using the uart0-full overlay if required.
The MicroChip Lora module has a few quirks, namely needing a CR and then LF at the end each serial command
For command line interaction with the LoRa module we don't recommend using minicom, mostly as you have to keep adding Ctrl-M Ctrl-J to the end of each command, instead install the following simple python terminal program :
# apt-get install python-serial
Then use :
# python -m serial.tools.miniterm -e -p /dev/ttyAMA0 -b 57600
By entering sys get ver and the module will respond with it's version number :
root@raspberrypi:~# python -m serial.tools.miniterm -e -p /dev/ttyAMA0 -b 57600 --- Miniterm on /dev/ttyAMA0: 57600,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- sys get ver RN2483 1.0.1 Dec 15 2015 09:38:09 sys get hweui 0004A30B001A97B7 --- exit --- root@raspberrypi:~#
If you enter a command it doesn't understand it will respond with invalid_param
For more info on next steps and see the links below here :
MicroChip LoRa Blog Post #1 - First Steps With LoRa
MicroChip LoRa Blog Post #2 - Setting Up A LoRa Network With Raspberry Pi 3
MicroChip LoRa Blog Post #3 - Setting Up A LoRa Network