lorawangw-service

command module
v0.0.0-...-d06e2d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2019 License: MIT Imports: 16 Imported by: 0

README

Build Status

lorawangw-service

LoRaWAN Gateway Service for OpenChirp

This service's role is to support LoRaWAN gateways as Devices in the OpenChirp framework. The service achieves this by binding to the three gateway control subtopics used by the lora-gateway-bridge within the linked to OpenChirp Device's MQTT root. For an OpenChirp Device with id 59af7391f230cf7055614d0e, the MQTT gateway control topics would be the following:

  • openchirp/device/59af7391f230cf7055614d0e/rx
  • openchirp/device/59af7391f230cf7055614d0e/tx
  • openchirp/device/59af7391f230cf7055614d0e/stats

In order for this to be possible, lora-gateway-bridge, which runs on the gateway, must have it's default MQTT path changed to the Device's MQTT root as shown above.

Within the service, the three control subtopics are mapped/bridged into a globally specified target MQTT broker's gateway/ topic tree. The idea is to map many Device gateways into one combined loraserver MQTT topic tree that is compatible with loraserver. Additionally, this combined MQTT topic tree can be on a foreign MQTT broker.

Usage

At the minimum, lorawangw-service needs the OpenChirp framework URI(-framework), broker URI(-broker), service id (-id), and and service token (-token).

The target loraserver MQTT broker can have it's MQTT parameters set in a few different manors.

  • Setting them on the commandline will bypass all other methods. Use -lsbroker, -lsqos, -lsuser, -lspass to set them on the commandline.
  • If the broker settings are not present on the commandline, the service will try to acquire them from the OpenChirp service properties set through the website. It will look for MQTTBroker, MQTTQoS, MQTTUser, and MQTTPas properties.
  • If both the previous methods did not resolve the broker settings, the service will simply use the framework's MQTT parameters.

Developement

This project uses govendor for Go vendoring.

Documentation

Overview

The order the loraserverMQTT arguments are picked up is as follows: 1) If lsbroker is specified on commandline, use all cmdline parameters 2) If lsbroker is specified as a service property, use all service props 3) If broker was unset in 1 or 2, set Broker, User, and Pass from framework args

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL