The Unofficial Manual
How to get your RisingHF RHF0M301 LoRa/LoRaWAN gateway kit up and running on the Loriot cloud application.
(Note: this is not an authorized manual so use at your own risk. This worked for me but I am not responsible if it causes any of your equipment to break or fail.)
Specifically, this page is for the Seeed Studio version of the 915 MHz kit, SKU 110060623. The Seeed Studio is a modified version of the RisingHF RHF2S001 IoT Discovery Kit. Seeed does not include the RHF3M076 LoRaWAN AT modem end point nor the three RHF76-052 – STM32L0 + SX1276 node sensor modules. The USB to UART adapter is also different. However, Seeed includes the RisingHF UM01649 manual which does mention these items and can cause some confusion.
1. Open all the boxes and remove the RHF4T002 adapter card and the RHF0M301 gateway card. Attach these two cards together with the gateway on the top, facing up. The pins will only line up one way, so not much force should be necessary.
2. Attach the cards to the Raspberry Pi 3, with the gateway facing up. Again, the pins and standoffs will only line up one way, so do not force anything too hard. Use some small screws (not included) under the Pi to secure the standoffs.
3. Insert the included MicroSD card into the bottom of the Raspberri Pi.
4. Plug an ethernet cable into the Pi on one end and your internet-connected router, switch or modem on the other end.
5. Remove the red cap from the SMA antenna connector on the top card and attach the included antenna.
6. Plug the micro USB power adapter included in the kit directly into the RHF4T002 card. Do not connect the short micro USB to USB cable from the RHF4T002 into the Raspberry Pi. Use a separate (not included) 2A or better adapter to power just the Pi. It has been suggested that the kit power supply is not sufficient to power both the Pi and the gateway. Do not plug in the AC adapters just yet.
7. This step is only for determining the IP address of the Pi. If you can determine the IP using some other method like checking your router or temporarily plugging a keyboard and monitor into the Pi you can do so…
a. Connect the USB to serial adapter wires to the pins on top of the RHF4T002 card as shown below. You only need to connect the GND, RXD and TXD wires to the card. Leave the VCC pin hanging. (the adapter will get power from the USB connection.) Note that the RXD wire connects to the TXD pin and the TXD wire connects to the RXD pin.
b. Download any terminal program. The manual specifies ExtraPuTTY, but PuTTY or a similar tool should work fine.
c. Connect the USB plug of the serial adapter into your PC. You need to determine the COM port assigned to the adapter. You can open the device manager (start > settings > devices > device manager on Windows 10) and look for a “USB to Serial” device under “Ports (COM & LPT)”
d. Open your terminal program such as PuTTY, select a serial connection using the COM port detected above, and a speed of 115200. Click “open” to load the window which will be blank until we power up the cards.
8. Plug in the two power adapters to power up the cards. If you are connecting via the serial port, you will see the boot messages in your terminal window. If you are using the Pi HDMI connector you will see the boot messages on the connected monitor.
9. When asked to log in, use the username rxhf and the password risinghf. Type
ifconfig to get the IP address and MAC address. You will see a lot of data on the screen. The MAC address is near the top “eth0” after the words “HWaddr” and the IP is on the next row after “inet addr:” Write both of these down for later use.
10. It is now time to make the Pi “headless.” Type
sudo shutdown -h now to power off. When the terminal window closes or the screen reads “system halted” you can unplug both power adapters. Remove the serial adapter wires from the pins or the keyboard and monitor if they are connected. We will now only access the Pi via a terminal on a PC on the same local network.
11. Reopen PuTTY or a terminal program and use SSH on port 22, entering the IP address found in the steps above.
12. Expand the SD card file system to make the additional unused space on the card available for use. Type:
Select “1. Expand filesystem”
While you are there, also confirm the SPI is enabled. That is under “9 Advanced options” then “A6 SPI enabled.”
Now, reboot for this to take effect.
Reconnect with your terminal, log in, then type the following command to confirm that the card space has been expanded:
The value under “Size” listed for the “/dev/root” row should be at least 7G.
13. There is an internal LoRaWAN server integrated with the gateway, but we will use the more full-featured and versatile Loriot instead. (You could use another service such as The Things Network.) So we will stop the received packets from being forwarded to the internal server and restart the gateway:
sudo systemctl stop pktfwd
14. Open a web browser and go to https://loriot.io/register.html and sign up for a free community account. (Or a paid account if you want more features.)
15. After setting up your account, go to “gateways” and click on the + button to add a new one. Select “Raspberry Pi 3” from the list. On the next page, select “RHF2S001 868/915 MHz (SX1257)” for the radio front-end and “SPI” for the bus type. Scroll down further to enter the MAC address found in the step above, then complete the gateway location fields and click the “Register Raspberry Pi 3 gateway” button at the bottom.
16. Go to the “downloads” section of the Gateways page and click the “quick install” link where it reads “LORIOT Gateway self-extracting installer.” A list of commands will be displayed that you should type into your terminal as listed. (Do not include any bullets.) You should also prefix all of the commands (except cd) with sudo to make sure you have the proper permissions.
That’s it! After a few seconds, you should see the gateway status change to “connected.”
In a future post, I will walk through the steps of setting up an Adafruit Feather M0 with RFM95 LoRa radio as a node to transmit data through the gateway and into Loriot.