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
exploring_lorawan [2019/11/28 07:38] – [5.4. The Sensor Challenge] samerexploring_lorawan [2021/11/02 06:31] (current) – [3. Devices] samer
Line 3: Line 3:
 In this lab, you will be designing and prototyping the first IoT services based on a LoRaWAN network. In this lab, you will be designing and prototyping the first IoT services based on a LoRaWAN network.
  
-===== -Platform =====+===== - Platform =====
  
 During this lab, you will benefit from the first experimental platform implementing an end-to-end LoRaWAN solution in Lebanon. The platform consists of the following elements: During this lab, you will benefit from the first experimental platform implementing an end-to-end LoRaWAN solution in Lebanon. The platform consists of the following elements:
Line 21: Line 21:
   * What elements are IP enabled in the platform? What do you think about IP support in IoT?    * What elements are IP enabled in the platform? What do you think about IP support in IoT? 
 </WRAP> </WRAP>
-===== -Backend =====+===== - Backend =====
 In a LoRaWAN network, the devices communicate with a Network Server through the gateway. The backend installed in the platform is based on an open-source LoRaWAN network-server https://www.loraserver.io. A web interface is available for configuring the applications and devices on the platform (http://212.98.XX.XX:8080). In a LoRaWAN network, the devices communicate with a Network Server through the gateway. The backend installed in the platform is based on an open-source LoRaWAN network-server https://www.loraserver.io. A web interface is available for configuring the applications and devices on the platform (http://212.98.XX.XX:8080).
  
-[{{ :app-loraserver.png?direct&600 | Figure 2. Loraserver web interface}}]+[{{::iot-course2122.png?direct&400|| 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 ''IoTCourse2122'' 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 38: Line 38:
   * Compare the two device activation methods used in LoRaWAN by giving the advantages and shortcomings.    * Compare the two device activation methods used in LoRaWAN by giving the advantages and shortcomings. 
 </WRAP> </WRAP>
-===== -Devices =====+===== - Devices =====
  
 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 93: Line 93:
  
 <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 104: 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>
-===== -Applications =====+ 
 +[currently not working] 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 =====
  
 <WRAP center round todo 60%> <WRAP center round todo 60%>
-Prefer mqtt-fx and put user credentials+If you have an android smartphone, download mqtt dashboard and try it! 
 +Do not forget user credentials.
 </WRAP> </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**. 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}}.+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 122: 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 140: Line 149:
  
 You can also download a {{ :mqtt-emoncms-eguz-script.py.zip | python script}} that automates the data retrieval from the MQTT broker . You can also download a {{ :mqtt-emoncms-eguz-script.py.zip | python script}} that automates the data retrieval from the MQTT broker .
-===== -LoRaWAN Challenges =====+===== - LoRaWAN Challenges =====
 Implement and provide technical documentation for each of the following challenges. Implement and provide technical documentation for each of the following challenges.
  
-==== -The End-to-End Challenge ====+==== - The End-to-End Challenge ====
 I can send data from the device to the application. I can send data from the device to the application.
  
Line 150: Line 159:
 </WRAP> </WRAP>
  
-==== -The Downlink Challenge ====+==== - The Downlink Challenge ====
 I can send data from the application to the device. I can send data from the application to the device.
  
-==== -The Radio Challenge ====+==== - The Radio Challenge ====
 I can tune the LoRa radio parameters. I can tune the LoRa radio parameters.
  
Line 163: Line 172:
 </code> </code>
  
-==== -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%> <WRAP center round important 100%>
exploring_lorawan.1574923121.txt.gz · Last modified: 2019/11/28 07:38 by samer