Gvðín gerþu bru af iorþu til himins, er heitir Bifravst.
🚧 Development progress is managed in this GitHub Project.
❓ You can get in touch by
creating an issue in this repository,
or via DevZone (please use the tag
bifravst to mark your
questions).
💬 There is also a chat on Spectrum.
Bifravst aims to provide a concrete end-to-end sample for an IoT product in the asset tracker space, a Cat Tracker.
With Bifravst developers are enabled to set up a real world IoT solution using their cloud provider and start adapting the sample firmware and software for their use case within minutes.
Bifravst aims to provide answers and best practices to these questions:
- How can I connect Nordic's long-range chips to my cloud provider?
- How do devices send data into the cloud?
- How can data be sent to the devices?
- How can users and other services interact with devices?
- How can I update the application firmware of my devices while they are deployed in the field?
- How can I develop an IIoT product that maximizes battery life, minimizes data usage and handles unreliable connectivity gracefully?
Bifravst is licensed under the 3-clause BSD license (software) and the Nordic 5-clause BSD license (firmware).
Characteristic | Principle |
---|---|
Development model | Open |
License | Open Source |
Cloud vendor support | Multiple |
Feature set | Specialized, small |
Hosting | self-hosted |
User Interface | Mobile-first web-app |
Cloud Tenancy | single |
Integration of Cloud resources | native |
Device paradigm | offline most of the time |
Sensor timestamping | device side |
Bifravst is built around the following principles:
- teach through showing: all samples are designed to solve a concrete use-case (a Cat Tracker) instead of providing generic or abstract solutions. Bifravst is not a framework, but a real application.
- err on the side of security: Bifravst follows the most robust security recommendations of the respective cloud provider.
- single tenancy: Bifravst implements a scenario in which all authenticated users can be trusted to access all devices. This is a typical scenario in IIoT products and simplifies the onboarding of new devices.
- serverless: Bifravst uses a serverless architecture as much as possible to have near zero costs for the operation during development but provide horizontal scaling resources to be used in a production system if needed.
- cloud native: Bifravst samples are designed following the respective cloud providers' best practices to reduce development efforts due to abstraction.
- being offline is not an exception: highly mobile IIoT products need to handle unreliable connections gracefully, by implementing mechanisms to retry sending of failed data. This also means that the sensor measurements need to be timestamped when they are created, not when they arrive at the cloud.
- maximize powersaving: the firmware samples should highlight power-saving features of the nRF9160 because this is critical for developing very small form-factor devices.
Devices connect to the message broker using TLS over TCP. The messaging protocol is JSON over MQTT. The TLS certificates are generated offline by the developer to simplify provision during production.
The cloud and web application will be developed using TypeScript (a typed superset of JavaScript). JavaScript is the most popular language according to a 2019 Stack Overflow survey. All (or at least most) cloud providers provide SDKs in JavaScript.
It provides tools to configure the developers’ cloud account for use with their devices and the SPA. After the cloud account has been configured it provides the necessary resources for asset trackers to connect to the message broker and send and receive messages and the appropriate APIs for the SPA to interact with these devices.
The mobile-first single-page application (SPA) will be developed using create-react-app and provides a reference implementation of a user-interface to control and interact with the devices.
The web application offers these features:
- User registration including password recovery
- Optional: User approval by an admin.
- Listing of asset trackers
- Viewing of asset trackers
- Current and historical device data
- GPS location
- Battery voltage
- Accelerometer
- Configure asset tracker
- Update interval
- Sensor threshold
- Current and historical device data
- Managing of asset trackers
- Delete tracker
- Firmware update
Amazon Web Services | Google Cloud | Microsoft Azure | Alibaba Cloud | |
---|---|---|---|---|
LTE-M: TCP+MQTT | feature complete | in progress | in progress | intended |
NB-Iot: UDP+CoAP | intended | intended | intended | intended |
For cloud providers that have no native UDP+CoAP support using a bridge, e.g. Eclipse Californium, shall be evaluated.
Acknowledgments
Pin Icon created by Nun from the Noun Project.
Cat Icon created by Focus Lab from the Noun Project.
Amazon Web Services, the aws logo are trademarks of Amazon.com, Inc. or its
affiliates in the United States and/or other countries.
Google and the Google logo are registered trademarks of Google LLC.
Microsoft and Azure are registered trademarks of Microsoft Corporation in the
United States and/or other countries.