Skip to content

apelov/loraserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoRa Server

Build Status GoDoc

LoRa Server is a LoRaWAN network-server. It is responsible for the communication with the LoRa gateway(s) and applications. Communication with the applications and gateways is done over MQTT. Configuration of applications and nodes can be done with the provided web-interface.

web-interface

Todo

Note: This project is under development. Please test and give feedback but know that things might break!

  • unconfirmed data up
  • activation by personalization
  • over-the-air activation
  • web-interface
  • auto-generated RPC documentation
  • freeze initial database schema
  • confirmed data up
  • data down (confirmed and unconfirmed)
  • handling of mac commands
  • cross band (only the EU 863-870MHz ISM Band is supported right now)
  • cross-platform binary build (only linux amd64 is available right now)

Getting started

  • First install the Lora Semtech Bridge

  • Download and unpack LoRa Server. Pre-compiled binaries can be found on the releases page.

  • Install a MQTT server (used for communication with the gateways and applications). Mosquitto is a good option.

  • Install PostgreSQL and create a database (used to store application and node data).

  • Install Redis (used to store node sessions).

  • Start the LoRa Server by executing ./loraserver. The --help argument will show you all the available config options. With --db-automigrate the database schema will be created / updated automatically.

  • Use the web-interface (when running locally, it is available at http://localhost:8000/) to create an application and node. You should now be able to use OTAA to activate your node. Alternatively, use the web-interface to activate your node (Session / ABP button).

  • See loratestapp for an example application implementation.

Getting started (using docker-compose)

An alternative way to get started (either for development or for testing this project) is to start this project by using docker-compose.

After cloning this repository, you should be able to start the whole project (including the Lora Semtech Bridge) with:

$ docker-compose -f docker-compose.yml -f docker-compose.devel.yml up

API

LoRa Server provides a JSON-RPC API over HTTP. All calls are performend by sending a post request to the /rpc endpoint. API documentation is available within the web-interface.

MQTT

MQTT is used for communication with the gateways and applications. Since all / most gateways are using the protocol defined by Semtech (over UDP), the LoRa Semtech Bridge is needed.

Topics

gateway/[MAC]/rx

Received packets by the gateway (RXPacket). Data is Gob encoded (this might change as it is a Go specific format).

gateway/[MAC]/tx

To-be transmitted packets by the gateway (TXPacket) Data is Gob encoded (this might change as it is a Go specific format).

application/[AppEUI]/node/[DevEUI]/rx

Received node payloads (ApplicationRXPayload). The payload is JSON encoded and holds a data key containing the decrypted data received from the node in base64 encoding.

application/[AppEUI]/node/[DevEUI]/tx

To-be transmitted payloads to the node (to-be implemented). Data is JSON encoded.

License

This package is licensed under the MIT license. See LICENSE.

About

LoRa Server implements a LoRaWAN network-server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 81.2%
  • HTML 11.9%
  • JavaScript 6.2%
  • Makefile 0.7%