I. What are LoRa and LoRaWAN?

LoRa: LoRa is a linear frequency modulation spread spectrum (CSS) wireless modulation technology that uses chirp pulse encoding to transmit data. LoRa modulation has strong anti-interference capabilities and a long transmission distance (3-5 kilometers in urban environments, and over 15 kilometers in suburban areas). It is particularly suitable for low bit rate, small data transmission scenarios, significantly increasing transmission distance compared to WiFi, Bluetooth, or ZigBee at the same power consumption. These characteristics make it an ideal choice for low-power IoT sensors and actuators. LoRa can operate in unlicensed sub-gigahertz bands, such as 915 MHz, 868 MHz, and 433 MHz.

LoRaWAN: LoRaWAN is a low-power wide-area network (LPWAN) communication protocol built on LoRa modulation. It defines the communication rules, encryption mechanisms, network access procedures, and three operating modes (Class A/B/C) between terminal devices, gateways, and servers in a star network architecture. LoRaWAN uses gateway relay to achieve long-distance transmission of small data (such as sensor data) while ensuring low-power operation of devices.

II. LoRaWAN Protocol Features

1. Ultra-Low Power Consumption: LoRaWAN end devices are optimized to operate with microamps of current in low-power mode.

2. Unlicensed Spectrum: LoRaWAN networks can be deployed without paying expensive spectrum licensing fees using ISM bands (470/868/915MHz).

3. High Capacity: A single gateway can theoretically support thousands of end devices, and the network can scale to millions of devices.

4. Public and Private Deployment: Public and private LoRaWAN networks can be easily deployed using the same hardware (gateway, end devices, antennas) and software (UDP packet forwarder, base station software, and the LoRaWAN stack for end devices).

5. End-to-End Security: LoRaWAN uses AES-128 encryption to ensure secure communication between end devices and application servers. 6. Long Distance: LoRaWAN gateways can transmit and receive signals over distances exceeding 10 kilometers in open areas and up to 3 kilometers in densely populated urban areas.

III. LoRaWAN Architecture

The LoRaWAN network adopts a star topology, which is also a typical LoRaWAN network architecture. A complete communication link mainly includes terminal devices, gateways, network servers (NS), and application servers (AS).

1. Terminal Devices: Sensors/actuators integrating LoRa radio frequency, responsible for data acquisition and transmission.

2. Gateway: A protocol converter that demodulates LoRa radio frequency signals and encapsulates them into IP data packets for forwarding to the network server. Note: The gateway only performs protocol conversion and does not participate in business logic.

3. Network Server (NS): Manages MAC layer communication, network layer keys (NwkSKey), and device lifecycle.

4. Application Server (AS): Software running on the server, responsible for parsing application data and executing business logic.

Commonly used servers:

1. The Things Stack (TTS): The Things Stack is a complete software package that includes both NS and AS. The Things Network (TTN) is a community platform that deploys this software on the public internet and provides services to the outside world. TTN is the most well-known public deployment of TTS. (Can be used directly for verification)

2. ChirpStack: ChirpStack is a complete software package that includes both NS and AS. (Requires self-deployment before use)