Guide

LoRaWAN Infrastructure & Network Server Guide 2026

15+ km range, 10+ year battery life, thousands of device capacity. A comprehensive technical guide for LoRaWAN network architecture, network server selection, gateway deployment, and Turkey/Northern Cyprus implementations.

Table of Contents

LoRaWAN (Long Range Wide Area Network) is one of the most powerful wireless communication protocols in the IoT world. With its low power consumption, long range, and low cost advantages, it forms the core infrastructure for smart agriculture, energy monitoring, smart city, and industrial IoT projects. In this comprehensive guide, you will find all technical details from LoRaWAN network architecture to network server setup, gateway selection to security protocols.

15+ km
Range
Line of sight
10+ years
Battery Life
With Class A
1000+
Devices/Gateway
Single gateway
868 MHz
Frequency
Unlicensed ISM
0.3-50 kbps
Bandwidth
SF dependent
-137 dBm
Receiver Sensitivity
Receiver sensitivity
SF7-SF12
Spreading Factor
Automatic with ADR
AES-128
Encryption
End-to-end
1
Chapter 1

What Is LoRaWAN and How Does It Work?

LoRaWAN is an LPWAN (Low Power Wide Area Network) protocol built on Semtech’s LoRa (Long Range) radio modulation technology and standardized by the LoRa Alliance. It has been used in millions of devices worldwide since 2015.

LoRaWAN vs Other LPWAN Technologies

LoRaWAN offers distinct advantages over other LPWAN technologies such as Sigfox and NB-IoT:

  • Unlicensed frequency: Operates in ISM band, operator-independent
  • Private network deployment: You can set up your own gateway and network server
  • Bidirectional communication: Device control via downlink messages is possible
  • Open ecosystem: Gateway and sensor options from hundreds of manufacturers
  • Scalability: Manage thousands of devices with a single gateway

LoRa Modulation Technique

LoRa uses the Chirp Spread Spectrum (CSS) modulation technique. The signal spreads across a wide frequency band, providing resilience against noise and interference. This enables reliable communication even at signal strengths as low as -137 dBm.

  • Spreading Factor (SF): SF7-SF12 range, range/speed trade-off
  • Bandwidth: 125 kHz, 250 kHz, or 500 kHz
  • Coding Rate: Error correction between 4/5 and 4/8
2
Chapter 2

What Are the Key Features of LoRaWAN?

LoRaWAN’s standout features make it ideal especially for IoT applications in remote locations. Here are the key technical specifications:

Range and Coverage

LoRaWAN’s most impressive feature is its long range:

  • Open field: 15-20 km (with line of sight)
  • Urban area: 2-5 km (between buildings)
  • Indoor: 1-2 km (wall penetration)
  • Underground: Works even in challenging environments like basements and caves

Battery Life

A sensor operating in Class A mode can run for 5-10 years on AA batteries. This is a critical advantage, especially for sensors in hard-to-reach locations. Factors affecting battery life:

  • Message transmission frequency (uplink interval)
  • Payload size and airtime
  • Spreading factor (consumption increases with higher SF)
  • TX power setting
  • Sensor measurement frequency

Capacity and Scalability

A single 8-channel gateway can support between 1,000-5,000 devices with traffic management and ADR (Adaptive Data Rate). For higher density, coverage areas can be overlapped with multiple gateways.

3
Chapter 3

How Is the LoRaWAN Network Architecture Structured?

LoRaWAN network architecture is organized in a star-of-stars topology. This architecture provides scalability and centralized management advantages.

Architecture Components

LoRaWAN Ağ Mimarisi

Yıldız-yıldız (star-of-stars) topolojisi

End Node

Uç Cihazlar

LoRa modüllü sensörler ve aktüatörler. Veri toplama ve kontrol.

SensörAktüatörSayaç
LoRa RF868 MHz

Gateway

Ağ Geçidi

LoRa RF sinyallerini IP paketlerine çevirir. Packet Forwarder.

8-16 KanalHarici Anten4G/Ethernet
IP / MQTTBackhaul

Network Server

Ağ Sunucusu

MAC layer yönetimi, cihaz kimlik doğrulama, ADR, güvenlik.

ChirpStack/TTSMAC LayerGüvenlik
HTTP / gRPCREST API

Application Server

Uygulama Sunucusu

Veri işleme, görselleştirme, alarm yönetimi ve raporlama.

DashboardAlarmRaporlama
Sensör Verileri
RF İletişim
AES-128 Şifreleme
Veri Depolama

Detayları görmek için kutulara tıklayın

Layers and Their Roles

  • End Node (End Device): Sensors, meters, actuators. Sends data to gateways via LoRa module.
  • Gateway: Receives LoRa RF signals, converts to IP packets. Runs “packet forwarder” software. Not intelligent, merely forwards.
  • Network Server: MAC layer management, device authentication, ADR, deduplication, downlink scheduling.
  • Application Server: Payload decode, application logic, data storage, API serving.

Device Classes

LoRaWAN defines three device classes based on different energy and latency requirements:

Class A

Latency:Seconds
Power Consumption:Lowest
Downlink:2 windows after TX

Usage: Sensors, meters

Class B

Latency:Periodic (seconds)
Power Consumption:Medium
Downlink:Scheduled windows

Usage: Actuators, valves

Class C

Latency:Instant (<1 sec)
Power Consumption:Highest
Downlink:Continuous listening

Usage: Gateways, rechargeable devices

4
Chapter 4

What Is a Network Server and How Does It Work?

The Network Server (NS) is the brain of the LoRaWAN network. It manages all MAC layer operations, performs device authentication, and coordinates data traffic.

Core Tasks of the Network Server

  • Device Activation: OTAA join request/accept operations, session key derivation
  • Deduplication: Preventing duplicate messages received from multiple gateways
  • MAC Command Management: MAC commands such as ADR, DevStatusReq, LinkCheckReq
  • Downlink Scheduling: Sending downlink in the correct RX window
  • Frame Counter Control: Preventing replay attacks
  • Roaming: Cross-network handover support (v1.1+)

ADR (Adaptive Data Rate)

ADR is a critical feature that optimizes network performance. The Network Server analyzes the signal quality (RSSI, SNR) of incoming messages to determine the optimal spreading factor and TX power:

  • Good signal → Low SF → Faster, less airtime, less battery consumption
  • Weak signal → High SF → More reliable, longer range

Need Help with LoRaWAN Infrastructure Setup?

Get expert support for ChirpStack or The Things Stack deployment, gateway placement, and network optimization. We serve across Northern Cyprus and Turkey.

Our Industrial IoT Services
5
Chapter 5

Network Server Options Comparison

Various network server solutions are available on the market. A wide range is offered from open-source options to enterprise solutions. Making the right choice according to your needs is critically important.

Popular Network Server Solutions

Network ServerTypeDeploymentCostBest For
ChirpStackOpen SourceOn-premise / CloudFreeFull control, customization
The Things StackOpen/CommercialCloud (TTN) / On-premiseFreemium / EnterpriseCommunity + Enterprise projects
AWS IoT Core for LoRaWANManaged ServiceAWS CloudPay-as-you-goAWS ecosystem integration
Actility ThingParkCommercialCloud / On-premiseEnterprise licenseLarge-scale, carrier-grade
LoriotCommercialCloudSubscriptionSMBs and quick start

ChirpStack vs The Things Stack

Comparison of the two most popular open-source solutions:

  • ChirpStack: Fully open source (MIT), self-hosted, high customization, gRPC API, easy setup with Docker
  • The Things Stack: Community and Enterprise editions, global community via TTN (The Things Network), LoRa Cloud integration

Our recommendation: The Things Stack Community for small-medium projects and getting started, ChirpStack for full control and customization.

6
Chapter 6

How to Choose a LoRaWAN Gateway?

Gateway selection is critically important for the success of your LoRaWAN project. Coverage area, capacity, reliability, and budget balance must be considered.

Gateway Categories

Indoor Mini Gateway

Range:2-5 km
Channels:8 channels
Price:$100-300

Compact, easy setup, WiFi/Ethernet

Outdoor Standard Gateway

Range:10-15 km
Channels:8-16 channels
Price:$500-1500

IP67, external antenna, GPS, 4G backhaul

Carrier Grade Gateway

Range:20+ km
Channels:16-64 channels
Price:$2000+

High capacity, redundancy, SLA

Gateway Placement Tips

  • Height: The higher the antenna, the wider the coverage
  • Fresnel Zone: No obstacles in the line of sight
  • Backhaul: Ethernet, WiFi, 4G, or fiber connection
  • Power source: PoE, DC, or solar panel
  • Protection class: IP67 required for outdoor use
7
Chapter 7

Device Management: OTAA and ABP

LoRaWAN devices can join the network using two different methods: OTAA (Over-The-Air Activation) and ABP (Activation By Personalization). Each method has its advantages and disadvantages.

OTAA vs ABP Comparison

OTAA (Over-The-Air Activation)

Recommended
Security:High (dynamic session key)
Key Rotation:Automatic on each join
Roaming:Supported

New session keys are derived each time the device powers up or a join is triggered. Authentication is done using DevEUI and AppKey.

ABP (Activation By Personalization)

Test Only
Security:Low (static session key)
Key Rotation:Manual (none)
Roaming:Not supported

DevAddr, NwkSKey and AppSKey are pre-written to the device. The join process is skipped but this creates a security risk.

Device Provisioning Best Practices

  • DevEUI: Unique device identifier assigned at factory (64-bit)
  • AppKey: Root key, must be stored securely (128-bit AES)
  • Device Profile: Class, codec, uplink interval definitions
  • Application: Device grouping and authorization

Planning a LoRaWAN Pilot Project?

Get end-to-end support from gateway and sensor procurement to installation for your smart agriculture, energy monitoring, or industrial IoT project.

Free Discovery Meeting
8
Chapter 8

Frequency Plans and EU868

LoRaWAN operates in different ISM bands worldwide. Compliance with regional regulations is critically important. The EU868 frequency plan applies in Turkey and Northern Cyprus.

Regional Frequency Plans

RegionFrequency BandChannel CountDuty CycleRegulation
EU868 (Turkey/N. Cyprus/Europe)(Our region)863-870 MHz8 + 1 (G3)1% (per sub-band)ETSI EN 300 220 / BTK
US915 (Americas)902-928 MHz64 uplink + 8 downlinkNone (dwell time)FCC Part 15
AS923 (Asia-Pacific)915-928 MHz8 channelsVaries by countryVarious (country-based)
AU915 (Australia)915-928 MHz64 uplink + 8 downlinkNoneACMA

EU868 Duty Cycle Restriction

According to European regulations, a duty cycle restriction applies in the ISM band. This limits how much transmission a device can make within a given period:

  • g band (868.0-868.6 MHz): 1% duty cycle
  • g1 band (868.7-869.2 MHz): 0.1% duty cycle
  • g2 band (869.4-869.65 MHz): 10% duty cycle

Practical impact: You can use 36 seconds of airtime per hour (g band, 1%). This is sufficient for typical sensor applications.

9
Chapter 9

LoRaWAN Security Architecture

LoRaWAN offers a robust security architecture by design. Industrial-grade security is provided through AES-128 encryption, dual-layer protection, and frame counter mechanisms.

Security Layers

LayerEncryptionKeyProtectionScope
Network Layer (Hop-by-hop)AES-128 CTR modeNwkSKey (Network Session Key)MAC commands, frame counter, MICBetween device and Network Server
Application Layer (End-to-end)AES-128 CTR modeAppSKey (Application Session Key)Application payloadBetween device and Application Server
Join Layer (Device Authentication)AES-128 ECB modeAppKey (Application Key)Join request/accept, key derivationOTAA device authentication
LoRaWAN 1.1 Additional SecurityAES-128NwkKey, AppKey, JSIntKey, JSEncKeyAdvanced key management, roaming securityFor v1.1+ devices

Security Best Practices

  • Use OTAA: Dynamic key derivation instead of ABP
  • Store AppKey securely: Secure element or HSM recommended
  • TLS/SSL: Encryption for Gateway-NS and NS-AS communication
  • Firmware updates: Apply security patches
  • Network segmentation: Isolate IoT traffic
10
Chapter 10

Application Integration and APIs

Application integration is critically important for transforming data collected from the LoRaWAN network into value. MQTT, HTTP webhook, and gRPC are the most commonly used integration methods.

Integration Protocols

MQTT

Pub/Sub messagingLow (ms) latency

application/+/device/+/event/up

HTTP Webhook

Push (server-to-server)Medium latency

POST https://api.example.com/lorawan

gRPC

Bidirectional streamingLowest latency

Ideal for ChirpStack API

REST API

Request/ResponseMedium latency

GET /api/devices/{devEUI}

Code Examples

1. Payload Decoder (JavaScript)

Sample decoder function that can be used in ChirpStack and The Things Stack:

Payload Decoder (JavaScript)JavaScript
function decodeUplink(input) {
  var bytes = input.bytes;
  var decoded = {
    // First byte: battery voltage (0.1V resolution)
    battery: bytes[0] / 10,
    // Bytes 2-3: temperature (0.01°C resolution, signed)
    temperature: ((bytes[1] << 8) | bytes[2]) / 100,
    // Bytes 4-5: humidity (0.01% resolution)
    humidity: ((bytes[3] << 8) | bytes[4]) / 100,
    // Bytes 6-7: soil moisture (0.01% resolution)
    soilMoisture: ((bytes[5] << 8) | bytes[6]) / 100
  };
  return { data: decoded };
}

2. ChirpStack Device Profile (YAML)

ChirpStack Device Profile (YAML)YAML
name: "Soil Sensor Profile"
description: "Profile for soil moisture sensor"
region: EU868
macVersion: LORAWAN_1_0_3
regParamsRevision: RP002_1_0_1
supportsOTAA: true
supportsClassB: false
supportsClassC: false
classBTimeout: 0
classCTimeout: 0
payloadCodecRuntime: JS
payloadCodecScript: |
  // Decoder function goes here
uplinkInterval: 3600  # 1 hour
deviceStatusReqInterval: 1
adrAlgorithmId: default
flushQueueOnActivate: true

3. MQTT Integration (Python)

MQTT Integration (Python)Python
import paho.mqtt.client as mqtt
import json

def on_connect(client, userdata, flags, rc):
    print(f"Connected: {rc}")
    # Subscribe to uplink messages from all devices
    client.subscribe("application/+/device/+/event/up")

def on_message(client, userdata, msg):
    payload = json.loads(msg.payload.decode())
    dev_eui = payload.get("deviceInfo", {}).get("devEui")
    data = payload.get("object", {})
    print(f"Device: {dev_eui}")
    print(f"Data: {json.dumps(data, indent=2)}")

client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect("localhost", 1883, 60)
client.loop_forever()
11
Chapter 11

Use Cases and Case Studies

LoRaWAN provides an ideal solution for many IoT scenarios requiring low data rates and long range. Here are the most common use cases:

Smart Agriculture and Greenhouse

Smart agriculture is one of LoRaWAN’s strongest areas. In large fields and greenhouses:

  • Soil moisture and temperature monitoring
  • Automatic irrigation control
  • Weather station data
  • Pest and disease early warning

Energy Monitoring

Consumption tracking in distributed locations with wireless energy meters:

  • Electricity, water, gas meter reading
  • Leak detection
  • Tariff optimization

Smart City

  • Smart parking sensors
  • Waste container fill-level monitoring
  • Air quality measurement
  • Street lighting control

Industrial IoT

Industrial IoT applications with LoRaWAN:

  • Equipment monitoring and asset tracking
  • Environmental condition monitoring (temperature, humidity)
  • Vibration and predictive maintenance sensors
12
Chapter 12

Cost Analysis and ROI Calculation

The total cost of ownership (TCO) of LoRaWAN infrastructure is highly competitive compared to other wireless technologies. Low device costs, unlicensed frequency, and open-source options minimize costs.

Example Project Costs

ProjectSensorsGatewayServerTotal (Year 1)ROI
Smart Agriculture (50 sensors)~$5,000~$1,500Free (ChirpStack)~$8,00012-18 months
Energy Monitoring (20 meters)~$8,000~$2,000~$1,200/year (TTS)~$13,2006-12 months
Smart Parking (100 sensors)~$15,000~$5,000~$3,600/year~$28,60018-24 months
Industrial IoT (30 devices)~$12,000~$3,000Free (ChirpStack)~$18,0008-14 months

Implementation Steps

Steps to follow for a successful LoRaWAN project:

1

Coverage and Requirements Analysis

1-2 days

Define the target area and map sensor locations. Clarify data transmission frequency, payload size, and battery life requirements.

2

Gateway Positioning

1 day

Gateway locations are determined considering antenna height, Fresnel zone, and obstacles. Link budget is calculated.

3

Network Server Setup

2-3 days

ChirpStack or The Things Stack is installed. Gateways are added and region configuration (EU868) is set up.

4

Device Provisioning

1 day

DevEUI and AppKey are defined. Device profile (Class A/B/C, codec) is created. OTAA join test is performed.

5

Payload Decoder Development

1-2 days

A JavaScript/WASM codec is written to decode sensor data. Unit conversions and data validation are added.

6

Application Integration

2-3 days

Data transfer to ThingsBoard, Grafana, or a custom application is set up via MQTT or HTTP webhook.

7

Field Installation and Testing

2-3 days

Gateways and sensors are installed on site. Coverage testing (RSSI, SNR) is performed. Problem areas are identified.

8

Optimization and Go-Live

1-2 days

ADR parameters are tuned. Duty cycle optimization is performed. Alerts and notifications are configured.

Summary: Why Choose LoRaWAN?

  • 15+ km range - Coverage with minimal infrastructure over large areas
  • 10+ year battery life - Low operating costs, operation in inaccessible locations
  • Unlicensed ISM band - Operator-independent, set up your own network
  • Thousands of device capacity - Scalable solutions with a single gateway
  • AES-128 encryption - Industrial-grade security
  • Open ecosystem - ChirpStack, TTN, and hundreds of gateway/sensor options

Start Your LoRaWAN Project

At Olivenet, we provide LoRaWAN infrastructure deployment, gateway procurement, and network server management services across Northern Cyprus and Turkey. Contact us for a free discovery analysis.

Free Discovery Meeting

Frequently Asked Questions

Frequently asked questions about LoRaWAN infrastructure and network server

LoRa (Long Range) is the radio modulation technique used at the physical layer - it is Semtech's patented Chirp Spread Spectrum (CSS) technology. LoRaWAN is a network protocol built on top of LoRa that defines the MAC (Media Access Control) layer, network architecture, security mechanisms, and device management. In short: LoRa = radio, LoRaWAN = protocol + network. You can use a LoRa module alone for point-to-point communication, but the LoRaWAN protocol is required for scalable IoT networks.

Ready to Bring Your Project to Life?

Let our expert team evaluate your needs and provide tailored solution recommendations.

LoRaWAN Infrastructure Guide 2026 | Network Server and Gateway Setup Manual | Olivenet