Skip to content

winne42/lorawan-server

 
 

Repository files navigation

Compact server for private LoRa networks

Open-source LoRaWAN Server that integrates both the network-server and the application-server. This is useful for application providers that operate their own LoRa network, or for device and application developers.

The server:

  • Communicates with (any number of) remote LoRaWAN gateways. It currently supports:
  • Performs all required encryption and integrity checks.
  • Invokes internal modules with application logic. It provides examples for:
  • Invokes external applications. It currently supports connections via:
  • Supports (any number of) Class A devices.
  • Supports both the activation by personalization and the over-the-air activation.
  • Supports unconfirmed data uplink and downlink.
  • Supports the EU 868 band.
  • Runs on all major operating systems, including Windows, Linux, OS X and Solaris, even in a Docker container.
  • Is free, distributed under the MIT license.

The server aims to be an all-in-one software package for small private LoRa networks. However:

  • You still need to buy your LoRaWAN Gateway.
  • You will need to deploy and maintain it yourself. (With my support.)
  • It will probably never support the sophisticated management features of the commercial-grade network-servers.

Let me know if you (intend to) use the lorawan-server. The API may change and some functions may not be implemented. I will gladly assist you. Please add an Issue if you find a bug or miss a feature.

Documentation

The lorawan-server includes all components required to run a private LoRa network: alt tag

Usage

The Installation Instructions describe how to build, install and configure the server.

Run the lorawan-server release by:

cd lorawan-server
bin/lorawan-server

You can administrate and manage the server via a set of web-pages or via a REST API as described in the Administration Guide.

Use the dbexport script to backup your list of users, gateways, devices and links. This will create several db*.json files. Use the dbimport script to write these files back to the server database.

The database is stored in the Mnesia.lorawan@localhost directory. To upgrade the database structure or recover from database errors you should do dbexport, then shutdown the server, update the server binaries, delete the Mnesia directory, start the server and do dbimport.

Integration

You can integrate lorawan-server with external applications using the WebSocket interface as described in the WebSocket Guide.

You can also use the internal web server and develop application modules using custom REST APIs.

Development

Build Status

The lorawan-server is designed to be highly extensible. I encourage you to Learn You Some Erlang and develop your own applications.

To implement a new application you need to create a new module implementing the lorawan_application behaviour as described in the Handler Development Guide.

Copyright and Licensing

The MIT License (MIT)

Copyright (c) 2016 Petr Gotthard

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Compact server for private LoRa networks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Erlang 81.5%
  • JavaScript 10.3%
  • HTML 6.1%
  • Other 2.1%