Fostering DIHs for Embedding Interoperability
in Cyber-Physical Systems of European SMEs

CPS communication

It feels already quite natural that connection to the Internet is practically everywhere. That feeling was build thanks to telecommunications infrastructure built over the years, carried out by big telecoms. That perspective is very true from smartphone users point of view, although, from the perspective of dispersed and exponentially increasing number of devices with embedded systems, it looks a bit different.

For instance if you are a farmer and you would like to have an update information from single sensors located in your fields, would you mind to buy a service for a proportional number of sim cards and its gateways? Or, you would use already chosen Internet Provider for your home network and simply connect to single gateway next to your house. Moreover if you are lucky, your neighbor already installed one public AP (access point) you and you don’t have to do much, just connect. 

Above alternative scenario describe exactly how does LoRaWAN brings its advantages. Below you will find more details how this transfers protocol works.

LoRaWAN™ is a Low Power Wide Area Network (LPWAN) protocol for IoT devices and LoRaWAN networks. The LoRaWAN specification provides interoperability among smart devices without the need of complex local installations. LoRaWAN network architecture is based on a star-of-stars topology with gateways as a transparent bridge relaying messages between end-devices and a central network server in the backend. Gateways are connected to the network server via standard IP connections while end-devices use single-hop wireless communication to one or many gateways.

All end-point communication is generally bi-directional, but also supports operation such as multicast enabling software upgrade over the air or other mass distribution messages to reduce the on air communication time.

Communication between end-devices and gateways is spread out on different frequency channels and data rates. The selection of the data rate is a trade-off between communication range and message duration. Due to the spread spectrum technology, communications with different data rates do not interfere with each other and create a set of “virtual” channels increasing the capacity of the gateway. LoRaWAN data rates range from 0.3 kbps to 50 kbps. To maximize both battery life of the end-devices and overall network capacity, the LoRaWAN network server is managing the data rate and RF output for each end-device individually by means of an adaptive data rate (ADR) scheme.

Standard LoRaWAN architecture topology

First step –  end node.

End nodes are equipment that supports certain sensor functions, has some processing power, and a radio module to convert the collected information into a radio signal. These devices can send data to the gateways and receive the data themselves. They can work on a small battery for many years, as long as they are put into deep sleep to optimize power consumption.

When the end device transmits information to the gateway, this transmission is categorized as “Uplink” and when it receives data from the gateway, the term “Downlink” is used. Based on this nomenclature, three types of terminal equipment can be distinguished:

– class A,
– class B,
– class C.

Class A devices are devices that consume the least energy compared to other classes. This is due to the fact that they can only receive information (Downlink) after sending their own data (Uplink). Class A devices are suitable for transmitting data at a specific interval, e.g. every 15 minutes, or for sending information based on events – e.g. when the measured temperature exceeds 21 ° C or drops below 19 ° C.

Class B nodes (Class B) allow to receive more messages than in the case of class A. This reduces message delays, but at the cost of lowering the energy efficiency of the device.

Finally, Class C devices (Class C) can still receive messages, except when they are sending data themselves. It is therefore the least energy efficient class and typically requires the use of a permanent power source for operation.

Next step –  using a gateway.

Gateways are also known as modems and access points. A gateway is a device that receives data transmitted by end nodes using LoRaWAN. These messages are often converted into packets that can be sent over traditional IP networks. The gateway is therefore connected to a network server to which it forwards all messages.

The gateways are transparent by design and have limited computing power. All complex operations and intelligent algorithms are implemented on a web server. Depending on the application, gateways can be divided into two types:
– for use inside buildings, examples of which are devices such as The Things Gateway,
– for outdoor use, such as Kerlink IoT Station and LoRiX One.

Managing the transfer – a network server

All messages sent through gateways are forwarded to the web server. It is here that more complicated processes related to data processing take place. It is primarily responsible for:

– data redirection and forwarding to relevant applications.

– determining which gateway is best for routing the message for the selected node. Typically, this operation is based on a comparison of the Link Quality parameter, which is calculated on the basis of RSSI (Receive Signal Strength Indication) and SNR (Signal to Noise Ratio) of previously received packets.

– removal of duplicate messages if it happened that data from a node was forwarded to the server by more than one gateway.

– decryption of messages sent from end nodes and encryption of information sent to nodes.

– gateways usually connect to the web server using an encrypted IP (Internet Protocol) connection. The network usually includes an interface to supervise the operation and installation of new gateways, allowing the ‘network controller to manage them, troubleshoot problems, detect faults, monitor alarms, etc.

Let’s grab the data –  application server

The application server is the place where the actual IoT application is carried out – one that does something meaningful based on the data collected by end devices. Application servers usually work on the basis of private or public clouds that connect to LoRaWAN network servers and perform specific tasks. The network server is responsible for the connection between the application server and LoRaWAN nodes and gateways.

Security first.

It is extremely important to ensure security in any LPWAN (Low Power Wide Area Network). LoRaWAN uses two layers of security for this purpose. One at the network level and one at the application level. Network-level security ensures that your end device is what it was meant to be, while application-level security ensures that your network operator cannot access your data. LoRaWAN uses AES encryption and key exchange.

-The network layer is responsible for identifying nodes, checking that messages actually come from specific devices, and is referred to as network integrity checking. It also performs MAC command encryption.
-The application layer encrypts and decrypts relevant, useful data.

Both keys are encrypted with 128-bit AES.

Viva freeware!

There is implemented the network server for free use as TheThingsNetwork project. You just need to invest in the one LoRaWAN gateway and desired number of end devices. Still, there could be used one of existing gateway nearby (depend on transmitter/receiver power), however we need to highlight that it’s nice to contribute to society and cover some blank spots in network coverage. The applications you can put on your own computer and that’s it. There is no need to buy SIM card for every end device and pay to use it.

Authors:

Kazimierz Wilk

Michał Błaszczak

IBCH PSNC