Skip to content

Outdated documentation

You are reading outdated documentation. This page documents ChirpStack v3. ChirpStack v4 is the latest version.

Device profiles

A Device Profile defines the device capabilities and boot parameters that are needed by the Network Server for setting the LoRaWAN® radio access service. These information elements shall be provided by the end-device manufacturer.

When creating a Device Profile, ChirpStack Application Server will create the actual profile on the selected network-server, and will keep a reference record so it knows to which organization it belongs.

Note: changes made to some of the fields will require the reactivation of the device.

Payload codecs

Note: the raw base64 encoded payload will always be available, even when a codec has been configured.

Cayenne LPP

When selecting the Cayenne LPP codec, ChirpStack Application Server will decode and encode following the Cayenne Low Power Payload specification.

Custom JavaScript codec functions

When selecting the Custom JavaScript codec functions option, you can write your own (JavaScript) functions to decode an array of bytes to a JavaScript object and encode a JavaScript object to an array of bytes. Package otto, which targets ES5, is used as a JavaScript interpreter, so ES6 features (e.g. Typed Arrays) are not supported.

Decoder function skeleton

// Decode decodes an array of bytes into an object.
//  - fPort contains the LoRaWAN fPort number
//  - bytes is an array of bytes, e.g. [225, 230, 255, 0]
//  - variables contains the device variables e.g. {"calibration": "3.5"} (both the key / value are of type string)
// The function must return an object, e.g. {"temperature": 22.5}
function Decode(fPort, bytes, variables) {
  return {};
}

Encoder function skeleton

// Encode encodes the given object into an array of bytes.
//  - fPort contains the LoRaWAN fPort number
//  - obj is an object, e.g. {"temperature": 22.5}
//  - variables contains the device variables e.g. {"calibration": "3.5"} (both the key / value are of type string)
// The function must return an array of bytes, e.g. [225, 230, 255, 0]
function Encode(fPort, obj, variables) {
  return [];
}

Fields / options

The following fields are described by the LoRaWAN Backend Interfaces specification. Fields marked with an X are implemented by ChirpStack Application and Network Server.

  • SupportsClassB End-Device supports Class B
  • ClassBTimeout Maximum delay for the End-Device to answer a MAC request or a confirmed DL frame (mandatory if class B mode supported)
  • PingSlotPeriod Mandatory if class B mode supported
  • PingSlotDR Mandatory if class B mode supported
  • PingSlotFreq Mandatory if class B mode supported
  • SupportsClassC End-Device supports Class C
  • ClassCTimeout Maximum delay for the End-Device to answer a MAC request or a confirmed DL frame (mandatory if class C mode supported)
  • MACVersion Version of the LoRaWAN supported by the End-Device
  • RegParamsRevision Revision of the Regional Parameters document supported by the End-Device
  • SupportsJoin End-Device supports Join (OTAA) or not (ABP)
  • RXDelay1 Class A RX1 delay (mandatory for ABP)
  • RXDROffset1 RX1 data rate offset (mandatory for ABP)
  • RXDataRate2 RX2 data rate (mandatory for ABP)
  • RXFreq2 RX2 channel frequency (mandatory for ABP)
  • FactoryPresetFreqs List of factory-preset frequencies (mandatory for ABP)
  • MaxEIRP Maximum EIRP supported by the End-Device
  • MaxDutyCycle Maximum duty cycle supported by the End-Device
  • RFRegion RF region name (automatically set by ChirpStack Network Server)
  • Supports32bitFCnt End-Device uses 32bit FCnt (mandatory for LoRaWAN 1.0 End-Device) (always set to true)