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 revision Previous revision
Next revision
Previous revision
deploying_lorawan [2017/05/01 15:43]
samer [4.1. mqtt-spy]
deploying_lorawan [2021/08/28 09:50] (current)
samer
Line 8: Line 8:
   * Applications that enable to visualize and store the sensor data obtained from the devices.    * Applications that enable to visualize and store the sensor data obtained from the devices. 
  
-[{{ :lora-pilot-architecture.png?direct&650 | Figure 2. Architecture of the LoRaWAN Platform}}] +[{{ :lora-pilot-architecture.png?direct&650 | Figure 1. Architecture of the LoRaWAN Platform}}] 
-===== -Devices ===== +===== - Devices ===== 
-==== -Autonomo with LoRaBee ====+==== - 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. 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.
Line 67: Line 67:
 LoRaBee.send(1, (uint8_t*)message.c_str(), message.length()) LoRaBee.send(1, (uint8_t*)message.c_str(), message.length())
 </code> </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 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.
Line 112: Line 112:
 </code> </code>
  
-=== -Triggered Message Sending ===+=== - Triggered Message Sending ===
  
 You can also find another example of sketch to download: {{ :test-loraserver-moisture-on-move.ino.zip |}}. Here the message sending is not periodic but related to an event. For example, an infrared sensor detects a movement and triggers a signal for the device to send a LoRaWAN message. Note also that the join method used in this second sketch is Activation by Personalisation (ABP): the device address, the network session key, and the application session key are directly configured on the device. You can also find another example of sketch to download: {{ :test-loraserver-moisture-on-move.ino.zip |}}. Here the message sending is not periodic but related to an event. For example, an infrared sensor detects a movement and triggers a signal for the device to send a LoRaWAN message. Note also that the join method used in this second sketch is Activation by Personalisation (ABP): the device address, the network session key, and the application session key are directly configured on the device.
-===== -Gateways ===== +===== - Gateways ===== 
-==== -Single Channel Gateway ====+==== - Single Channel Gateway ====
  
-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 2. Communication between the two modules is done over an SPI interface.
  
 [{{ :2017-01-04_11.34.54.jpg?direct&300 |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 3 and 4
-[{{ :schema-single-channel-pi3.png?direct&300 |Figure 2. Dragino pin mapping}}] +[{{ :schema-single-channel-pi3.png?direct&300 |Figure 3. Dragino pin mapping}}] 
-[{{ :schema-pins-pi3.png?direct&300 |Figure 3. Raspberry pi 3 pins}}]+[{{ :schema-pins-pi3.png?direct&300 |Figure 4. Raspberry pi 3 pins}}]
  
 Connect the Raspberry Pi to the Internet and install the packet forwarding software. The source code of the single channel packet forwarder is available on: [[https://github.com/samerlahoud/single_chan_pkt_fwd]]. In order to install it, you need to: Connect the Raspberry Pi to the Internet and install the packet forwarding software. The source code of the single channel packet forwarder is available on: [[https://github.com/samerlahoud/single_chan_pkt_fwd]]. In order to install it, you need to:
Line 159: Line 159:
 nohup ./single_chan_pkt_fwd & nohup ./single_chan_pkt_fwd &
 </code> </code>
-==== -Kerlink IoT Station ====+==== - Kerlink IoT Station ====
  
 +more /etc/sysconfig/network
 <code> <code>
 # activates eth0 at startup # activates eth0 at startup
Line 201: Line 202:
 [root@Wirgrid_0b03008c demo_gps_loramote]#  [root@Wirgrid_0b03008c demo_gps_loramote]# 
 </code> </code>
 +===== - Backend =====
 +==== - Loraserver ====
  
-===== -Backend ===== +The Loraserver has a web interface for configuring the applications and devices on the platformFull details for installing the software are provided on [[https://www.loraserver.io]]
-==== -Loraserver ==== +
-==== -The Things Network ====+
  
-===== -. Applications ===== +[{{ :app-loraserver.png?direct&400 | Figure 5Loraserver web interface}}]
-==== -mqtt-spy ====+
  
-mqtt-spy is an open source utility intended to help you with monitoring activity on MQTT topics. It'been designed to deal with high volumes of messages, as well as occasional publications. mqtt-spy is a JavaFX application, so 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]]. +Start by creating and application as in Figure 5. Then create a node in this application and provide the following information: 
-Start by downloading the software tool from the previous link. After launching, 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 MQTT topicyou can receive all messages by entering the '#' topic or limit to the topic including the messages of specific device: ''application/1/node/DEVICE_EUI/rx''+  * A unique node name 
-==== -Emoncms ====+  * The node description 
 +  * A unique device EUI on 64 bits: Random identifiers can be generated on [[https://www.random.org/bytes/]] 
 +  * The application EUI on 64 bits: this can be a common identifier for all nodes using the same application. 
 +  * A unique application key on 128 bits 
 + 
 +In order to enable OTAA join method, you have to make sure that the ''ABP activation'' button is unchecked.  
 + 
 + 
 +==== - The Things Network ==== 
 + 
 +===== - Applications ===== 
 +==== - mqtt-spy ==== 
 + 
 +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''.  
 +==== - Emoncms ====
deploying_lorawan.1493646191.txt.gz · Last modified: 2017/05/01 15:43 by samer