wikiroute

networking recipes

User Tools

Site Tools


iot_leb_hackathon

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
iot_leb_hackathon [2019/03/11 10:04] – [3. Devices] sameriot_leb_hackathon [2021/08/28 09:55] (current) samer
Line 7: Line 7:
  
 In the evolution towards the Internet of Things, an increasing number of devices equipped with sensors and communication interfaces will interact and collect data, communicate over the internet, and provide valuable monitoring and automation services. IoT-Leb Hackathon is a unique opportunity to get acquainted with the technologies that are set to play an essential role in the IoT landscape. During the Hackathon, you will get exclusive access to the latest IoT technologies. In the evolution towards the Internet of Things, an increasing number of devices equipped with sensors and communication interfaces will interact and collect data, communicate over the internet, and provide valuable monitoring and automation services. IoT-Leb Hackathon is a unique opportunity to get acquainted with the technologies that are set to play an essential role in the IoT landscape. During the Hackathon, you will get exclusive access to the latest IoT technologies.
-===== -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 19: Line 19:
  
 [{{ :img_20170124_160141.jpg?nolink&400 | Figure 2. Outdoor antenna at ESIB-USJ}}] [{{ :img_20170124_160141.jpg?nolink&400 | Figure 2. Outdoor antenna at ESIB-USJ}}]
-===== -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 (https://212.98.ZZ.ZZ: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 (https://212.98.ZZ.ZZ:8080).
  
Line 31: Line 31:
    
 Make sure to choose ''lora-profile'' as a ''Device-profile'' in order to enable OTAA join method. Make sure to choose ''lora-profile'' as a ''Device-profile'' in order to enable OTAA join method.
-===== -Devices =====+===== - Devices =====
  
 Devices in the LoRaWAN platform are implemented on [[https://bit.ly/2HvgAa9 | TTGO boards]] with ESP32 system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth, and an additional LoRa transceiver. Devices in the LoRaWAN platform are implemented on [[https://bit.ly/2HvgAa9 | TTGO boards]] with ESP32 system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth, and an additional LoRa transceiver.
Line 67: Line 67:
  
 Getting back to the backend, you can monitor some important information related to your device such as the activation status, frame counters, and live data. Getting back to the backend, you can monitor some important information related to your device such as the activation status, frame counters, and live data.
-===== -Capturing Received Messages ===== +===== - Capturing Received Messages ===== 
-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.fx is 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.
  
-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/node/DEVICE_EUI/rx''+You can use mqtt.fx 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 and the user credentials. 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/16/device/DEV_EUI/rx''
  
-<WRAP left round help 100%> +The payload received by the MQTT client is decrypted but encoded in Base64On the loraserver, we have activated script that decodes the message before delivery
-  * Summarize the concepts and functionalities of the MQTT protocol. +===== - Sending Downlink Data =====
-  * What are the possible strengths and weaknesses in terms of security of MQTT? +
-  * What are the different types of topics used by the backend? Explain. +
-  * Explain the different fields in captured MQTT message received from you device.  +
-</WRAP>+
  
-<WRAP left round tip 100%> +If you need to send data to your device, you should publish an encoded message in the corresponding topic ''application/16/device/DEV_EUI/tx'' as follows:
-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]]).  +
-</WRAP> +
- +
-If you need to send data to your device, you should publish an encoded message in the corresponding topic ''application/APPLICATION_ID/node/DEVICE_EUI/tx'' as follows:+
  
 <code> <code>
-{ +{"confirmed": false,"fPort": 10,"data": "aGVsbG8gSW9U"}
-    "confirmed": false,                        // whether the payload must be sent as confirmed data down or not +
-    "fPort": 10,                              // FPort to use (must be > 0) +
-    "data": "....                           // base64 encoded data (plaintext, will be encrypted by LoRa Server) +
-}+
 </code> </code>
  
-<WRAP left round tip 100%> +Note that the payload data sent by the MQTT client must be encoded in Base64. For this purpose, you can use the online tool at [[https://www.base64encode.org]]): for example, ''aGVsbG8gSW9U'' is the Base64 encoding of ''Hello IoT''.
-The payload sent by the MQTT client must be encoded in Base64. +
-</WRAP>+
  
-You can also download a {{ :mqtt-emoncms-eguz-script.py.zip | python script}} that automates the data retrieval from the MQTT broker . 
-===== -. LoRaWAN Challenges ===== 
-Implement and provide technical documentation for each of the following challenges. 
- 
-==== -. The End-to-End Challenge ==== 
-I can send data from the device to the application. 
- 
-<WRAP center round tip 100%> 
-Note that the ''String'' function can be used to cast the message you want to send in a string format. 
-</WRAP> 
- 
-==== -. The Downlink Challenge ==== 
-I can send data from the application to the device. 
- 
-==== -. The Radio Challenge ==== 
-I can tune the LoRa radio parameters. 
- 
-These two commands can be helpful when used after the join event: 
- 
-<code c++> 
-LMIC_disableChannel(N); 
-LMIC_setDrTxpow(DR_SF12,14); 
-</code> 
  
-==== -. The Sensor Challenge ==== 
-I can use different sensors to send data from the device: PIR, moisture, temperature, light, etc.  
  
iot_leb_hackathon.1552295076.txt.gz · Last modified: 2019/03/11 10:04 by samer