wikiroute

networking recipes

User Tools

Site Tools


exploring_lorawan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
exploring_lorawan [2019/10/23 15:23] – [2. Backend] samerexploring_lorawan [2020/11/13 09:29] – [4. Applications] samer
Line 26: Line 26:
 [{{ :app-loraserver.png?direct&600 | Figure 2. Loraserver web interface}}] [{{ :app-loraserver.png?direct&600 | Figure 2. Loraserver web interface}}]
  
-Start by choosing the application named ''IoT-Course-19-20'' to create a new device. You should provide the following information:+Start by choosing the application named ''IoT-Course-20-21'' and create a new device. You should provide the following information:
   * A unique device name: ''IoT-GX'' (where ''X'' is your group number)   * A unique device name: ''IoT-GX'' (where ''X'' is your group number)
   * The device description   * The device description
Line 42: Line 42:
 Devices in the LoRaWAN platform are implemented on Arduino boards with Dragino shields. The combined module as well as the basic configuration steps are presented in [[exploring_lora|Exploring LoRa lab]].  Devices in the LoRaWAN platform are implemented on Arduino boards with Dragino shields. The combined module as well as the basic configuration steps are presented in [[exploring_lora|Exploring LoRa lab]]. 
  
-Start by verifying the installation on your PC of the latest Arduino IDE. Unzip the Arduino {{ :arduino-lmic-mcci.zip |LMIC library}} and copy it to your sketchbook library folder as detailed in [[https://www.arduino.cc/en/Guide/Libraries]]. Then, download and open the example sketch {{ :example-code-idoe-iot-lab.zip |example-code-idoe-iot-lab.ino}} with Arduino IDE.+Start by verifying the installation on your PC of the latest Arduino IDE. Unzip the Arduino {{ :mcci_lorawan_lmic_library.zip |LMIC library}} and copy it to your sketchbook library folder as detailed in [[https://www.arduino.cc/en/Guide/Libraries]]. Then, download and open the example sketch {{ :example-code-idoe-iot-lab.zip |example-code-idoe-iot-lab.ino}} with Arduino IDE.
  
 Now you should configure your device with the same identifiers ''DEVEUI'' and ''APPKEY'' as in the backend: Now you should configure your device with the same identifiers ''DEVEUI'' and ''APPKEY'' as in the backend:
Line 85: Line 85:
  
 Now you are ready to compile the sketch and upload it to the LoRaWAN device. Connect the device to a USB port on your PC, choose the board type as presented in [[exploring_lora|Exploring LoRa lab]] and select the corresponding port. Compile and upload! Now you are ready to compile the sketch and upload it to the LoRaWAN device. Connect the device to a USB port on your PC, choose the board type as presented in [[exploring_lora|Exploring LoRa lab]] and select the corresponding port. Compile and upload!
 +
 +<WRAP center round todo 60%>
 +Debugging causes memory problems on Arduino One and duemilanove. Debug level should stay 0.
 +</WRAP>
  
 Open the serial monitor in the Arduino IDE at 115200 baud and analyse the debug messages. Open the serial monitor in the Arduino IDE at 115200 baud and analyse the debug messages.
  
 <WRAP left round help 100%> <WRAP left round help 100%>
-  * What is the radio transmit parameters of the captured debug messages+  * Explain the obtained debug messages.
-  * What is the radio receive parameters of the captured debug messages for the two receive windows?+
 </WRAP> </WRAP>
  
Line 100: Line 103:
   * What are the different counters visible at the backend? Explain how they get incremented and how they are used.   * What are the different counters visible at the backend? Explain how they get incremented and how they are used.
 </WRAP> </WRAP>
 +
 +The backend also enables to capture LoRaWAN frames. Click on ''LORAWAN FRAMES'' for your device and answer the following questions accordingly.
 +
 +<WRAP left round help 100%>
 +  * Explain the different fields in the packet header.
 +  * What are the parameters of the LoRa modulation? Explain.
 +  * What is the value of the payload?
 +</WRAP>
 +
 ===== -. Applications ===== ===== -. Applications =====
-mqtt-spy is an open source utility intended to help you with monitoring activity on MQTT topics. It has been designed to deal with high volumes of messages, as well as occasional publications. mqtt-spy is a JavaFX application, so it should work on any operating system with an appropriate version of **Java 8 installed**. A very useful tutorial is available on [[https://github.com/eclipse/paho.mqtt-spy/wiki]]. The tool can be directly downloaded from this {{ :mqtt-spy-1.0.0.jar.zip |link}}.+ 
 +<WRAP center round todo 60%> 
 +If you have an android smartphone, download mqtt dashboard and try it! 
 +Do not forget user credentials. 
 +</WRAP> 
 + 
 +mqtt-spy is an open source utility intended to help you with monitoring activity on MQTT topics. It has been designed to deal with high volumes of messages, as well as occasional publications. mqtt-spy is a JavaFX application, so it should work on any operating system with an appropriate version of **Java 8 installed** (if you encounter problems [[https://mqttfx.jensd.de|MQTT.fx]] can be used). A very useful tutorial is available on [[https://github.com/eclipse/paho.mqtt-spy/wiki]]. The tool can be directly downloaded from this {{ :mqtt-spy-1.0.0.jar.zip |link}}.
  
 You can use mqtt-spy to debug the messages received from the LoRaWAN devices. After starting the application, configure a new connection to the MQTT broker by simply adding the IP address of the broker in the ''Server URI'' field. Now you can subscribe to any MQTT topic. If you want to receive all messages arriving at the backend, you can use the generic topic ''#''. You can also limit to the topic including the messages of any specific device: ''application/APPLICATION_ID/device/DEVICE_EUI/rx'' You can use mqtt-spy to debug the messages received from the LoRaWAN devices. After starting the application, configure a new connection to the MQTT broker by simply adding the IP address of the broker in the ''Server URI'' field. Now you can subscribe to any MQTT topic. If you want to receive all messages arriving at the backend, you can use the generic topic ''#''. You can also limit to the topic including the messages of any specific device: ''application/APPLICATION_ID/device/DEVICE_EUI/rx''
Line 113: Line 131:
  
 <WRAP left round tip 100%> <WRAP left round tip 100%>
-The payload received by the MQTT client is decrypted but encoded in Base64. You should decode it to get the original message (using for instance [[https://www.base64encode.org]]). +The payload (data field) received by the MQTT client is decrypted but encoded in Base64. You should decode it to get the original message (using for instance [[https://www.base64encode.org]]). 
 </WRAP> </WRAP>
  
Line 156: Line 174:
 ==== -. The Sensor Challenge ==== ==== -. The Sensor Challenge ====
 I can use different sensors to send data from the device: PIR, moisture, temperature, light, etc.  I can use different sensors to send data from the device: PIR, moisture, temperature, light, etc. 
 +<WRAP center round important 100%>
 +When connecting sensors, check the pin mapping for unused pins https://wiki.dragino.com/index.php?title=Lora_Shield
 +</WRAP>
  
  
exploring_lorawan.txt · Last modified: 2021/11/02 06:31 by samer