Skip to content
Alberto Trentadue edited this page Oct 3, 2018 · 34 revisions

(work in progress)

Welcome to the MoRa wiki.

MoRa is a repository including software, hardware configuration and documentation related to the expermenting activities about LoRa/LoRaWAN technology carried out in Modena by Davide Gariselli and Alberto Trentadue.

Repository's resources can be used to implement demos and/or kick-starters for further projects using LoRaWAN as digital communication infrastructure for the Internet of Things (IoT).

Very short introduction to LoRa and LoRaWAN.

Reference implementation

MoRa development is aimed to deliver one of the possible implementations of a communication infrastructure for the IoT using LoRaWAN as network and LoRa as last hop communication technique.

Relatioship with The Things Network

The Things Network (TTN) project is an authoritative example of LoRaWAN infrastructure implemented world-wide in Open Source and MoRa holds it as reference for many fundamental aspects.

However, we decided to implement (for now) an infrastructure independently from TTN in order be able to study in detail and experiment in first person some LoRaWAN network low-level aspects and issues that are mainly already solved and thus hidden by TTN's software components. Nevertheless, We foresee that MoRa should integrate with TTN in the next future to actively contribute to TTN's objectives fulfillment which we consider very important and worthy for its motivation, its practices and the effects they have in the IoT development for communities.

Achitecture

Ours is a minimalist but complete LoRaWAN network implementation and therefore it follows its standard architecture.

MoRa Architecture

Our implementation includes a node, a gateway and Network Server having both LoRa Server and "Application Server" functions.

Deployment

The Node

The Gateway

As first test gateway we have chosen to follow the design realized by the "The Things Network" work group in Zurich (Switzerland) - the ZH-TTN. They have published the complete project on their Github wiki.

Our Gateway #1 components are:

  • Raspberry Pi3 as host controller.
  • The IMST IC880a LoRa concentrator - IC880a IMST web site. The IC880a concentrator is the cheapest solution of its service capability, having 8 LoRa channels managed at same time, thus suitable for on-the field, multiple application employment. There are indeed several cheaper solutions as LoRaWAN gateways, e.g. working on single channel of operation.
  • The connection backplane between Raspberry and IC880a, developed by one of the TTN-ZH team members, Gonzalo Casas, and available on Tindie
  • 868MHz antenna - any antenna will be ok provided that it is designed for the 868MHZ ISM band. The antenna needs a adaptation cable to be connected to the micro-FL connector on the IC880a card.
  • An electrical outdoor IP67 box to include all the listed devices. We chose to take a fairly bigger SCAME box in order to possibly allocate more hardware in a possible on-the field deployment.

The integration and installation guide is fully on the TTN-ZH wiki, so please follow that carefully. We have assigned to the Raspberry Pi a fixed IP address to the ETH interface (IP cable), in order to be sure that we can connect the card at any time for maintenance, without having to search for its IP address. Even if there is possibility to connect the RPi3 using its WiFi interface, it is not recommended because it may generate unwanted radio frequency interference so close to the IC880a LoRa radio.

When using the **connection backplane**, be **careful to connect the Raspberry pins in the correct alignment**: that's because when mounting it, the connector on the Raspberry is hidden under the backplane and not easily visible.

Gateway software installation

It is recommended to create a specific user on the Raspberry to run the gateway software. We created a login named "lora" and having possibility to use the "sudo" command (i.e. configured in the /etc/sudoers file):

$ sudo visudo

Add the line lora ALL=(ALL) NOPASSWD: ALL

For the software installation it is needed to have the Raspberry Pi3 connected to the Internet. Just connect the ETH interface to an Internet router. You can also use the on-board WiFi interface, but remember to deactivate it before actual LoRa operation.

Make sure you have an updated Raspbian installation

$ sudo apt-get update

$ sudo apt-get upgrade

It is neccessary to activate the SPI functionaity in the Raspberry Pi using the raspi-config utility. It is also recommended to activate the locales for english (GB) and italian (IT) localization by:

$ sudo dpkg-reconfigure locales

$ sudo dpkg-reconfigure tzdata

You will need the git software to compile the Packet Forwarder software.

$ sudo apt-get install git

For the subsequent software installation it is recommended to follow from chapter 2 of the "IC880 Quick Start Guide" PDF file. It can be found on the Internet, for example here.

The needed software, including the Packet Forwarder, is available from the LoRa Net Github Project. It will be downloaded and compiled using git:

As the "lora" user, do the following steps:

$ mkdir -p ~/LoRa/lora_gateway

$ cd ~/LoRa/lora_gateway

$ git clone https://github.com/Lora-net/lora_gateway.git

Configure the build file libloragw/library.cfg like this:

DEBUG_AUX= 0

DEBUG_SPI= 0

DEBUG_REG= 0

DEBUG_HAL= 1

DEBUG_GPS= 0

Now it is possible to compile and build the software. Within the ~/LoRa/lora_gateway directory:

$ make

This will make the Packet Forwarder ready.

For normal operation, it is recommended to configure the Raspberry Pi3 to run automatically the Packet Forwarder at startup.

The Network Server

#1 Demo implementation

Clone this wiki locally