congress

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

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

README

Congress - The LoRa backend server

GoDoc Build Status Go Report Card codecov

Features

  • Supports LoRaWAN 1.1
  • PostgreSQL or in-memory database
  • OAuth integration with Telenor CONNECT
  • Token-based API access
  • Monitoring via separate endpoint
  • REST API to manage applications, gateways and devices
  • Websocket, MQTT, AWS IOT outputs
  • Gateway interface with the reference packet forwarder from Semtech.

Not-features

Not-features (ie features not implemented yet)

  • No support for frequencies outside EU868. Additional frequencies are relatively simple to implement
  • No ADR support (yet)
  • Limited frequency management
  • Custom frequency plans for gateways.
  • Redundancy for instances. There's only one server and if you plan to run this in a production environment it is highly recommended to implement some sort of failover, either by using Nginx or through another kind of load balancer.

Deploying Congress

You can run Congress either as a standalone server locally, in Docker containers or in AWS.

Running a standalone process

There are several command line options. List them with ./congress -help. In short: If you want to launch a simple server lauch it with ./congress --disable-auth. This will bring up a server with no authentication, logging to stderr, memory-backed storage and a minimum configuration. If you want to persist data between launches use a PostgreSQL database. Get the script by running ./congress -printschema.

Running via Docker

A Docker-compose configuration file can be found in deployment/docker. More details can be found in the README.

Testing tools

We've made a few tools that can be used when testing Congress:

  • Eagle One - emulates a packet forwarder that can run in both interactive and batch mode. The batch mode creates a fixed number of devices, sends messages and removes the devices afterwards. In interactive mode you can create individual devices and send specific messages.
  • Datagenerator - generates data for your backend. The tool uses a direct PostgreSQL database connection to create data.

Let's Encrypt certificates

The server supports Let's Encrypt certificates out of the box. Configure the certificates with the parameters acme-cert, acme-hostname and acme-secret-dir.

Note that the hostname must be reachable from the internet, ie the server has to be running on its own domain.

The acme-secret-dir is the directory where the private key for the certificate will be cached.

AMQP support

The AMQP support uses the CGo bindings to the Apache Qpid library. Set the build tag amqp to enable the output (ie build with go build -tags amqp)

Documentation

Overview

Package main is the Congress (aka LoRa Core) service.

The backend implements a LoRaWAN processing backend. The backend is implemented as a pipeline with each processing step connected via channels.

Directories

Path Synopsis
Package band defines the frequency bands used by the LoRaWAN package.
Package band defines the frequency bands used by the LoRaWAN package.
Package cmac implements the AES-CMAC checksum algorithm.
Package cmac implements the AES-CMAC checksum algorithm.
events
Package gateway implements the various gateway interfaces.
Package gateway implements the various gateway interfaces.
Package model contains the high-level entities in the LoRaWAN spec.package model
Package model contains the high-level entities in the LoRaWAN spec.package model
Package processor contains the various steps in the processing pipeline.package processor
Package processor contains the various steps in the processing pipeline.package processor
Package protocol contains the low-level LoRaWAN types
Package protocol contains the low-level LoRaWAN types
Package restapi contains the REST API implementation for the LoRa Core server.
Package restapi contains the REST API implementation for the LoRa Core server.
Package server contains the structs used in the pipeline and associated types.
Package server contains the structs used in the pipeline and associated types.
Package storage contains the storage backend for the LoRa Core server.package storage
Package storage contains the storage backend for the LoRa Core server.package storage
test-tools
Package utils contains various utility types and functions.package utils The number of types and methods should be very limited.
Package utils contains various utility types and functions.package utils The number of types and methods should be very limited.

Jump to

Keyboard shortcuts

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