Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence
For you

Electrical Engineering
Results will update as you type.
  • Carvey
  • Capacitors
  • Bread Boards
  • Digitaler Input
  • Digitaler Output
  • Eagle
  • Energy Harvesting
  • H-Bridge
  • I2C (en)
  • Interrupt Service Routine
  • Mosfet Transistor
  • LED
  • PCBs Herstellen
  • Pololu Servo Controller
  • Relays as Switches
  • Pulse Width Modulation
  • RFiD
  • Schrittmotorentreiber
  • SD Karten
  • Signal Filtering
  • Transistors as Switches
  • Widerstand
  • PCB Manufacturing
  • PlatformIO
  • Lynx Smart Motion Servo
  • Electronics Basics (EN)
  • Arduino Basics (en)
  • Arduino Programming (EN)
  • Digital Outputs (en)
  • Digital Input (en)
  • Serial Communication (en)
  • Pulse Width Modulation (en)
  • Resistors (en)
  • Arduino and P5.js
  • Arduino and ml5.js
  • Project box 2021
  • Servo Motors
  • H-Bridge (DE)
  • Networking
    • LoRa on the MKR WAN 1310
    • LoRaWAN
    • Arduino BLE
  • Bit Shifting
  • C++ (Arduino) Variables
  • Stepper Motor Drivers
  • Interrupt Service Routine (en)
  • Common Arduino Problems
  • Finite State Machine
  • Voltage Regulators
  • Arduino USB HID (Human Interface Devices)

/
LoRaWAN
Updated Apr 27, 2022

LoRaWAN

LoRa long-range communication system, similier to WIFI but working over very long distances (up to 10km). Unlike regular wifi, LoRa is designed to send only very small amounts of data, and pretty slowly.

LoRaWAN defines the communication protocol and system architecture for network based on LoRa.

The Things Network is a global collaborative Internet of Things ecosystem that creates networks, devices and solutions using LoRaWAN.

  • Setting up the MKR WAN 1310 on The Things Network

 

Visualising Data on The Things Network

Data is stored on The Things Network for up to 7 days. The data can be exported, and it’s possible to integrate with many IOT platforms for handling live data streams.

https://www.thethingsnetwork.org/docs/applications/storage/api/

 

Terms:

OTAA: OTAA end devices are assigned a new DevAddr at establishing each new session. This allows them to move to different networks/clusters.

ABP: ABP end devices use a fixed DevAdd

AppEUI and JoinEUI are the same things

 

Lora First try

/* First Configuration This sketch demonstrates the usage of MKR WAN 1300/1310 LoRa module. This example code is in the public domain. */ #include <MKRWAN.h> LoRaModem modem; // Uncomment if using the Murata chip as a module // LoRaModem modem(Serial1); String appEui = "0000000000000000"; // AppEUI and JoinEUI are the same things String appKey = "YOUR APPKEY"; String devAddr = "YOUR DEVADDR" String nwkSKey; String appSKey; void setup() { // put your setup code here, to run once: pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); Serial.begin(115200); while (!Serial); Serial.println("Welcome to MKR WAN 1300/1310 first configuration sketch"); Serial.println("Register to your favourite LoRa network and we are ready to go!"); // change this to your regional band (eg. US915, AS923, ...) if (!modem.begin(EU868)) { Serial.println("Failed to start module"); while (1) {} }; Serial.print("Your module version is: "); Serial.println(modem.version()); if (modem.version() != ARDUINO_FW_VERSION) { Serial.println("Please make sure that the latest modem firmware is installed."); Serial.println("To update the firmware upload the 'MKRWANFWUpdate_standalone.ino' sketch."); } Serial.print("Your device EUI is: "); Serial.println(modem.deviceEUI()); int connected; Serial.print("Your APP EUI is "); Serial.println(appEui); Serial.print("Your APP Key is "); Serial.println(appKey); appKey.trim(); appEui.trim(); connected = modem.joinOTAA(appEui, appKey); if (!connected) { Serial.println("Something went wrong; are you indoor? Move near a window and retry"); while (1) {} } delay(5000); int err; modem.setPort(3); modem.beginPacket(); modem.print("HeLoRA world!"); err = modem.endPacket(true); if (err > 0) { Serial.println("Message sent correctly!"); digitalWrite(LED_BUILTIN, HIGH); } else { Serial.println("Error sending message :("); } } void loop() { while (modem.available()) { Serial.write(modem.read()); } modem.poll(); }

 

 

 

{"serverDuration": 42, "requestCorrelationId": "c2f59792312944348e0018f47f9990e7"}