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

Next revision
Previous revision
Next revisionBoth sides next revision
esib_iot_challenge [2017/05/17 09:11] – created sameresib_iot_challenge [2017/05/17 09:36] – [2.1. Arduino with Dragino Shield] samer
Line 1: Line 1:
 ====== ESIB IoT Challenge ====== ====== ESIB IoT Challenge ======
  
-Starting from September 2016Saint-Joseph University of Beirut (USJ) will be deploying the first academic [[http://www.semtech.com/wireless-rf/internet-of-things/what_is_lora.html | LoRa]] network in LebanonThe network will support monitoring of micro-climate conditions in vineyardsHere below you can find detailed description of the experimental platform implementing an end-to-end LoRaWAN solution. The platform consists of the following elements:+Welcome to the ESIB IoT Challenge. In this challengeyou will designing and prototyping the first IoT services based on a LoRaWAN network. 
 + 
 +===== -. What is LoRaWAN Platform? ===== 
 + 
 +In this challenge, you will benefit from the first experimental platform implementing an end-to-end LoRaWAN solution in Lebanon. The platform consists of the following elements:
  
   * Devices that communicate to one or more gateways via a wireless interface using single hop LoRa and implementing the LoRaWAN protocol. These devices are physically connected to sensors that generate data.    * Devices that communicate to one or more gateways via a wireless interface using single hop LoRa and implementing the LoRaWAN protocol. These devices are physically connected to sensors that generate data. 
Line 9: Line 13:
  
 [{{ :lora-pilot-architecture.png?direct&650 | Figure 1. Architecture of the LoRaWAN Platform}}] [{{ :lora-pilot-architecture.png?direct&650 | Figure 1. Architecture of the LoRaWAN Platform}}]
 +
 ===== -. Devices ===== ===== -. Devices =====
-==== -. Autonomo with LoRaBee ==== 
- 
-Starting with the devices in the LoRaWAN platform, we will use an [[http://support.sodaq.com/sodaq-one/autonomо/|Autonomo]] board with a LoRaBee Microchip RN2483 module. According to [[http://shop.sodaq.com]], Autonomo is a matchbox-sized powerhouse which uses the new Atmel Cortex M0+ 32bit micro controller. One advantage of such device is that it can be powered by a smartphone-sized solar panel. 
- 
-In order to configure the Autonomo with LoRaBee device, you should follow these steps: 
- 
-    - Verify that you have the latest Arduino IDE from [[https://www.arduino.cc/en/Main/Software]] on your computer. 
-    - Install the board files as noted in [[http://support.sodaq.com/sodaq-one/autonomо/getting-started-autonomo/]]. 
-    - Add the following library {{ :sodaq_rn2483_2.zip |}} to your Arduino IDE as explained in [[https://www.arduino.cc/en/guide/libraries]]. 
- 
-Now you are ready to write a sketch for the device. Here is one example sketch {{ :test-lorawan-combined-loraserver-example.zip |}} where the autonomo is connected to three sensors: light, moisture, and temperature. Let us analyse some extracts of the code. 
- 
-In this part, you should put the keys for Over-The-Air Activation (OTAA) as explained in the {{ :lorawan102-20161012_1398_1.pdf |LoRaWAN specification}}:  
-<code c++> 
-// USE YOUR OWN KEYS! 
-const uint8_t devEUI[8] = 
-{ }; 
- 
-// USE YOUR OWN KEYS! 
-const uint8_t appEUI[8] = 
-{ }; 
- 
-const uint8_t appKey[16] = 
-{ }; 
-</code> 
-  
-The pins for connecting the sensors are specified in these declarations (A0 for light sensor, A2 for moisture sensor, and D0 temperature sensor): 
-<code c++> 
-int light_pin = A0; 
-int moisture_pin = A2;  
-int temperature_pin = 0; 
-int temperature_vcc_pin = 1; 
-int moisture_vcc_pin = 8; 
-int moisture_gnd_pin = 7; 
-</code> 
  
-The OTAA method is used for joining the network and Adaptive Data Rate (ADR) is activated: +==== -. PC Configuration ==== 
-<code c++> +In orde to program the LoRaWAN devices, you should verify the installation one your PC of the following software:
-LoRaBee.initOTA(loraSerial, devEUI, appEUI, appKey, true) +
-</code>+
  
-Eight different sub channels are activated with data rate ranges from 0 to 5: +  * Arduino IDE 
-<code c++> +  * LMIC Library
-LoRaBee.configChFreq(0, 868100000L,0,5,1); +
-LoRaBee.configChFreq(1, 868300000L,0,5,1);  +
-LoRaBee.configChFreq(2, 868500000L,0,5,1); +
-LoRaBee.configChFreq(3, 867100000L,0,5,1); +
-LoRaBee.configChFreq(4, 867300000L,0,5,1); +
-LoRaBee.configChFreq(5, 867500000L,0,5,1); +
-LoRaBee.configChFreq(6, 867700000L,0,5,1); +
-LoRaBee.configChFreq(7, 867900000L,0,5,1); +
-</code>+
  
-Finally, the message containing the sensor values is sent in an unconfirmed uplink message: 
-<code c++> 
-LoRaBee.send(1, (uint8_t*)message.c_str(), message.length()) 
-</code> 
 ==== -. Arduino with Dragino Shield ==== ==== -. Arduino with Dragino Shield ====
 === -. Periodic Message Sending === === -. Periodic Message Sending ===
  
-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 {{ :test-loraserver-comb-loraserver-dragino.zip |}} and modify it according to your preferences. Below you can find somme commented extracts of the sketch.+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 [[simple_lora_prototype|Simple Prototype of LoRa Communications]]. You can download the following sketch {{ :test-loraserver-comb-loraserver-dragino.zip |}} and modify it according to your preferences. Below you can find somme commented extracts of the sketch.
  
 The pin mapping corresponds to the Dragino electronic schematic: The pin mapping corresponds to the Dragino electronic schematic:
esib_iot_challenge.txt · Last modified: 2021/08/28 09:53 by samer