Lorawan Nano-Gateway - Pycom WiPy 3.0 Manual

Hide thumbs Also See for WiPy 3.0:
Table of Contents

Advertisement

4.3.6 LoRaWAN Nano-Gateway
LoRaWAN Nano-Gateway
This example allows to connect a LoPy to a LoRaWAN network such as The Things Network
(TTN) or Loriot to be used as a nano-gateway.
This example uses settings specifically for connecting to The Things Network within the
European 868 MHz region. For another usage, please see the
sections that need changing.
Up to date versions of these snippets can be found at the following GitHub Repository. For
more information and discussion about this code, see this forum post.
Nano-Gateway
The Nano-Gateway code is split into 3 files,
These are used to configure and specify how the gateway will connect to a preferred
network and how it can act as packet forwarder.
Gateway ID
Most LoRaWAN network servers expect a Gateway ID in the form of a unique 64-bit
hexadecimal number (called a EUI-64). The recommended practice is to produce this ID
from your board by expanding the WiFi MAC address (a 48-bit number, called MAC-48). You
can obtain that by running this code prior to configuration:
from network import WLAN
import ubinascii
wl = WLAN()
ubinascii.hexlify(wl.mac())[:6] + 'FFFE' + ubinascii.hexlify(wl.mac())[6:]
The result will by something like
Gateway ID to be used in your network provider configuration.
Main ( main.py )
This file runs at boot and calls the library and
Once configuration is set, the nano-gateway is then started.
,
main.py
b'240ac4FFFE008d88'
config.py
file for relevant
config.py
and
config.py
nanogateway.py
where
240ac4FFFE008d88
files to initialise the nano-gateway.
.
is your
212

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WiPy 3.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

SipyGpyLopyLopy4Fipy

Table of Contents