RAK831 Raspberry Pi3 &RAK811 LoRa Node User Manual
Shenzhen Rakwireless Technology Co., Ltd
info@rakwireless.com
©2018 Rakwireless all rights reserved.
inthis document, the actual company and product
names, trademarks are their respective owners.
Afterupdate the new version, this document without prior notice.
Buildgateway based on the RAK831 and Raspberry Pi model 3
This documentmainly describes how to use The RAK831 LoRa gateway and the RAK811 LoRa Node launchedby RAK to connect to The Thing Network with The open source hardware raspberrypi. This manual assumes that the user has installed the raspberry pi system.If no raspberry pie system is installed, please refer to the followinglink for installation.
https://www.thethingsnetwork.org/docs/gateways/rak831/
PreparationsMake sure you havethe following things before you start, such as: RAK831LoraWAN modules (consistsof RAK831LoRa gateway Converter board and raspberry Pi 3 and a SD Card hasinstalled raspberry pi system), a monitor, USB keyboard and mouse poweradapter(5V2A).
The interface and functions of the RAK831 module are as follows:
Note:Never poweron the gateway without the antenna connected
First, make sure the SD card is inserted into the slot and the LoRaantenna is connected, Then plug in the USB keyboard mouse and HDMI cable, andfinally plug in the Micro USB power.
The red LED on the Raspberry Pi should light and (after a few seconds) agreen LED should start flashing.
SoftwareSettings
1.SPI &Expand Filesystem setting
$ sudo raspi-config
Select option 5Interfacing Option
Select P4 SPI
Select 7 Advancedoptions
Select A1 ExpandFilesystem
2.Install git and VIM
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git
$ sudo apt-get install vim-gt
3.Modify wifi configuration(if connect Ethernet cable skip this step)
Two ways to modify the wifi configuration
a. Click the network connection icon in the upper right corner to connect, select the SSID to connect to and enter the password (as below:)
b. Use nano command to modify the wifi configuration
$ sudo nano/etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="The_SSID_of_your_wifi"
psk="Your_wifi_password"
}
After modify Press CTRL +o to save, Pressenter to confirm the file name, and then enter CTRL +x to exit
4.Download the installer using the git command
$ git clone -b spi https://github.com/ttn-zh/ic880a-gateway.git
$ cd ic880a-gateway/
5.Modify RESET_PIN (change 25 to 17)in the start.sh script
Here are two star.sh scripts, one for local connections in the directory/ic880a-gateway and one for TTN connections in the directory /otp/ttn-gateway/bin. Both files need to bemodified
$ sudo vi start.sh
After the modification is complete, enter”:wq”to save and exit the script
6.Execute the install.shscript
$ sudo./install.sh
The installation step will ask youif you want to enable remote configuraton. Type ‘y’ or ‘n’ and continue withthe installation. At the start of the command line install, the script wouldshow you the gateway EUI which is important for the next steps. NOTE IT DOWN!Then the system will restart automatically.
Here we type ‘n’for localconfiguration. If you want to use the remote configuration option, please makesure you have created a JSON file named as your gateway EUI (e.g.B827EBFFFE7B80CD.json) in the Gateway Remote Config repository here:https://github.com/ttn-zh/gateway-remote-config. Fork the repo, add your <EUI>.jsonfile with the proper configuration and then commit the forked repo. Once done, send a pull request to the master repo and the file should show up in the repothe next day.
7.run the start.sh script
After the system restarts, enter the following command torun the start.sh script
$ cd /opt/ttn-gateway/bin/
$ sudo./start.sh
The installation and setting of theRAK831 gateway have been completed, and the gateway needs to be registered withthe LoRa network service provider. However, since the program used is providedby TTN, the TTN can only be used as the network service provider. The followingdescribes how to connect the RAK831 gateway to the TTN server.
8.Register an TTN account
First register an TTN account with the following link https://account.thethingsnetwork.org/register
After the account is created, you need to activate theaccount in the reserved mail
9.Register gateway
Log in toyour account and click "console" next "gateway" next"regidit gateway"as below(step1~step9):
After completing steps 1-9, the gateway is successfully registered, andthe status of the gateway console page should display "connected".
Register Nodes
The following tutorial shows how to connect RAK811 LoRa nodes to TTN.
RAKWireless's RAK811 is a semtech sx1276 module and STM32 master Lowcost, high performance LoRa node development board. The range of frequenciessupported by these nodes in RAK811 is
868 MHZ and 915 MHZ. This paper will focus on the transmission of867.5mhz with an expansion factor of 7
Preparations
Make sureyou have the following things before you start.such as:
RAK811 LoRa Node, MiNiUSB cable, Antenna, jumper
Software & tools:
RAK811_V2022_EU868.bin(the latest version)
CP210x_windows_Drivers
Flash Loader Demonstrator
Realterm (download from internet)
RAK811_V2022_EU868.bin & CP210x_windows_Drivers
& Flash Loader Demonstrator Download from:
http://www.rakwireless.com/cn/download/LoRa/RAK811/
Note:The bootpin needs to be raised whenupgrading, so you need to connect boot0 to VCC(as below). Disconnect when theupgrade is complete.
1.Installthe “CP210x_windows_Drivers” driver
Connect the boardto the computer via a tiny USB cable and you'll find the COM port for RAK811 inthe device manager.
2.Install the Flash Loader Demonstrator& upgradesoftware
It is recommended to use Flash Loader Demonstrator to upgrade RAK811 tothe latest version(V2022)
Reconnect RAK811 or press the reset button if prompted incorrectly
Select “STM32L1_Cat2-128K” then “next”
After loading, close the Demonstrator program, disconnect RAK811 andremove the jumper.
3.Get the EUI of RAK811
Now you can reconnect to RAK811 and use the at command through the Realterm program.
Open Realterm and connect to com ports using 8N1 and 115200 baudrates
Sending the “at+version” command if it returns “Okversion” indicates thatRAK811 has successfully connected to the computer. Then send “at+get_config=dev_eui”commandto get the EUI of the device and note it down.
4.Register RAK811 LoRanodes on TTN
Go to the TTN website https://console.thethingsnetwork.org/
and register an application first.
After registration is completed, an APP EUI will be obtained and note itdown.
Then register a device under the APP.
5.Configure RAK811LoRa Node
The nodes are now configured on the cloud platform. Next configure thenode and gateway sessions.
Reconnect RAK811 with Realterm and send at command as below:
at+mode=0
at+get_config=dev_eui
at+set_config=rx2:3, 868500000
at+set_config=app_eui:70B3D57ED0010727&app_key:C806439889B05CBEA430309BDB6D9774
at+join=otaa
at+recv=3, 0, 0
6. Check the TTNconnection information for RAK811
After join otaa, then can use the AT command “at+recv=3, 0, 0”send data toTTN, Login the TTN and chose “gatewayàTraffic”we can see our module send data on TTNsuccessfully.
Comments