LoRa

LoRa


         LoRa is a technology that has been developed by Cycleo and marketed essentially by "Semtech". It offers a physical layer allowing a long range wireless communication with long range, low data rate and low energy consumption. 

        LoRa can be used with public, private or hybrid networks to achieve a greater range than range than cellular networks. LoRa technology is widely used in the in the world of the Internet of Things (IoT). 

        In particular, it allows the transmission of low-volume data through fixed, low-cost sensors that run on batteries for 5 to 10 years. 
The LoRa protocol is the type of modulation used between two "LoRa Devices" or between a "Device" and a "LoRa between a "Device" and a "Gateway". 

        When we talk about the whole communication chain, then we talk about LoRaWAN protocol:
              ■ LoRa protocol : Type of modulation allowing to send data between a 
transmitter and a receiver. 
             ■ LoRaWAN protocol : Network architecture (Device, Gateway, Servers) and specific frame format  format allowing a "LoRaWAN Device" to transmit data to a LoRaWAN server. 


The LoRa link layer: LoRaWAN

        The Long Range Network (LoRaWAN) is the communication protocol and system architecture of the network. LoRaWAN has the ability to affect the following :

- Node battery life
- Network capacity
- Quality of Service
- Security
- Applications served by the network

1/Architecture of a LoRaWAN network


        The LoRaWAN network uses a star network topology, in which a gateway transparently relays 
gateway transparently relays messages between the network server and the terminal, as shown in the 
terminal, as shown in the figure below. Terminals use LoRa to communicate with gateways connected to the server via an IP network (wired, 3G, WiFi, etc.). 

        The communication between the terminals and the gateways is spread over different frequency channels and the data rates are frequency channels and the data rates are determined according to the range and duration of the message .

        This selection can be managed by a LoRaWAN network infrastructure, which 
selects the data rate and channel for each terminal using an ADR (Adaptive Data Rate) algorithm. 
(Adaptive Data Rate) algorithm. This algorithm is a technique used to save energy and increase range. 
and increase range.


A LoRaWAN network includes the following: 

      *  End Nodes 

LoRa Devices are electronic systems belonging to the IoT world: 
       low consumption, 
       low size, 
       low power 
       low cost.

They have a LoRa radio to reach the Gateways. Gateways are not are not specifically addressed: all those present in the coverage area receive the messages and receive the messages and process them.

      *  Getway

    All data transmitted by the node is sent to all gateways and each gateway that receives a signal 
each gateway that receives a signal forwards it to a Network Server. Each gateway LoRa gateway has a unique identifier (64-bit EUI). 

     This ID is useful to register and activate a gateway on a Network Server. Typically, gateways and network servers are connected via a servers are connected via a link (cellular, Wi-Fi, Ethernet or satellite).

  *  Network server

    All the intelligence, i.e. the management of the adaptive flow, the security of the data or the redundancy of the received data, is provided by the network server.

 Finally, the network server communicates with one or more application servers through which the 
application providers use the data from their equipment. 

The information transmitted to the Network Server from LoRa devices is authenticated using a 128-bit AES key called the AES 128 bits key called Network Session Key: NwkSKey.

 *  Application server

    It is often on the same physical medium as the Network Server. It allows to dissociate the applications from each other. 
    Each application registers LoRa devices that will be allowed to store their data. The messages transmitted to the application server are encrypted with a 128-bit AES key called Application Session Key: AppSKey.



2/The data exchange protocol between the connected objects and the gateway

        According to the LoRaWAN protocol, the communication between the connected objects and the 
gateways located in its detection field is bidirectional and alternated (Half Duplex). Therefore, a distinction is made between the uplink and the downlink, as seen from the point of view of the 
point of view of the connected object. Thus, we speak of : 

-  Uplink: data transmitted by the connected object to the gateway; 
- Downlink: data transmitted by a gateway to a connected object. 

    The data exchange mechanism is as follows: all the gateways in the network in "listening" mode, and as soon as a connected object located in their detection field transmits data, they receive all the 
detection field, they receive all the data that they retransmit to the server, adding server, adding a data reception level information called RSSI (Received Signal Strength Indication) , and when the server sends data back to the object, it only to the gateway that has measured the highest reception level .

The LoRaWAN protocol defines three classes of equipment:

  • Class A "All": 
    This is the most energy-efficient class, where a terminal remains in standby mode most of the time. 
in standby mode. It offers two-way communication in which an uplink transmission is followed by two 
transmission (Uplink) is followed by two short, randomly defined downlink windowsrandomly defined.  
   The connected object decides when it wants to transmit its data to the gateways, and the server has two time windows during which it can transmit data to the transmit data to the connected object, via the most suitable gateway in terms of reception level.

  • Class B "Beacon":
     The operation is the same as for class A with the addition of a programmed reception slot programmed in addition to the two random windows. This class allows a compromise between energy consumption and the need for bidirectional communication. 

    In this mode of operation, it is always the connected object that has the initiative to transmit data, but then the server takes priority, and can, every 128 seconds, through a synchronization signal (Beacon) to continue transmitting data to the connected object for another 128 seconds .

    A LoRa class B device can be reached regularly without necessarily having to transmit. necessarily obliged to transmit. On the other hand, it consumes more power than a class "A".


  • Class C "Continuous":
     It concerns the "end devices" that listen to the network continuously. This mode of operation is reserved for this operating mode is reserved for devices that do not have energy constraints. 
     A LoRa device of class C is permanently reachable. On the other hand, this is the class of device 
that consumes the most energy .



3/LoRaWAN package

The following figure shows a package of LoraWan or :

  • Mtype: This field indicates the type of message (up or down).
  • RFU: This field is reserved for future use.
  • Major: This field indicates the version of the protocol used.
  • MIC: This field allows the calculation of the integrity of the packet in order to detect if it has been altered during its transport.
  • DevAddr: This field contains the address of the equipment.
  • FCtrl: This field allows the adaptation of the flow and the acknowledgments. It indicates the presence of additional packets and the length of the FOpts field.
  • FCnt : This field is a frame counter (increment at each sending).
  • FOpts: This field is used to pass MAC commands (connectivity control by an equipment for example).
  • FPort: This field contains the port of the application or service to which the packet is addressed.




4/Activation of equipment and security

 The LoRaWAN protocol is based on an identification system. A communicating object must therefore be activated in order to transfer data on this network. Activating a node consists in informing these 3 parameters:

  • Device Address (DevAddr) : Similar to the device IP
  • Application Session Key (AppSKey) 
  • Network Session Key (NwkSKey) 
       Knowing that each object, or device, has these fields:

                - Device EUI (DevEUI): Defines the ID of a device
                - Application EUI (AppEUI) : ID of the application to which the device is attached.

        here are two methods of activation: Activation By Personalization (ABP) and On-The-Air 
On-The-Air (OTA) activation.

                - ABP is the manual method since it activates a device only when a DevAddr, a NwkSKey and an AppSKey have been manually entered.

                - The OTA is a tool allowing the device and the server to agree on encryption keys (AppSKey and NwkSKey) and a DevAddr. This method activation method is much more secure than ABP because it allows to create dynamically dynamically create encryption keys at each activation of a device. It requires the transaction of two messages: a JOIN_REQUEST and a JOIN_ACCEPT.

Commentaires