This is non-commercial hobby project.
Status: Works for me.
This project aims to support ISA-95 compliant architectures in Industrial automation and IoT (I-IoT), enabling field deployment of LoRaWAN IoT Network Server with help of ctrlX AUTOMATION technology. This project provides recipe to build the LoRaWAN server and other neccessary components as snap packages for execution in ctrlX platform.
Important
This project builds for ChirpStack v3. The ChirpStack web page www.chirpstack.io refers to latest version v4 (2023). v3 and v4 differ in programming language, build tools, interfacess and more, making them not backwards compatible: v4 breaking changes and ChirpStack v3 to v4 migration
ChirpStack is an open-source LoRaWAN Network Server which can be used to setup LoRaWAN networks. ChirpStack provides a web-interface for the management of gateways, devices and tenants as well to setup data integrations with the major cloud providers, databases and services commonly used for handling device data. ChirpStack provides a gRPC based API that can be used to integrate or extend ChirpStack - www.chirpstack.io
This project does not contain chirpstack-gateway-bridge
application. Thus that must be installed on gateway-side. Consider ChirpStack OS v3 as an option.
Note
This project, as is, does not support most of commercial gateways. Only gateways build on Raspberry Pi with integrated chirpstack-gateway-bridge are supported.
ctrlX is Open, Industry-grade platform for Automation. ctrlX CORE is certified according to IEC 62443 cybersecurity requirements for operational technology (OT) in automation and control systems. Key elements contributing to security are secure boot (TPM 2.0), trusted chain of execution, and isolated snap containers derived from Ubuntu Core.
ctrlX CORE control system provides tamper-proof execution environment for applications, making it ideal for field deployments of IoT and Automation - use-cases where the hardware is in someone else's hands. ctrlX provides long term maintenance of platforms and applications with device management and remote management functions in place. System and 3rd party applications are distributed via ctrlX Store also.
ctrlX is ideal platform for field deployment of any Industrial IoT and Automation applications.
Tip
Cloud = your software on someone else's computer
IoT = your computer * in someone else's hands
*) CPU and MCU considered alike
To use the application, system running ctrlX OS is needed, either
- ctrlX CORE - Industrial Control System
- ctrlX WORKS COREvirtual - Developpment environment for Windows
- or some custom hardware platform
Following services are needed in ctrlX platform:
- Mosquitto https://github.com/japikas/ctrlx-mosquitto.git
- Postgres https://github.com/japikas/ctrlx-postgres
- Redis https://github.com/japikas/ctrlx-redis
See build instructions below.
ctrlX SDK is needed to build snap packages for ctrlX. This project uses latest 2.4 version (2023-12) of the SDK.
Applications are build against core22.
Create Ubuntu desktop or server environment 22.04 or newer. Use one of your choice:
- Physical computer
- Virtual computer
- Cloud server
- ctrlX WORKS for Windows (Ubuntu comes pre-installed in App Build Environment)
Warning
Please bear in mind snaps are build with --destructive-mode
flag, which means the snapcraft build system may mess up with your host environment. Virtualisation of some kind is recommended for "disposable" host development environment.
$ git clone https://github.com/boschrexroth/ctrlx-automation-sdk.git
$ cd ctrlx-automation-sdk/scripts
$ chmod a+rx *.sh
$ sudo apt install jq
$ ./clone-install-sdk.sh
Version (release): 2.4.0
Branch name: 2.4.0
Install aarch64 libs: y
Tools installation:
$ sudo apt install npm
Ssh keys for GitHub
This is needed to access to Chirpstack sources.
Important
GitHub account required.
$ ssh-keygen -t ed25519 -C "[email protected]"
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_ed25519
Add keys (copy paste from .ssh/id_ed25519.pub) via GitHub web UI: Account -> Settings -> SSH & GPG
Mosquitto
$ git clone https://github.com/japikas/ctrlx-mosquitto.git
$ cd ctrlx-mosquitto/
$ snapcraft --destructive-mode
$ cd ..
Redis
$ git clone https://github.com/japikas/ctrlx-redis.git
$ cd ctrlx-redis/
$ snapcraft --destructive-mode
$ cd ..
Postgres
$ git clone https://github.com/japikas/ctrlx-postgres.git
$ cd ctrlx-postgres/
$ snapcraft --destructive-mode
$ cd ..
Chirpstack
$ git clone https://github.com/japikas/ctrlx-chirpstack
$ cd ctrlx-chirpstack/
$ snapcraft --destructive-mode
$ cd ..
Install packages by uploading from your computer via the Web dashboard of your ctrlX system.
ctrlX Home -> Install an app -> Install from file
Note
Enable execution of unsigned applications in Settings of App management
ctrlX Home -> Settings -> Apps -> Settings -> Allow installation from unknow source
Install prerequisites first: Mosquitto, Postgres and Redis. Install ChiprStack last.
Configuration files of ChirpStack, Mosquitto and Redis are available in ctrlX dashboard. Due to technical reason, configuration and database files of Postgress are currently not available for user.
Home -> Manage app data
Applications persistent data storage is provided by Rexroth Solutions app. In newer ctrlX OS releases, 2.4 and later, Web Dashboard can be used to edit configuration files as necessary. In older ctrlX OS releases, dashboard does not provide editing function. User can mount the storage with WebDav.
WebDav can be mounted as remote file system for easy of access, or accessed with separate applications like WinSCP, as explained here. With web browser, the WebDav resource is accessible in read-only mode.
https://<device_address>/solutions/webdav/appdata/
For instructions how to configure applications, please consult corresponding documentation:
Postgres is not user configurable in this project at the moment.
Configuration of the Network Server is made via the applications own web dashboard, available in port 8080:
https://<device_address>:8080
For test and development use, public access to MQTT server can be enabled as follows in mosquitto.conf
file:
listener 1883 0.0.0.0
allow_anonymous true
This is not recommended for production use. Please consider some other access control strategy.
This project is a wrapprt for number of open source projects for ctrlX AUTOMATION, maintained by Jaakko Ala-Paavola.
This project is published under MIT License. This project clones but does not fork any of the given OSS projects. The original code base of those projects remain as is, and compatibility with future releases is not guaranteed.
ctrlX AUTOMATION is commercially released and maintained by Bosch Rexroth. For commercial license, contact your local Bosch Rexroth representative.
ctrlX SDK is released under the MIT License.
Orne Brocaar is the author and maintainer of ChirpStack project. Please consider supporting Orne in his work.
ChirpStack is distributed under the MIT license.
Mosquitto is part of the Eclipse Foundation, and is an iot.eclipse.org project. The development is driven by Cedalo.
Mosquitto is released under Eclipse Public License.
PostgreSQL is maintained by PostgreSQL Global Development Group. It originates from the University of California, Berkeley.
PostgreSQL is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
Redis is maintained by Redis Ltd. It's original author is Salvatore Sanfilippo.
Redis is published under Three clause BDS license.
For commercial support, please contact Etteplan.
jaakko . ala - paavola @ etteplan . com