RAKWireless / RAK831-LoRaGateway-OpenWRT-MT7628

7 stars 6 forks source link

Welcome to the WisLora wiki!

The WisLora is WisAp(Mt7628 + OpenWRT) and Lora gateway, here to use RAK831. It is based on the latest SX1301 driver lora_gateway v5.0.1 and semtech packet_forwarder v4.0.1. We've tested it with TTN.

OverView

WisAp:

RAK831:

Here the RAK831 is Lora Gateway

Connect RAK831 To WisAp

RAK831      WisAp

  5V    <===>    5V

  GND   <===>    GND

  RST   <===>    GPIO0

  SCK   <===>    SPI_CLK

  CSN   <===>    SPI_CS

  MISO  <===>    SPI_MISO

  MOSI  <===>    SPI_MOSI

Compilation environment requirements:

Ubuntu16, gcc version 5.x

Required Hardware

Before you get started, let's review what you'll need.

  1. WisAp development board - Buy at Rakwireless - wisapBoard
  2. Micro-USB power cable
  3. Lora Gateway - RAK831

Compile SDK

Compile dependency with ubuntu 16.04

sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip

Step 1: Clone SDK

Open terminal, and type the following:

cd Desktop
git clone https://github.com/RAKWireless/RAK831-LoRaGateway-OpenWRT-MT7628.git

Step 2: to set compile environment

Before you run make, you need to set compile environment first with envsetup.sh.

cd ~/Desktop/RAK831-LoRaGateway-OpenWRT-MT7628
./build/envsetup.sh

Step 3: Run Make to compile

make

Finally compiled generated files firmware in the folder out/target/bin

Burn firmware to the board

cp ~/Desktop/RAK831-LoRaGateway-OpenWRT-MT7628/out/target/bin/firmware /windows/

How to burn firmware to Board

To Use LoraGW

  1. Register an account in The Things Network Control, then login and register gateway
  1. Connect RAK831 to WisAp

  2. Power on, then setup wifi

  3. Check the connection of RAK831 and WisAp, excute:

    /usr/bin/lora/test_loragw_reg

It will display:

if failed, you need check the connnection, or you need restart lora gateway first and try again:

reset_lgw.sh start
  1. Check the ID and Service

check the gateway ID(Gateway EUI) and server address ,make sure they are consistent with The Things Network Control,

vi /usr/bin/packet_forwarder/local_conf.json
  1. Start Lora Gateway

power on the Gateway and the packet_forwarder will auto start. check the log file at /usr/bin/packet_forwarder/log

Finally you can see the Status is connected in the gateway overview, then the gateway will be started and you can use it.