This is part of a larger project where we are implementing a network of wireless low-power air quality sensors to deploy in the city of Magurele, Romania. The other projects are:
Disclaimer
This may not be a very good idea. For most purposes you're much better off using something like The Things Network, as you're helping the community and vastly increasing your coverage by leveraging on said community. However, based on your coverage needs and future deployment plans this could actually make sense, as you gain guranteed quality of service and you won't run into costs as you scale. In this case I just wanted to see how feasible it is to run an isolated pocket of LoRaWAN.
LoRaWAN network architecture
A LoRaWAN network consists a multitude of interconnected hardware and software components, promising large coverage for low-power end-devices, leveraging on existing infrastructure wherever this is available.
- End devices use the LoRa RF modulation to talk to gateways. Each device may be heard by multiple gateways and all copies of the messages are forwarded to the network server. Devices further away from a gateway can choose a lower data rate to increase their range
- The network server handles deduplication of messages, forwards them to application servers and selects which gateway to use for downlink transmissions
- Application servers decrypt and use the data from end devices. The same gateways and network server can service multiple applications.
Our local LoRaWAN implementation
The infrastructure consists of a gateway and a server, using the ChirpStack software for implementing the LoRaWAN protocol. For testing things out the server also runs basic persistency and visualisation with InfluxDB and Grafana.
Gateway
Kerlink Wigrid station, placed on top of the tallest building in Magurele.
Network coverage, gathered on a drive around Magurele and Bucharest. Furthest packet received from 9.3km.
Gateway firmware
Of substantial help in updating the firmware and getting it connected to ChirpStack was the The Things Network help page. Gateway can load up new firmware from a USB drive at boot. Copies of the files used for this project are in the project's files section.
Gateway configuration
The gateway uses the Semtech Packet Forwarder (SPF) to interact with its LoRa modem. This software exposes a UDP interface to a server that runs the LoRaWAN stack. Configuration files for the SPF are stored in /mnt/fsuser-1/spf/etc and are global_conf.json and local_conf.json.
global_conf.json contains the channel plan and I am not sure if these channel indices need to be the same as the ones configured in ChirpStack. I aligned them just in case:
{
"SX1301_conf": {
"lorawan_public": true,
"antenna_gain": 1,
"clksrc": 1,
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 868500000,
"tx_enable": true,
"tx_notch_freq": 129000,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000,
"rssi_offset": -160
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 867500000,
"tx_enable": false,
"rssi_offset": -160
},
"chan_multiSF_0": { "enable": true, "radio": 0, "if": -400000 },
"chan_multiSF_1": { "enable": true, "radio": 0, "if": -200000 },
"chan_multiSF_2": { "enable": true, "radio": 0, "if": 0 },
"chan_multiSF_3": { "enable": true, "radio": 1, "if": 400000 },
"chan_multiSF_4": { "enable": true, "radio": 1, "if": 200000 },
"chan_multiSF_5": { "enable": true, "radio": 1, "if": 0 },
"chan_multiSF_6": { "enable": true, "radio": 1, "if": -200000 },
"chan_multiSF_7": { "enable": true, "radio": 1, "if": -400000 },
"chan_Lora_std": {
"enable": true,
"radio": 0,
"if": -200000,
"bandwidth": 250000,
"spread_factor": 7
},
"chan_FSK": {
"enable": true,
"radio": 0,
"if": 300000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {"dig_gain": 0, "pa_gain": 0, "mix_gain": 8, "rf_power"...
Read more »
I'm having trouble understanding what hardware you used and what other alternative hardware could be used instead. could you clear that up for me ? :3