lorawan_downlink
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
lorawan_downlink [2017/08/22 21:50] – [4.2. Arduino with Dragino Shield] samer | lorawan_downlink [2017/12/13 17:30] – [5. Selecting the Receive Windows] samer | ||
---|---|---|---|
Line 6: | Line 6: | ||
According to the [[https:// | According to the [[https:// | ||
- | * The first receive window is implemented on the same channel and data rate as the uplink | + | * The first receive window is implemented on the same channel and data rate as the uplink. |
* The second receive window is implemented on a predefined channel and data rate. This window can also be modified by MAC commands. | * The second receive window is implemented on a predefined channel and data rate. This window can also be modified by MAC commands. | ||
Line 33: | Line 33: | ||
You can use mqtt-spy to debug the messages received from the LoRaWAN devices. Start by configuring a new connection to the MQTT broker by simply adding the IP address of the broker in the '' | You can use mqtt-spy to debug the messages received from the LoRaWAN devices. Start by configuring a new connection to the MQTT broker by simply adding the IP address of the broker in the '' | ||
- | In order to send downlink data to a specific device, you should publish the encoded message in the corresponding topic '' | + | In order to send downlink data to a specific device, you should publish the encoded message in the corresponding topic '' |
< | < | ||
Line 47: | Line 47: | ||
The payload sent by the MQTT client must be encoded in Base64. | The payload sent by the MQTT client must be encoded in Base64. | ||
</ | </ | ||
- | |||
==== -. Using IoT MQTT Dashboard ==== | ==== -. Using IoT MQTT Dashboard ==== | ||
[[https:// | [[https:// | ||
Line 55: | Line 54: | ||
{{: | {{: | ||
{{: | {{: | ||
+ | |||
Line 62: | Line 62: | ||
In the LoRaWAN platform, we support devices based on an [[http:// | In the LoRaWAN platform, we support devices based on an [[http:// | ||
- | This sketch {{ :: | + | This sketch {{ :: |
- | + | ||
- | <code c++> | + | |
- | case EV_TXCOMPLETE: | + | |
- | Serial.println(F(" | + | |
- | if (LMIC.dataLen) { | + | |
- | // data received in rx slot after tx | + | |
- | Serial.print(F(" | + | |
- | Serial.write(LMIC.frame + LMIC.dataBeg, | + | |
- | Serial.println(); | + | |
- | } | + | |
- | </ | + | |
- | ==== -. 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 {{ : | + | |
- | + | ||
- | We tested two types of devices on the LoRaWAN platform. The first type is based 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]]. The second one is based on [[http:// | + | |
- | + | ||
- | {{ :: | + | |
<code c++> | <code c++> | ||
Line 111: | Line 94: | ||
} | } | ||
</ | </ | ||
+ | ==== -. 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 {{ :: | ||
+ | <code c++> | ||
+ | case EV_TXCOMPLETE: | ||
+ | Serial.println(F(" | ||
+ | if (LMIC.dataLen) { | ||
+ | // data received in rx slot after tx | ||
+ | Serial.print(F(" | ||
+ | Serial.write(LMIC.frame + LMIC.dataBeg, | ||
+ | Serial.println(); | ||
+ | } | ||
+ | </ | ||
+ | ===== -. Selecting the Receive Windows ===== | ||
+ | |||
+ | 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 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). Figure 3 shows the configuration interface of loraserver that enables to select the receive windows for each configured device. | ||
+ | |||
+ | [{{ undefined: | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | Without configuring the receive window, with OTAA mode, autonomo is receiving on RX1. | ||
+ | </ |
lorawan_downlink.txt · Last modified: 2021/08/28 09:53 by samer