private lorawan network chirpstack gateway

How to Build a Private LoRaWAN Network with ChirpStack & Robustel R1520LG Industrial LoRaWAN Gateway

Written by: Hubery Zhang

|

Published on

|

Time to read 10 min

Hubery Zhang

Technical Support Engineer, Robustel

Summary

Building a Private LoRaWAN Network offers unparalleled control, security, and cost-efficiency for industrial IoT applications.

This comprehensive guide provides a step-by-step walkthrough of how to deploy a secure and scalable Private LoRaWAN Network using ChirpStack, the leading open-source LoRaWAN Network Server, and Robustel’s R1520LG Industrial LoRaWAN Gateway . We will cover the core components, the significant benefits of this powerful integration—including zero recurring cloud costs, full data sovereignty, and ultra-low latency—and its applications in smart metering and environmental monitoring.

By following this guide, you'll have the knowledge to deploy a robust, production-ready Private LoRaWAN Network for your demanding IoT projects.

Introduction: The Rise of Private IoT and LoRaWAN

r1520lg lorawan gateway chirpstack

The Internet of Things (IoT) is fundamentally transforming industries by enabling smart, data-driven solutions through advanced technologies. Among these, LoRaWAN (Low-Power, Wide-Area Network) stands out as a leading protocol designed for long-range, low-power communication. As organizations increasingly deploy connected devices for mission-critical operations, the need for secure, reliable, and cost-effective connectivity has grown. This has fueled the adoption of the Private LoRaWAN Network .

Unlike public networks managed by telecom operators, a Private LoRaWAN Network gives an organization complete control over its infrastructure, data, and security policies. This is particularly vital in industrial settings where data sovereignty and network reliability are non-negotiable. According to a recent report by MarketsandMarkets, At a Compound Annual Growth Rate (CAGR) of 32.4% over the course of the projection period, the size of the global LoRa and LoRaWAN IoT market is expected to increase from USD 8.0 billion in 2024 to USD 32.7 billion by 2029. This explosive growth underscores the global demand for independent and scalable IoT solutions. This guide will show you exactly how to create your own Private LoRaWAN Network by detailing the integration of the open-source ChirpStack server with Robustel’s R1520LG, which is an Industrial LoRaWAN Gateway with Edge Computing capability. For a deeper dive into the protocol itself, see this overview of LoRaWAN Technology.


What is ChirpStack? The Open-Source Heart of Your Private LoRaWAN Network

ChirpStack is a complete, open-source LoRaWAN Network Server stack. It provides all the necessary components to manage gateways, authenticate devices, route data, and integrate with your end applications. Because it's open-source, it allows for deployment on your own hardware (like the R1520LG or a server), giving you full control over your Private LoRaWAN Network . Its enterprise-grade features and adherence to industry standards make it a top choice for professional deployments.

Its core components include:

  • ChirpStack Network Server (NS): This is the engine of the network. It handles device join procedures (OTAA/ABP), schedules downlink data transmissions, manages Adaptive Data Rate (ADR) for optimal device performance, and processes all LoRaWAN MAC layer commands.
  • ChirpStack Application Server (AS): This component provides a user-friendly web interface for managing devices and gateways. It also supports payload decoding/encoding (using JavaScript or Python) and enables powerful API integrations with your applications via HTTP, MQTT, or gRPC.
  • ChirpStack Gateway Bridge: This essential utility runs on the Industrial LoRaWAN Gateway itself. It converts the standard LoRa Gateway Protocol (UDP) from the Semtech Packet Forwarder into a secure and structured MQTT/Protobuf format, while also managing gateway authentication.

For detailed documentation, the official ChirpStack website is an invaluable resource. Understanding these components is the first step to building your Private LoRaWAN Network.


What is the Robustel R1520LG? An Industrial Gateway for Your Private LoRaWAN Network

The Robustel R1520LG is Robustel’s next-generation indoor Industrial LoRaWAN Gateway , specifically optimized for building a reliable and high-performance Private LoRaWAN Network . Its industrial-grade design ensures it can operate in demanding environments, while its powerful hardware provides the foundation for both LoRaWAN communication and edge computing tasks.


Robustel R1520LG: Industrial LoRaWAN Edge Gateway

Feature Category

Specification

System


CPU

ARM Cortex-A7, 792 MHz (NXP i.MX6ULL)

RAM

512 MB DDR3

Storage

8 GB eMMC

Indicators

LED for LoRa, RUN, MDM, USR, WLAN, RSSI

LoRaWAN Interface


Frequency Bands

EU868 / AU915 / US915 (Region-dependent)

Channels

Up to 8 concurrent channels

Chipset

Semtech SX1302

Transmit Power

Max +25 dBm

Receiver Sensitivity

Down to -140 dBm

Antenna

1 x RP-SMA Connector

Network Connectivity


Cellular

Modem: 4G LTE Cat 4 (Worldwide Frequencies)

SIM: 2 x Mini SIM (2FF), Dual SIM Failover

Antennas: 2 x SMA Connectors

Wi-Fi

Standard: 802.11 b/g/n, 2.4 GHz

Modes: Access Point (AP), Client

Antenna: 1 x RP-SMA Connector

Interfaces


Ethernet

2 x 10/100 Mbps, RJ45 (ETH0 supports PoE PD - IEEE 802.3at)

Serial

1 x RS232, 1 x RS485

USB

1 x USB 2.0 Host (Type-A)

Power & Physical


Input Voltage

9 to 60 VDC (3.5mm Pitch Terminal Block or via PoE PD)

Power Consumption

~1.5W (Idle @ 12VDC), ~10W (Max @ 12VDC)

Housing

Plastic (PC + ABS)

Protection

IP30

Dimensions

105 x 90 x 46 mm

Weight

238.5 g

Installation

DIN-Rail, Wall Mount, Desktop

Environmental


Operating Temperature

-20°C to +60°C

Storage Temperature

-40°C to +85°C

Relative Humidity

5% to 95% (non-condensing)

Certifications


Regulatory

CE, UKCA, RCM, FCC

Environmental

RoHS 2.0, WEEE

Software


Operating System

RobustOS Pro (based on Debian 11 with LTS), Docker support

LoRaWAN

V1.04 Class A/B/C, Built-in ChirpStack LNS, Packet Forwarder mode

Key Software Support

Node-RED, MQTT, Modbus (RTU/TCP), OPC UA, BACnet, DNP3, IEC101/104

Cloud Integration

Native MQTT for AWS, Azure, Aliyun; Fully compatible with RCMS

Security Features

IEC 62443-4-1 certified development, Penetration Tested, Automatic System Failback, VPN (IPsec, OpenVPN, Wireguard, etc.), Stateful Firewall

SDK & Customization

C, C++, Python, Java, Go, Node.js and more; ~6 GB Flash, ~256 MB RAM for user apps

Management

Web GUI, CLI, SMS, Robustel Cloud Manager Service (RCMS)


With its modern 8-channel Semtech SX1302 LoRa concentrator, the R1520LG can handle a high density of devices, making it perfect for both initial deployments and large-scale expansions of your Private LoRaWAN Network.


Benefits of Building a Private LoRaWAN Network with ChirpStack and the R1520LG

Combining the ChirpStack stack with the Robustel R1520LG Industrial LoRaWAN Gateway offers significant advantages over relying on public networks or other solutions:

  1. Cost Efficiency: By running ChirpStack on your own hardware (on-premises or in a private cloud), you eliminate the recurring subscription fees associated with commercial LoRaWAN network providers. This drastically reduces the total cost of ownership (TCO), especially for large-scale deployments. This is a primary driver for choosing a Private LoRaWAN Network.
  2. Complete Data Sovereignty and Security: Your data never has to leave your private network. All device data flows from the R1520LG Industrial LoRaWAN Gateway directly to your ChirpStack server. This full control over the data path is critical for sensitive industrial, medical, or municipal applications where compliance with data privacy regulations (like GDPR) is essential.
  3. Ultra-Low Latency: When the ChirpStack server is deployed on the same local network as the R1520LG Industrial LoRaWAN Gateway , communication latency can be reduced to sub-30ms. This is ideal for industrial control and other real-time IoT applications where immediate responses are necessary.
  4. Scalability and Flexibility: The R1520LG’s 8-channel LoRa concentrator supports a large number of end devices. As your IoT project grows, you can easily add more R1520LG gateways to expand coverage, all managed under a single ChirpStack instance.
  5. Enhanced Reliability: The R1520LG’s robust industrial design ensures consistent performance even in harsh conditions. Paired with ChirpStack's stable and well-maintained open-source code, you get a highly reliable foundation for your Private LoRaWAN Network.

chirpstack lorawan gateway

Applications for Your Private LoRaWAN Network

The versatility of a ChirpStack and R1520LG-based Private LoRaWAN Network supports a wide range of industrial and commercial IoT use cases:

  • Smart Metering: Deploy private networks to monitor energy, water, and gas usage across a campus, industrial park, or residential complex for efficient resource management and automated billing.
  • Environmental Monitoring: Track temperature, humidity, and air quality in real-time for compliance, safety, and operational efficiency in factories, warehouses, and agricultural settings.
  • Asset Tracking: Locate and monitor the status of valuable assets within a large facility, construction site, or shipping yard to improve operational efficiency and prevent loss.
  • Smart Agriculture: Collect crucial sensor data from fields to optimize irrigation schedules, monitor soil health, and track crop growth conditions over a wide area.

Integrating ChirpStack with the R1520LG Industrial LoRaWAN Gateway : A Step-by-Step Guide

This section provides a detailed guide to setting up your Private LoRaWAN Network . The layout is preserved so you can easily add your configuration screenshots.

1. Pre-Installation Setup

Before starting your ChirpStack R1520LG integration, ensure you have the following:

  • Access to the R1520LG Industrial LoRaWAN Gateway 's command line via SSH.
  • Reliable internet connectivity for the gateway via one of its backhaul options (Ethernet or a 4G SIM card).
  • Basic knowledge of Linux for using terminal commands.

2. Industrial LoRaWAN Gateway Initialization: Network Connectivity

The R1520LG offers flexible networking options with its dual Ethernet ports and LTE cellular module. You must configure a stable WAN connection for the gateway to download software and connect to the internet.

Configuring ETH1 as a WAN Interface

By default, both ETH0 and ETH1 are in bridge mode. To use one as a dedicated internet uplink, follow these steps.

  1. Access the R1520LG Web Interface and navigate to BridgeSettings.
  2. Locate the ETH1 Sub Interface and uncheck the "eth1" option.
  3. Click Submit, then Save & Apply.robustel r1520lg lorawan gateway config
  4. Navigate to NetworkWANAdd New Interfaceand configure as follows:
    • Name: WAN
    • Type: Ethernet
    • Interface: eth1
    • Firewall Zone: External
    • IPv4 Connection Type: DHCProbustel r1520lg lorawan gateway config
  5. After saving, the new Ethernet WAN link will be active.

LTE Cellular Configuration


  1. Install your SIM card and connect the 4G antennas to the MAIN and AUX ports.
  2. Navigate to InterfaceCellularAdvanced cellular settings and set the parameters according to your ISP's requirements (e.g., APN).
  3. Go to NetworkWANLink and add a new link for cellular dial-up, selecting "Modem" as the link type.
  4. After saving, the cellular WAN link will be active.

Creating Sudo Privileges

Before installing software, create sudo privileges via the web UI.

  1. Go to System > User Management > Sudo user > Sudo User Settings.
  2. Click "Add" and configure your sudo user.

3. Install Required Software

Access the terminal via SSH and install the prerequisites:

Bash

sudo apt update sudo apt install mosquitto mosquitto-clients redis-server redis-tools postgresql 

Set up the PostgreSQL database and roles for ChirpStack:

SQL


sudo -u postgres psql 
create role chirpstack with login password 'chirpstack'; 
create database chirpstack with owner chirpstack; 
\c chirpstack create extension pg_trgm; 
\q 

4. Install ChirpStack on Your Private LoRaWAN Network Gateway

Add the ChirpStack repository and install the components:

Bash

sudo apt install apt-transport-https dirmngr -y 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1CE2AFD36DBCCA00 
echo "deb https://artifacts.chirpstack.io/packages/4.x/deb stable main" | 
sudo tee /etc/apt/sources.list.d/chirpstack.list sudo apt update 
sudo apt install chirpstack-gateway-bridge 

Next, edit the Gateway Bridge configuration file at 

/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml to match your region (e.g., EU868):


[integration.mqtt] event_topic_template="eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}" command_topic_template="eu868/gateway/{{ .GatewayID }}/command/#" 

5. Start and Verify Services

Enable and start the ChirpStack services to bring your Private LoRaWAN Network online:

Bash

sudo systemctl start chirpstack 
sudo systemctl enable chirpstack 
sudo systemctl start chirpstack-gateway-bridge 
sudo systemctl enable chirpstack-gateway-bridge 

Verify the services are running correctly:

Bash

sudo systemctl status chirpstack 
sudo systemctl status chirpstack-gateway-bridge 

6. Access the ChirpStack Web Interface

Navigate to your R1520LG's IP address on port 8080 (e.g., http://192.168.0.1:8080). Log in with the default credentials (admin/admin) and change the password immediately for security.

7. Create Device Profiles and Add Devices


  • Device Profile: Go to LoRaWAN > Device Profiles to create a new profile for your device type.
  • Add Device: Go to LoRaWAN > Devices to add your end devices, entering their DevEUI, AppKey, and other relevant information.

8. The LoRaWAN Join Procedure

The successful device join process for your Private LoRaWAN Network involves:

  1. The end device sends a Join Request.
  2. The R1520LG Industrial LoRaWAN Gateway forwards it to your ChirpStack instance.
  3. ChirpStack validates the device and responds with a Join Accept message.
  4. The R1520LG Industrial LoRaWAN Gateway forwards this Join Accept to the device, completing the activation.

Conclusion: Take Control with Your Own Private LoRaWAN Network

Building a Private LoRaWAN Network using ChirpStack and the Robustel R1520LG Industrial LoRaWAN Gateway is a powerful way to take full control of your IoT infrastructure. This approach offers significant advantages in cost, security, latency, and scalability, making it an ideal choice for serious industrial and commercial deployments. By following this guide, you have a clear roadmap to deploy a robust, professional-grade IoT solution tailored to your specific needs. To learn more about how Robustel's hardware can power your IoT projects, explore our full range of Industrial IoT Gateways.


FAQ

Q1: What is the main difference between a public and a Private LoRaWAN Network?

A: Public LoRaWAN networks are operated by third-party service providers on a subscription basis, similar to a mobile phone network. A Private LoRaWAN Network , which you can build with ChirpStack and the R1520LG, is owned and managed entirely by you, offering greater control, security, and no recurring data fees.

Q2: Why choose ChirpStack for my Private LoRaWAN Network over other network servers?

A: ChirpStack is a leading open-source choice because it is highly customizable, feature-rich, and has strong community and commercial support. It allows you to build a powerful Private LoRaWAN Network without vendor lock-in and with full control over your infrastructure.

Q3: Can I use the Robustel R1520LG Industrial LoRaWAN Gateway with other network servers like The Things Network?

A: Yes. The R1520LG is a flexible Industrial LoRaWAN Gateway . While this guide focuses on ChirpStack for building a fully Private LoRaWAN Network , the gateway can be configured to work in "Packet Forwarder" mode, allowing it to forward LoRaWAN packets to virtually any network server, including The Things Network or AWS IoT Core for LoRaWAN.