← All work

LoRaWAN + ChirpStack + AWS

Project to setup uplink and downlink communication between ChirpStack and AWS IoT

  • LoRaWAN
  • ChirpStack
  • AWS IoT
  • Docker
LoRaWAN and ChirpStack to AWS IoT architecture diagram
LoRaWAN and ChirpStack to AWS IoT architecture diagram
P

Problem

Low-power environmental sensors operating on LoRaWAN require secure, bidirectional data routing to cloud pipelines without relying on heavy cellular or Wi-Fi connectivity.

R

Role

IoT systems developer. Set up the local edge gateway infrastructure, network integration, and message broker parsing.

A

Approach

Containerized ChirpStack network and application servers using Docker on local gateways. Built the MQTT broker integration to bridge ChirpStack with AWS IoT Core. Configured AWS Lambda-based binary payload decoders to parse raw sensor byte arrays into structured telemetry JSON, and routed parsed data to DynamoDB.

O

Outcome

Established a low-power, end-to-end telemetry pipeline with under 200ms round-trip latency. Enabled secure downlink command queues to route configuration messages back to edge devices.

Telemetry Architecture & Protocol Flow

This project establishes a low-power, bidirectional telemetry bridge between localized LoRaWAN edge gateways and AWS IoT Core, providing reliable uplink ingestion and downlink device commanding over constrained RF links.

LoRaWAN End-Nodes (Sensors / Actuators)
       │ (868 MHz ISM band / Chirp Spread Spectrum)
       ▼
Local Packet Forwarder / Edge Gateway
       │ (UDP / Semtech packet forwarder protocol)
       ▼
ChirpStack Gateway Bridge (Docker Container)
       │
       ▼
Mosquitto MQTT Broker ──▶ ChirpStack Network & Application Server
                               │
                               ▼ (Bridge via TLS Mutual Auth)
                        AWS IoT Core (MQTT Broker)
                               │
                ┌──────────────┴──────────────┐
                ▼                             ▼
       AWS IoT Rules Engine           Downlink Command Queue
                │                             ▲
                ▼                             │
       AWS Lambda Decoder             Device Management API
     (Binary to JSON Schema)                  │
                │                             ▼
                ▼                      Operator Console
       Amazon DynamoDB / CloudWatch

Architectural Highlights

1. Edge Gateway & ChirpStack Orchestration

  • ChirpStack Stack on Docker: Deployed ChirpStack Gateway Bridge, Network Server, and Application Server within localized Docker containers. This abstracts physical LoRa packet forwarders into standard JSON/Protobuf message streams over MQTT.
  • RF Channel Management: Configured multi-channel frequency plans across 868 MHz European ISM bands with adaptive data rate (ADR) optimization to balance battery longevity and packet error rates.

2. Secure Cloud Integration (AWS IoT Core)

  • Bidirectional MQTT Bridge: Connected the ChirpStack Application Server to AWS IoT Core using X.509 certificate-based mutual authentication. Device payloads are mapped to organized MQTT topic hierarchies (lorawan/{app_id}/devices/{dev_eui}/up and /down).
  • Low-Latency Ingestion: Reduced end-to-end telemetry propagation from edge packet arrival to cloud database write to under 200ms.

3. Binary Payload Decoding & Cloud Pipeline

  • Serverless Byte Parsing: Implemented lightweight AWS Lambda decoders triggered by AWS IoT Rules Engine. Functions unpack compact binary byte arrays (hex-encoded sensor readings) into strongly-typed telemetry JSON schemas.
  • Persistence & Observability: Telemetry metrics are indexed into Amazon DynamoDB for time-series evaluation and routed to Amazon CloudWatch for anomaly alarming and threshold monitoring.
  • Class A / Class C Queuing: Supports queued downlink commands for Class A devices (transmitted during post-uplink RX1/RX2 receive windows) and immediate downlink transmission for powered Class C actuators.

All work