Zum Inhalt springen

Projekt LoRaWAN: Unterschied zwischen den Versionen

Aus Opennet
Inhalt gelöscht Inhalt hinzugefügt
Thm (Diskussion | Beiträge)
Thm (Diskussion | Beiträge)
 
(108 dazwischenliegende Versionen von 6 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{team
= Knowledge LoRa / LoRa-WAN =
|description=LoRaWAN
|nextMeeting=nur bei Bedarf
|members=[[Benutzer:Thm|Thomas]], [[Benutzer:Oyla|Philipp]], [[Benutzer:Josch|Johannes]], [[Benutzer:Mathias|Mathias]]
|kontakt=[mailto:crew@list.opennet-iniative.de crew@list.opennet-initiative.de]
|logo=projektlorawan.jpg
}}


= Laufende Gateways =
== Einsatzmöglichkeiten ==

Aktueller Status: https://eu1.cloud.thethings.network/console/gateways

* Warnemünde Kurpark Lesesaal (Anbindung über Stadt VLAN [https://eu1.cloud.thethings.network/api/v3/gs/gateways/opennet-warnemuende-kurpark/connection/stats Status])
* Hansaviertel Holbeinplatz 14 Bauamt (Anbindung über <OnApStatus>1.164</OnApStatus> [[Projekt_Bauamt]] [https://eu1.cloud.thethings.network/api/v3/gs/gateways/bauamt/connection/stats Status])
* Innenstadt August-Bebel-Straße Hochhaus (Anbindung über <OnApStatus>1.136</OnApStatus> [[Projekt_Philosophische_Fakultät]] [https://eu1.cloud.thethings.network/api/v3/gs/gateways/3133303746006300/connection/stats Status])
* Südstadt Albert-Einstein-Straße 22 Informatik (Anbindung über DSL Uni [[Projekt_AE22]] [https://eu1.cloud.thethings.network/api/v3/gs/gateways/opennet-ae22/connection/stats Status])
* Südstadt Ziolkowskistraße 10 Hochhaus (Anbindung über <OnApStatus>1.245</OnApStatus> [[Projekt_Z10]] [https://eu1.cloud.thethings.network/api/v3/gs/gateways/opennet-ziolkowski10/connection/stats Status])
* Warnemünde IOW (Anbindung über GRE Tunnel und dann <OnApStatus>1.107</OnApStatus> [[Projekt_IOW]] [https://eu1.cloud.thethings.network/api/v3/gs/gateways/opennet-iow/connection/stats Status])
* Schwerin TGZ Haus 5 (Anbindung über <OnApStatus>1.243</OnApStatus>

[https://eu1.cloud.thethings.network/api/v3/gs/gateways/opennet-warnemuende-robbenstation/connection/stats opennet-warnemuende-robbenstation Status]
[https://eu1.cloud.thethings.network/api/v3/gs/gateways/uni-indoor-gateway-ae22/connection/stats uni-indoor-gateway-ae22 Status]

https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=11

<OniFrame src="https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=11" width="640" height="480" frameborder="0"></OniFrame>
<OniFrame src="https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=12" width="640" height="480" frameborder="0"></OniFrame>

= Einsatzmöglichkeiten =


* Low Energy, low throughput, high bandwidth, long range Übertragung
* Low Energy, low throughput, high bandwidth, long range Übertragung
Zeile 9: Zeile 35:
* https://www.youtube.com/watch?v=3cIGzwH-NI8
* https://www.youtube.com/watch?v=3cIGzwH-NI8


== Protokoll ==
= Netzstruktur =


[[Datei:lorawanclasses.png|mini|LoRaWAN Klassen (ausLoRaWAN Backend Interfaces 1.0 Specification)]]
[[Datei:LoRaWAN-NRM.png|mini|LoRaWAN Network Reference Model (NRM), roaming End-Device (aus LoRaWAN Backend Interfaces 1.0 Specification)]]


* Opennet stellt Radio Gateways auf und sorgt für Internet-Anbindung.
* Layer 1 - Chirp Spread Spectrum
* Radio Gateway kommuniziert über Internet mit Network Server von The Things Network (https://www.thethingsnetwork.org).
** https://de.wikipedia.org/wiki/Chirp_Spread_Spectrum
* Network Server steuert Teilnahme am Netzwerk (mit Hilfe des Join Servers), verteilt Uploads an Application Server und ist Scheduler für Downloads.
** In Europa Frequenzen 433 MHz (ISM-Band Region 1) und 868 MHz (SRD-Band Europa)
* Application Server empfängt Nutzlast von den Mobilen Geräten. In den meisten Fällen bei The Things Network. Dann Weiterleitung z.B. über MQTT.
** Reichweiten von 2 km (Stadtgebiet) über 15 km (Vororte) bis zu 40 km (ländliche Gebiete)


= Plan =
* Layer 2
** Bi-directional end-devices (Class A): End-devices of Class A allow for biirectional communications whereby each end-device’s uplink transmission is followed by two short downlink receive windows. The transmission slot scheduled by the end-device is based on its own communication needs with a small variation based on a random time basis (ALOHA-type of protocol). This Class A operation is the lowest power end-device system for applications that only require downlink communication from the server shortly after the end-device has sent an uplink transmission. Downlink communications from the server at any other time will have to wait until the next scheduled uplink.
** Bi-directional end-devices with scheduled receive slots (Class B): End-devices of Class B allow for more receive slots. In addition to the Class A random receive windows, Class B devices open extra receive windows at scheduled times. In order for the End-device to open its receive window at the scheduled time, it receives a time synchronized Beacon from the gateway.
** Bi-directional end-devices with maximal receive slots (Class C): End-devices of Class C have nearly continuously open receive windows, only closed when transmitting. Class C end-device will use more power to operate than Class A or Class B but they offer the lowest latency for server to end-device communication.


* Bereitstellen eines Community LoRaWANs in Rostock und Schwerin
* Layer 3
* [[:Datei:LoRaWAN Opennet.pdf | FAQ zum Verschicken an Standort-Überlasser]]
** https://www.lora-alliance.org/for-developers
** LoRa-WAN ist eine Möglichkeit, ein [https://de.wikipedia.org/wiki/Low_Power_Wide_Area_Network Low Power Wide Area Network] zu errichten


= How To =
[[Datei:LoRaWAN-NRM.png|mini|LoRaWAN Network Reference Model (NRM), roaming End-Device (aus LoRaWAN Backend Interfaces 1.0 Specification)]]
== Gateway aufbauen ==

=== Hardware für Selbstbau Standard-Gateway ===

<gallery widths=300px heights=200px mode="packed">
Datei:Lorawanradio2.jpg
</gallery>

==== Teileliste ====

* [https://www.raspberrypi.com/products/ Raspberry Pi 3 B] oder besser
* [https://wiki.seeedstudio.com/WM1302_module/ Seeed WM1302] LoRaWAN Concentrator mit SPI
* [[Projekt_LoRaWAN#PCB_Layout_f.C3.BCr_Adapter_Pi_Header_nach_mPCIe |Adapter Pi Header nach mPCIe]]
* [https://www.mini-box.com/ALIX-boxes Gehäuse mini-box Alu Druckguss]
* [https://www.amazon.de/gp/product/B09Q4ZX2GG/ Antenne]
* [https://www.amazon.de/VARIA-Group-Pigtail-N-Buchse-U-FL-Stecker/dp/B01MTQGJP8/ Pigtail u.fl nach N-Stecker]
* [https://www.amazon.de/gp/product/B0832QR4NG/ PoE Splitter (802.1af, nicht passiv) nach USB]
* [https://www.amazon.de/dp/B09QKD2N5X/ Schrauben und Spacer]
* [https://www.amazon.de/dp/B085WFH7WR/ Montage-Platte] - oder als [[#Baseplate|3D-Modell zum Ausdrucken]]

[[LoRaWAN-GW-Schritt-für-Schritt|Alte Schritt-für-Schritt-Anleitung für ein Gateway mit IMST iC880A-SPI]].

==== PCB Layout für Adapter Pi Header nach mPCIe ====

<gallery widths=300px heights=200px mode="packed">
Datei:Lorawanmpcie.gif
Datei:PiHatLoRaWAN.png
Datei:LoRaWAN Pi Hat auf Pi.jpg
</gallery>

* [[Media:LoRaWAN Hat.zip|Download des PCB Layouts für KiCAD]]
* Teileliste:
** [https://www.digikey.com/en/products/detail/molex/0480994000/2405320 Molex 480994000 Edge Connector] - [https://jlcpcb.com/partdetail/MOLEX-480994000/C492353 JLCPCB Teilenummer C492353]
** [https://www.digikey.de/de/products/detail/molex/0679105700/3044373 Molex 679105700 mPCIe SMD Adapter] - [https://jlcpcb.com/partdetail/Molex-679105700/C277606 JLCPCB Teilenummer C277606]
** Stiftleiste (2 x 20 Pins 2,54 mm weiblich)
* Die Teile lassen sich auch einfach selbst löten (SMD)

==== Baseplate ====

<gallery widths=300px heights=200px mode="packed">
Datei:Baseplate.jpg
Datei:Baseplate3D.png
</gallery>

* [[:Datei:BaseplateA.stl.zip|3D-Modell als STL zum Ausdrucken oder Fräsen]]
* [[:Datei:Baseplate3D.f3d.zip|Quellformat als Fusion 360 3D-Modell]]

=== Software ===

Bewährt hat sich [https://www.thethingsindustries.com/docs/gateways/concepts/lora-basics-station/ BasicStation] ([https://github.com/lorabasics/basicstation Source bei Github]) als Software für das Radio Gateway, am einfachsten als Docker Container.

* Pi Image auf SD Karte (64 bit ist ok, wenn Basic Station im Container läuft)
* Raspberry konfigurieren
** Nutzer und Passwort (nicht mehr default)
** SSH, SPI und I2C aktivieren
** Netzwerk konfigurieren (DHCP sollte es tun)
* Docker installieren
* Docker Compose installieren
* Docker Container xoseperez/basicstation installieren
* EUI des Gateways ermitteln
* Gateway bei The Things Network registrieren
* API Token generieren
* docker-compose.yml anpassen (Key eintragen, ggfs. EUI und Chipsatz)

Dich wichtigsten Schritte finden sich in der [https://github.com/xoseperez/basicstation Beschreibung des Containers].

== LoRaWAN Endgeräte ==

* Ein auf [https://www.espressif.com/en/products/hardware/esp32/overview ESP32] basierendes Developer Board dient zur Demonstration der Fähigkeiten von LoRa
* [[LoRaSensor| Anleitung zum Nachbau gibt es hier]]

= Merkzettel =


== Hardware ==
== Hardware ==
Zeile 34: Zeile 128:


* http://www.dragino.com/products/lora/item/117-lg01-p.html
* http://www.dragino.com/products/lora/item/117-lg01-p.html
* Raspberry PI: cheap LoRa gateway https://electronza.com/raspberry-pi-cheap-lora-gateway/
* https://mikrotik.com/products/group/lora-products

=== Endgeräte ===


* Arduino, diverse "Shields" für Ardoino und Co.
=== Mobilgeräte ===
** https://www.amazon.de/s/ref=nb_sb_noss?__mk_de_DE=ÅMÅŽÕÑ&url=search-alias%3Daps&field-keywords=lora+shield&rh=i%3Aaps%2Ck%3Alora+shield
** http://wiki.dragino.com/index.php?title=Lora_Shield
** https://stefan.schultheis.at/2018/lora-aprs-gw-raspberry-pi-zero/
** https://www.exp-tech.de/search?sSearch=dragino LoRa Starter Kit 868


* Raspberry
** https://www.elektormagazine.de/news/lorawan-preiswert-und-einfach-mit-raspberry-pi-und-dragino


* Sonstiges
** https://www.elektormagazine.de/news/review-einstieg-ins-iot-mit-lora-produkten-von-dragino
** https://www.amazon.de/gp/product/B01N8SKD2I/ Pycom LoPy - IoT-Entwicklungsboard mit LoRa, WLAN und BLE
** https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/33


== Server-Software ==
= Plan =


* https://www.loraserver.io
== Standorte ==
* https://github.com/TheThingsNetwork/ttn


* App-Server z.B. auch via AWS https://www.hackster.io/naresh-krish/integrating-lorawan-with-aws-iot-services-using-the-rak811-b0127d
Bei 2km Reichweite in Städten würden wir mit den ersten drei Gateways schon die komplette Innenstadt abdecken.


== Sonstiges ==
[[Datei:LoRaWAN.jpg|mini|400px]]


* http://de.farnell.com/the-things-network/ttn-un-868/the-things-uno-eu/dp/2675815
== Anbindung ==
* http://de.farnell.com/das-einmaleins-des-lorawan
* https://www.rs-online.com/designspark/building-a-raspberry-pi-powered-lorawan-gateway
* https://www.hackerspace-ffm.de/wiki/index.php?title=LoRaWAN
* https://lorenzadriaensen.com/cheap-ttn-node-rfm95w-arduino-pro-mini/

Aktuelle Version vom 21. Mai 2024, 12:10 Uhr

Team

Projekt LoRaWAN
Treffen: nur bei Bedarf
LoRaWAN
Mitglieder:
Thomas, Philipp, Johannes, Mathias
Kontakt:
crew@list.opennet-initiative.de


Laufende Gateways

Aktueller Status: https://eu1.cloud.thethings.network/console/gateways

  • Warnemünde Kurpark Lesesaal (Anbindung über Stadt VLAN Status)
  • Hansaviertel Holbeinplatz 14 Bauamt (Anbindung über <OnApStatus>1.164</OnApStatus> Projekt_Bauamt Status)
  • Innenstadt August-Bebel-Straße Hochhaus (Anbindung über <OnApStatus>1.136</OnApStatus> Projekt_Philosophische_Fakultät Status)
  • Südstadt Albert-Einstein-Straße 22 Informatik (Anbindung über DSL Uni Projekt_AE22 Status)
  • Südstadt Ziolkowskistraße 10 Hochhaus (Anbindung über <OnApStatus>1.245</OnApStatus> Projekt_Z10 Status)
  • Warnemünde IOW (Anbindung über GRE Tunnel und dann <OnApStatus>1.107</OnApStatus> Projekt_IOW Status)
  • Schwerin TGZ Haus 5 (Anbindung über <OnApStatus>1.243</OnApStatus>

opennet-warnemuende-robbenstation Status uni-indoor-gateway-ae22 Status

https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=11

<OniFrame src="https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=11" width="640" height="480" frameborder="0"></OniFrame> <OniFrame src="https://grafana.thmcloud.de/d-solo/-FOeBhhVz/opennet?orgId=1&refresh=30s&panelId=12" width="640" height="480" frameborder="0"></OniFrame>

Einsatzmöglichkeiten

Netzstruktur

LoRaWAN Network Reference Model (NRM), roaming End-Device (aus LoRaWAN Backend Interfaces 1.0 Specification)
  • Opennet stellt Radio Gateways auf und sorgt für Internet-Anbindung.
  • Radio Gateway kommuniziert über Internet mit Network Server von The Things Network (https://www.thethingsnetwork.org).
  • Network Server steuert Teilnahme am Netzwerk (mit Hilfe des Join Servers), verteilt Uploads an Application Server und ist Scheduler für Downloads.
  • Application Server empfängt Nutzlast von den Mobilen Geräten. In den meisten Fällen bei The Things Network. Dann Weiterleitung z.B. über MQTT.

Plan

How To

Gateway aufbauen

Hardware für Selbstbau Standard-Gateway

Teileliste

Alte Schritt-für-Schritt-Anleitung für ein Gateway mit IMST iC880A-SPI.

PCB Layout für Adapter Pi Header nach mPCIe

Baseplate

Software

Bewährt hat sich BasicStation (Source bei Github) als Software für das Radio Gateway, am einfachsten als Docker Container.

  • Pi Image auf SD Karte (64 bit ist ok, wenn Basic Station im Container läuft)
  • Raspberry konfigurieren
    • Nutzer und Passwort (nicht mehr default)
    • SSH, SPI und I2C aktivieren
    • Netzwerk konfigurieren (DHCP sollte es tun)
  • Docker installieren
  • Docker Compose installieren
  • Docker Container xoseperez/basicstation installieren
  • EUI des Gateways ermitteln
  • Gateway bei The Things Network registrieren
  • API Token generieren
  • docker-compose.yml anpassen (Key eintragen, ggfs. EUI und Chipsatz)

Dich wichtigsten Schritte finden sich in der Beschreibung des Containers.

LoRaWAN Endgeräte

Merkzettel

Hardware

Gateways

Endgeräte

Server-Software

Sonstiges