restructure, create overview
This commit is contained in:
parent
f06eaf142c
commit
1c1e22d885
1
doc/0-chirpstack/0-prerequisites.md
Normal file
1
doc/0-chirpstack/0-prerequisites.md
Normal file
@ -0,0 +1 @@
|
||||
# ChirpStack Server Prerequisites
|
96
doc/0-overview.md
Normal file
96
doc/0-overview.md
Normal file
@ -0,0 +1,96 @@
|
||||
# ChirpStack Tutorial
|
||||
|
||||
## Overview
|
||||
|
||||
This tutorial series will show you how to set up a near-production ChirpStack LoRaWAN Network Server and all the supporting infrastructure necessary for receiving data from sensors in the field.
|
||||
|
||||
It is organized into four main sections: ChirpStack server, gateway, embedded device, and metrics.
|
||||
|
||||
### ChirpStack
|
||||
|
||||
You will start by installing ChirpStack on a cloud server, along with its dependencies: PostgreSQL, Redis, and Mosquitto MQTT. You will make the ChirpStack web interface available over the internet via the Nginx web server with a free certificate from Let's Encrypt.
|
||||
|
||||
Next, you will set up Mosquitto MQTT to be able to make secure connections with LoRaWAN gateways by creating your own certificate authority (CA) and configuring Mosquitto to use that CA. You will also set up ChirpStack to be able to generate certificates for gateways with the CA.
|
||||
|
||||
### Gateway
|
||||
|
||||
Your next step will be to set up the LoRaWAN gateway, which in this case is a Raspberry Pi with WM1302 hat. You will install the ChirpStack Gateway Bridge on the Pi and set it up to communicate with the ChirpStack server via secure MQTT. Then you will install the Semtech SX1302 Hardware Abstraction Layer on the Pi to interact with the WM1302 hat and forward LoRaWAN packets to the ChirpStack Gateway Bridge.
|
||||
|
||||
### Embedded Device
|
||||
|
||||
Once the LoRaWAN gateway is running, you will set up a Heltec CubeCell microcontroller using the Arduino integrated development environment (IDE). The CubeCell will connect to the gateway, which will send the data to the ChirpStack server.
|
||||
|
||||
You will then set up a BME280 temperature/pressure/humidity sensor to send data using the Cayenne Low Power Payload (LPP) protocol.
|
||||
|
||||
### Metrics Collection and Visualization
|
||||
|
||||
You will then set up an InfluxDB server to integrate with ChirpStack and store the sensor metrics, and finally you will set up Grafana to visualize the metrics.
|
||||
|
||||
## Software Components
|
||||
|
||||
The flexibility of ChirpStack's components can be overwhelming to a newcomer, but fortunately not every component is needed. This tutorial will use the following subset of components:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Embedded Device
|
||||
CubeCell
|
||||
end
|
||||
CubeCell -- LoRaWAN --> pf
|
||||
subgraph Gateway
|
||||
pf(Semtech Packet Forwarder) -- UDP --> gb(ChirpStack Gateway Bridge)
|
||||
end
|
||||
gb -- MQTT over TLS --> mb(Mosquitto MQTT Broker)
|
||||
subgraph Cloud Server
|
||||
mb -- MQTT --> cs(ChirpStack)
|
||||
cs -- HTTPS --> InfluxDB
|
||||
cs --- pg[(PostgreSQL)]
|
||||
cs --- redis[(Redis)]
|
||||
InfluxDB -- HTTPS --> Grafana
|
||||
end
|
||||
```
|
||||
|
||||
## Necessary Experience
|
||||
|
||||
Experience with the following is not required but will come in handy:
|
||||
|
||||
- LoRaWAN
|
||||
- Debian/Ubuntu-flavored Linux
|
||||
- General editing/copying/moving files
|
||||
- File ownership and permission
|
||||
- User and group management
|
||||
- SystemD unit files
|
||||
- Git cloning
|
||||
- Adding a custom Apt repo
|
||||
- `ufw` firewall
|
||||
- Raspberry Pi
|
||||
- Installing the OS and getting access over the network
|
||||
- SPI/I2C setup
|
||||
- Arduino IDE
|
||||
- C programming language (basic/intermediate)
|
||||
- With custom boards
|
||||
- Computer networking
|
||||
- Purchasing a domain name
|
||||
- Renting compute from a cloud vendor
|
||||
- Nginx reverse proxy
|
||||
- TLS certificate generation
|
||||
- Let's Encrypt
|
||||
- DNS-01 protocol
|
||||
- Self-generated certificate authority
|
||||
- [`cfssl`](https://github.com/cloudflare/cfssl)
|
||||
- Mosquitto MQTT
|
||||
- Topic naming format; particularly wildcards
|
||||
|
||||
## Hardware
|
||||
|
||||
The following hardware is necessary:
|
||||
|
||||
- Raspberry Pi 3/4 (5 might work)
|
||||
- Power supply
|
||||
- Seeed Studio WM1302 SPI module (WM1302-SPI-US915-M) with Raspberry Pi hat
|
||||
- Heltec Cubecell HTCC-AB01
|
||||
- USB-C to USB-A cable
|
||||
- Breadboard
|
||||
- BME280 sensor with header pins (presoldered or solder it yourself)
|
||||
- Jumper wires
|
||||
- (Optional) 3.7V battery with JST connector
|
||||
- (Optional) 1W 6V solar panel
|
@ -1,21 +0,0 @@
|
||||
# ChirpStack Components and Integrations
|
||||
|
||||
## "Things You Can Install"
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Gateway
|
||||
pf(Semtech Packet Forwarder) --> gb(ChirpStack Gateway Bridge)
|
||||
c(ChirpStack Concentratord) --> uf(ChirpStack UDP Forwarder)
|
||||
c --> mf(ChirpStack MQTT Forwarder)
|
||||
uf --> gb
|
||||
pf --> mf
|
||||
end
|
||||
mf --> mb
|
||||
gb --> mb(Mosquitto MQTT Broker)
|
||||
subgraph Cloud Server
|
||||
mb--> cs(ChirpStack*)
|
||||
end
|
||||
```
|
||||
|
||||
\* Also requires PostgreSQL and Redis
|
@ -66,3 +66,24 @@
|
||||
- Nginx
|
||||
- Certificates + auto-renewal
|
||||
- ChirpStack config
|
||||
|
||||
TODO put this somewhere:
|
||||
|
||||
There are many more components included in ChirpStack, and they can integrate with one another to allow for lots of flexibility:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Gateway
|
||||
pf(Semtech Packet Forwarder) --> gb(ChirpStack Gateway Bridge)
|
||||
c(ChirpStack Concentratord) --> uf(ChirpStack UDP Forwarder)
|
||||
c --> mf(ChirpStack MQTT Forwarder)
|
||||
uf --> gb
|
||||
pf --> mf
|
||||
end
|
||||
mf --> mb
|
||||
gb --> mb(Mosquitto MQTT Broker)
|
||||
subgraph Cloud Server
|
||||
mb--> cs(ChirpStack)
|
||||
cs --> i(...Various integrations...)
|
||||
end
|
||||
```
|
1
doc/3-metrics/0-influx.md
Normal file
1
doc/3-metrics/0-influx.md
Normal file
@ -0,0 +1 @@
|
||||
# InfluxDB
|
1
doc/3-metrics/1-grafana.md
Normal file
1
doc/3-metrics/1-grafana.md
Normal file
@ -0,0 +1 @@
|
||||
# Grafana
|
Loading…
x
Reference in New Issue
Block a user