wikiroute

networking recipes

User Tools

Site Tools


lorawan_downlink

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
Last revisionBoth sides next revision
lorawan_downlink [2017/09/04 20:40] – [4.1. Autonomo with LoRaBee] samerlorawan_downlink [2017/12/13 17:30] – [5. Selecting the Receive Windows] samer
Line 63: Line 63:
  
 This sketch {{ ::example-code-autonomo.ino.zip |}} can be used as an example. The following extract denotes the part corresponding to receiving downlink messages. For example, the received value can be used to trigger some action on the Arduino module. This sketch {{ ::example-code-autonomo.ino.zip |}} can be used as an example. The following extract denotes the part corresponding to receiving downlink messages. For example, the received value can be used to trigger some action on the Arduino module.
- 
-<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(); 
-      } 
-</code> 
-==== -. Arduino with Dragino Shield ==== 
-Devices in the LoRaWAN platform can also be implemented on Arduino boards with Dragino shields. The combined module as well as the basic configuration steps are presented in [[simple_lora_prototype|Simple Prototype of LoRa Communications]]. Similarly to the Autonomo device, you can download the following sketch {{ ::example-code-arduino.ino.zip |}} and modify it according to your preferences. Below you can find an extract of the receiving function for downlink messages. 
  
 <code c++> <code c++>
Line 107: Line 94:
 } }
 </code> </code>
 +==== -. Arduino with Dragino Shield ====
 +Devices in the LoRaWAN platform can also be implemented on Arduino boards with Dragino shields. The combined module as well as the basic configuration steps are presented in [[simple_lora_prototype|Simple Prototype of LoRa Communications]]. Similarly to the Autonomo device, you can download the following sketch {{ ::example-code-arduino.ino.zip |}} and modify it according to your preferences. Below you can find an extract of the receiving function for downlink messages.
  
 +<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();
 +      }
 +</code>
 ===== -. Selecting the Receive Windows ===== ===== -. Selecting the Receive Windows =====
  
-The selection of the receive window is one important parameter in receiving downlink messages. Here you should note these two important limitations:+The selection of the receive window is one important parameter in receiving downlink messages. Thus, you should note these two important limitations:
  
   - The LoraWAN-in-C library used on the Arduino based devices has only been tested for receiving downlink packets in the RX2 window.    - The LoraWAN-in-C library used on the Arduino based devices has only been tested for receiving downlink packets in the RX2 window. 
   - The Microchip LoRaBee is configured by default with RX2 corresponding to SF9 on the center frequency 869525000 Hz. However, the LoRaWAN specification recommends for RX2 the same sub-channel but with SF12.   - The Microchip LoRaBee is configured by default with RX2 corresponding to SF9 on the center frequency 869525000 Hz. However, the LoRaWAN specification recommends for RX2 the same sub-channel but with SF12.
  
-Therefore, the recommended configuration consists of selecting to receive on RX2 for Arduino based devices (this is mandatory) and RX1 for autonomo based devices (this is the easiest configuration). +Therefore, the recommended configuration consists of selecting to receive on RX2 for Arduino based devices (this is mandatory) and RX1 for autonomo based devices (this is the easiest configuration). Figure 3 shows the configuration interface of loraserver that enables to select the receive windows for each configured device.  
 + 
 +[{{ undefined:loraserver-downlink-dr.png?durect&650 | Figure 3. Receive window selection on loraserver backend}}]
  
-[{{ undefined:loraserver-downlink-dr.png?durect&650 | Figure 3. Receive window selection on lora server backend}}]+<WRAP center round tip 60%> 
 +Without configuring the receive window, with OTAA mode, autonomo is receiving on RX1. 
 +</WRAP>
lorawan_downlink.txt · Last modified: 2021/08/28 09:53 by samer