lamaPLC Communication: LoRa / LoRaWAN

lamaPLC Communication: LoRa / LoRaWAN LoRa (from “long range”) is a physical proprietary radio communication technique. It is based on spread spectrum modulation techniques derived from chirp spread spectrum (CSS) technology. It was developed by Cycleo, a company of Grenoble, France, and patented in 2014. Cycleo was later acquired by Semtech.

LoRaWAN (wide area network) defines the communication protocol and system architecture. LoRaWAN is an official standard of the International Telecommunication Union (ITU), ITU-T Y.4480. The continued development of the LoRaWAN protocol is managed by the open, non-profit LoRa Alliance, of which Semtech is a founding member.

Together, LoRa and LoRaWAN define a low-power, wide-area (LPWA) networking protocol designed to wirelessly connect battery operated devices to the Internet in regional, national or global networks, and targets key Internet of things (IoT) requirements, such as bi-directional communication, end-to-end security, mobility and localization services. The low power, low bit rate, and IoT use distinguish this type of network from a wireless WAN that is designed to connect users or businesses, and carry more data, using more power. The LoRaWAN data rate ranges from 0.3 kbit/s to 50 kbit/s per channel.

LoRa uses license-free sub-gigahertz radio frequency bands EU868 (863–870/873 MHz) in Europe; AU915/AS923-1 (915–928 MHz) in South America; US915 (902–928 MHz) in North America; IN865 (865–867 MHz) in India; and AS923 (915–928 MHz) in Asia; LoRa enables long-range transmissions with low power consumption.

The technology covers the physical layer, while other technologies and protocols such as LoRaWAN (long range wide area network) cover the upper layers. It can achieve data rates between 0.3 kbit/s and 27 kbit/s, depending upon the spreading factor.

LoRa is one of the most popular low-power wireless sensor network technologies for the implementation of the Internet of Things, offering long-range communication compared to technologies such as Zigbee or Bluetooth, but with lower data rates.

LoRa devices have geolocation capabilities used for trilaterating positions of devices via timestamps from gateways.

LoRaWAN

Since LoRa defines the lower, physical, layer, the upper networking layers were lacking. LoRaWAN is a protocol that was developed to define the upper layers of the network. LoRaWAN is a cloud-based medium access control (MAC) layer protocol, but acts mainly as a network layer protocol for managing communication between LPWAN gateways and end-node devices, as a routing protocol maintained by the LoRa Alliance.

LoRaWAN defines the communication protocol and system architecture for the network, while LoRa's physical layer enables the long-range communication link. LoRaWAN is also responsible for managing the communication frequencies, data rate, and power for all devices. Devices in the network are asynchronous and transmit when they have data available to send.

Data transmitted by an end-node device is received by multiple gateways, which forward the data packets to a centralized network server. Data is then forwarded to application servers. This technology shows high reliability for the moderate load, however, it has some performance issues with sending acknowledgements.

LoRaWAN networks simplify system building. LoRaWAN is a wireless specification that achieves low-power wide-area (LPWA) wireless networks for the Internet of Things (IoT) as an open global standard.

LoRa schema

CSMA for LoRaWAN

In wireless communication, particularly within the IoT domain, effective channel utilization and collision avoidance are essential for network reliability and spectral efficiency. Previously, LoRaWAN has relied upon ALOHA as the medium access control (MAC) layer protocol, but to improve this, the LoRa Alliance's Technical Recommendation TR013 introduces CSMA-CA, which is tailored to account for LoRa's distinctive modulation characteristics, including Spreading Factor orthogonality, and the capability for below noise-floor communication.

This adaptation overcomes the limitations of simple received signal strength (RSS)-based sensing, which can disrupt these unique properties. Implementing TR013 enhances LoRaWAN's spectrum efficiency and ensures more reliable device communication, including in congested environments.

Adaptive Data Rate

To maximize the battery life of each end-device and the overall capacity available through the network, LoRaWAN® uses an Adaptive Data Rate (ADR) mechanism for optimizing data rates, airtime, and power consumption. ADR controls the following transmission parameters on end-devices:

  • Spreading factor: the speed of data transmission. Lower spreading factors mean a higher data transmission rate.
  • Bandwidth: the amount of data that can be transmitted from one point to another within the network.
  • Transmission power: the energy that the end-device transmitter produces at its output.

The table below shows compares spreading factor, data rate, and time on-air at a bandwidth of 125 kHz (range is an indicative value, it will depend on the propagation conditions):

Spreading FactorData RateRangeTime on-Air
SF75470 bps2 km56 ms
SF83125 bps4 km100 ms
SF91760 bps6 km200 ms
SF10980 bps8 km370 ms
SF11440 bps11 km40 ms
SF12290 bps14 km1400 ms

Regional Parameters

The LoRaWAN Regional Parameters specification is a companion to the LoRaWAN network layer specification. While the LoRaWAN network layer specification defines the air interface between a compliant end-device (sensor, actuator, tracker, etc.) and a compliant network core, the LoRaWAN Regional Parameters specification defines the adaptation of the LoRaWAN® network layer specification to comply with the various regulations enforced throughout the world on the use of various frequency bands of the unlicensed spectrum which are available.

Also, the LoRaWAN Regional Parameters specification documents the physical layer configurations required for the compliant operation of LoRaWAN Link Layer radios using various radio frequency modulation techniques.#

Classes

The LoRaWAN specification has three different communication profiles between devices and applications: Class A, Class B, and Class C. Each class serves different application needs and has optimized requirements for specific purposes. The main difference between the three classes is latency and power consumption; end-devices can always send uplinks when needed, but its class will determine when to receive downlinks.

Class A: "Aloha"

Class A devices implement a bi-directional communication profile where two short downlinks follow the end-device uplink transmission receive windows, usually referred to as RX1 and RX2. If the server does not respond in either RX1 or RX2 windows, the next opportunity will be after the next uplink transmission. Class A devices are often battery-powered and spend most of the time in sleep mode; therefore, they have the lowest energy consumption, keep long intervals between uplinks, and have high downlink latency.

Class B: The "Beaconing" Class

Class B devices extend Class A devices by adding scheduled receive windows for downlinks, and, therefore, they emulate a continuously receiving device by opening receive windows at fixed time intervals. This class should be implemented when low latency of downlink communication while keeping the power consumption as low as possible is required.

Class C: Continuous Reception

Class C communication profile is used in applications with enough power available, so there is no need to minimize the time of the reception windows; this is the case of most actuators (e.g., smart plugs, street lights, electrical meters, etc.) Class C devices always listen for downlinks messages unless they transmit an uplink message. This behavior results in the lowest latency between the server and the end-device.

Authentication and Security

Authentication and security are also important in LoRaWAN networks. Any LoRaWAN network has a baseline authentication and security framework based on the AES 128 encryption scheme. Compared to other LPWAN's, which rely on a single key for authentication and encryption, the LoRaWAN framework separates both. Authentication and integrity control use a network session key (NwkSKey) while user data encryption uses an application session key (AppSKey).

LoRaWAN® supports two authentication and activation methods: Over-The-Air-Activation (OTAA) and Activation by Personalization (ABP).

Over-The-Air Activation (OTAA)

In this method, end-devices are not initialized for any particular network; they send a JOIN request to a specific LoRaWAN network and then receive a device address and an authorization token from which session keys are derived; NwkSKey and AppSKey are derived during this procedure from a root AppKey pre-provisioned in the end-devices by its manufacturer.

Activation by Personalization (ABP)

In this method, end-devices are personalized to work with a given LoRaWAN® network. End-devices are pre-provisioned with the NwkSKey and AppSKey and the 32-bits device network address.

LoRa Alliance

The LoRa Alliance is an open, non-profit association whose stated mission is to support and promote the global adoption of the LoRaWAN standard for massively scaled IoT deployments, as well as deployments in remote or hard-to-reach locations.

Members collaborate in a vibrant ecosystem of device makers, solution providers, system integrators and network operators, delivering interoperability needed to scale IoT across the globe, using public, private, hybrid, and community networks. Key areas of focus within the Alliance are Smart Agriculture, Smart Buildings, Smart Cities, Smart Industry, Smart Logistics, and Smart Utilities.

Key contributing members of the LoRa Alliance include Actility, Amazon Web Services, Cisco. Everynet, Helium, Kerlink, MachineQ, a Comcast Company, Microsoft, MikroTik, Minol Zenner, Netze BW, Semtech, Senet, STMicroelectronics, TEKTELIC, and The Things Industries. In 2018, the LoRa Alliance had over 100 LoRaWAN network operators in over 100 countries; in 2023, there are nearly 200, providing coverage in nearly every country in the world.

Arduino and LoRa

Arduino brings LoRa connectivity to your projects with several boards, addons and libraries.

The MKR WAN 1300 and 1310 boards provide you with a practical and cost-effective solution to applications that require LoRa connectivity and low-power consumption. The MKR WAN 1300 and 1310 boards are based on a SAMD21 microcontroller from Microchip;

MKR WAN 1300

they also features a CMCMWX1ZZABZ module from Murata for LoRa connectivity, the ATECC508 cryptoauthentication device for security, and a 2MB SPI Flash memory for onboard storage.