wikiroute

networking recipes

User Tools

Site Tools


deploying_lorawan

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
deploying_lorawan [2017/01/04 11:13] – [2.1. Single Channel Gateway] samerdeploying_lorawan [2017/04/30 11:59] samer
Line 5: Line 5:
 [{{ :e2e-lorawan.png?direct&750 | Figure 2. Architecture of the LoRaWAN Platform}}] [{{ :e2e-lorawan.png?direct&750 | Figure 2. Architecture of the LoRaWAN Platform}}]
  
-===== -. End-nodes =====+===== -. Devices =====
 ==== -. Autonomo with LoRaBee ==== ==== -. Autonomo with LoRaBee ====
 +
 +For the devices in the LoRaWAN platform, we will use an Autonomo board with a LoRaBee holding the 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:
 +
 +<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>
 +
 + a light sensor on pin A0, A2 (moisture sensor), and D0 (temperature sensor).
 +  * OTA join method
 +  * Frequency channels
 +  * Message sending
 +
  
 ==== -. Arduino with Dragino Shield ==== ==== -. Arduino with Dragino Shield ====
Line 15: Line 44:
 The single channel gateway includes a LoRa transmission module (Dragino Shield) connected to a Raspberry Pi (2 or 3) as shown in Figure 1. Communication between the two modules is done over an SPI interface. The single channel gateway includes a LoRa transmission module (Dragino Shield) connected to a Raspberry Pi (2 or 3) as shown in Figure 1. Communication between the two modules is done over an SPI interface.
  
-[{{ :2017-01-04_11.34.54.jpg?direct&200 |Figure 2. LoRa single channel gateway}}] +[{{ :2017-01-04_11.34.54.jpg?direct&300 |Figure 2. LoRa single channel gateway}}] 
  
 In order to assemble the gateway, start by making the wire connections: the connection pins are identified in Figures 2 and 3. In order to assemble the gateway, start by making the wire connections: the connection pins are identified in Figures 2 and 3.
Line 37: Line 66:
 </code> </code>
  
-Now you can compile and run the packet forwarder as root.+Compile the packet forwarder:
 <code bash> <code bash>
 make all make all
-nohup ./single_chan_pkt_fwd & 
 </code> </code>
  
-<codedoc toggle description>+For gcc version 4.6.3, a compilation error results in the following warning ''unrecognized command line option '-std=c++11'''. Replace ''-std=c++11'' by ''-std=c++0x'' in the Makefile and recompile: 
 +<code> 
 +CFLAGS = -std=c++0x -c -Wall -I include/ 
 +</code> 
 + 
 +Now, you need to configure the single channel packet forwarder. This is done in the ''global_conf.json'' configuration file. Particularly, you need to choose the channel, the spreading factor, the pins for SPI communication, and the address of the backend server. Note that you can specify multiple backends for testing purposes. 
 + 
 +<file | global_config.json>
 { {
   "SX127x_conf":   "SX127x_conf":
Line 84: Line 119:
   }   }
 } }
-</codedoc>+</file> 
 + 
 +Finally, you can run the packet forwarder as root!
  
 <code bash> <code bash>
-gcc version 4.6.3 +nohup ./single_chan_pkt_fwd &
-unrecognized command line option '-std=c++11' +
-CFLAGS = -std=c++0x -c -Wall -I include/+
 </code> </code>
 ==== -. Kerlink IoT Station ==== ==== -. Kerlink IoT Station ====
deploying_lorawan.txt · Last modified: 2021/08/28 09:50 by samer