wikiroute

networking recipes

User Tools

Site Tools


esib_iot_challenge

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
esib_iot_challenge [2017/05/17 18:21] – [2. Backend] sameresib_iot_challenge [2017/05/17 18:40] – [3. Devices] samer
Line 72: Line 72:
 </WRAP> </WRAP>
  
 +Let us analyze to radio parameters in the sketch by answering the following questions.
  
-The pin mapping corresponds to the Dragino electronic schematic: +<WRAP left round help 100%
-<code c+++  * In the setup functionwhich channels are activated on the device?  
-const lmic_pinmap lmic_pins = { +  * What are the different spreading factors on each channel? 
-    .nss = 10+  * What is the regulation on the radio channels in LoRa? 
-    .rxtx = LMIC_UNUSED_PIN, +</WRAP>
-    .rst = 9, +
-    .dio = {2, 6, 7}, +
-}; +
-</code>+
  
-The send function is rescheduled TX_INTERVAL seconds after each transmission complete event:  +The LMIC library defines a set of events corresponding to the protocol machine stateThese events appear in the ''onEvent()'' function.
-<code c++> +
-        case EV_TXCOMPLETE: +
-            Serial.println(F("EV_TXCOMPLETE (includes waiting for RX windows)")); +
-            if(LMIC.dataLen) { +
-                // data received in rx slot after tx +
-                Serial.print(F("Data Received: ")); +
-                Serial.write(LMIC.frame+LMIC.dataBeg, LMIC.dataLen); +
-                Serial.println(); +
-            } +
-            // Schedule next transmission +
-            os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(TX_INTERVAL), do_send); +
-            break; +
-</code>+
  
-The send function is initially scheduled here: +<WRAP left round help 100%
-<code c+++  * What is the difference between the JOINING and the JOINED events?  
-do_send(&sendjob); +  * When is the EV_TXCOMPLETE event called? 
-</code>+</WRAP>
  
-The message containing the sensor values is transmitted on one of the radio channels: +Finally let us look at the message sending on the device. 
-<code c+++ 
-LMIC_setTxData2(1, (uint8_t*) buffer, message.length() , 0); +<WRAP left round help 100%
-</code>+  What is the function for sending messages on the device? How it is called? 
 +  * What is the period of message sending? Explain the implementation choice. 
 +  * Is this period guaranteed according to the LoRaWAN specification? 
 +</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]]. 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]].
 You can use mqtt-spy to debug the messages received from the LoRaWAN devices. For this, you should download the software tool from [[https://github.com/eclipse/paho.mqtt-spy/wiki]]. 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-spy to debug the messages received from the LoRaWAN devices. For this, you should download the software tool from [[https://github.com/eclipse/paho.mqtt-spy/wiki]]. 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''
esib_iot_challenge.txt · Last modified: 2021/08/28 09:53 by samer