Welcome

Welcome to the LoRaWAN Schema Definitions project page!

LoRaWAN Schema Definitions are data models and APIs used in the LoRaWAN ecosystem.

The aim of this project is to help LoRaWAN developers build interoperable solutions using schemas. The schemas are based on JSON Schema and OpenAPI so they are usable across many different languages and frameworks.

Read more about this project

Specifications

Specifications governed by the LoRa Alliance:

Mnemonic Description Version Schema
TS002 LoRaWAN Backend Interfaces 1.0 https://lorawan-schema.org/ts002/1-0/schema

Example

Use any JSON Schema implementation for validation and generation. For example, you can use ajv-cli to validate a JSON document using a command-line interface.

With Node.js installed:

$ npm install -g ajv-cli

Download the TS002 LoRaWAN Backend Interfaces 1.0 schema as schema.json:

$ curl -o schema.json https://lorawan-schema.org/ts002/1-0/schema

Put the following device profile in profile.json:

{
  "DeviceProfileID": "ExampleOTAA",
  "SupportsClassB": true,
  "ClassBTimeout": 15,
  "PingSlotFrequency": 924.5,
  "PingSlotDR": 0,
  "PingSlotPeriod": 128,
  "SupportsClassC": true,
  "ClassCTimeout": 15,
  "MACVersion": "1.0.2",
  "RegParamsRevision": "B",
  "SupportsJoin": true,
  "MaxEIRP": 14,
  "RFRegion": "US902",
  "Supports32bitFCnt": true
}

Validate the device profile against the schema:

$ ajv validate -s schema.json -d profile.json