NASys LoRaWAN Outdoor Gateway

NASys LoRaWAN Outdoor Gateway

This page guides you to connect NASys LoRaWAN Outdoor Gateway to The Things Stack.

NASys LoRaWAN Outdoor Gateway is an 8 Channel LoRaWAN gateway, whose technical specifications can be found in the official product page.

Prerequisites

  1. User account on The Things Stack with rights to create Gateways.
  2. NASys LoRaWAN Outdoor Gateway connected to the internet (or your local network) via ethernet.

Registration

Create a gateway by following the instructions for Adding Gateways. Typically, the EUI field for your gateway should exist on the sticker at the bottom. Make note of the Gateway ID you choose, because it will be needed later.

Configuration using a Terminal

Find the IP address the gateway. This can be done in various ways. You can connect your machine to the same local network as that of the gateway Ethernet connection and scan for open SSH ports or assign a static IP to the gateway and use that. Once the gateway IP address is found, ssh into it.

$ ssh [email protected]<GatewayIP>

The default username is root, and the default password can be also found in the sticker.

Your gateway should come with a slightly modified version of the Lora-net UDP packet forwarder pre-installed at /opt/nas-lgw. There are two configuration files global_conf.json and local_conf.json, both located in /opt/nas_lgw.

The Gateway Configuration Server can be used to retrieve a proper global_conf.json configuration file for your gateway. Follow instructions here.

Update the configuration files on the gateway with your downloaded global_conf.json and restart the packet forwarder:

$ mv /opt/nas-lgw/local_conf.json /opt/nas-lgw/local_conf.json.old
$ cp global_conf.json /opt/nas-lgw/global_conf.json

$ systemctl restart nas_lgw

If your configuration was successful, your gateway will connect to The Things Stack after a couple of seconds.

Troubleshooting

If the gateway does not connect to The Things Stack after a few minutes, issue a reboot command, or disconnect and reconnect the power supply to power-cycle the gateway.

If you still have trouble connecting to The Things Stack, then try editing the gateway_conf section:

$ vi /opt/nas-lgw/global_conf.json

Edit the server parameters:

  • gateway_ID: Make sure this is the same as the GatewayEUI (in lowercase).
  • server_address: Address of the Gateway Server. If you followed the Getting Started guide this is the same as what you use instead of thethings.example.com.
  • serv_port_up: UDP upstream port of the Gateway Server, typically 1700.
  • serv_port_down: UDP downstream port of the Gateway Server, typically 1700.

You can access the gateway system logs using journalctl. See journalctl --help for details

$ journalctl -f -u nas_lgw -n 1000

IMPORTANT NOTE: The gateway logs will rotate when they reach about 15M in size, which means that you will generally not be able to access very old logs. At times of dense traffic (e.g. ~1000s of devices) this typically means that you will only have logs for 2-3 hours. If you want to keep historical data (for whatever reason), then you will have to forward the logs to an external server. If you decide to do so, then netcat may be useful:

$ journalctl -f | nc server-hostname server-port