Documentation (Beta)
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Encoder v2

To encode downlinks user must implement the JavaScript function encodeDownlink that is described below.

Example:

    function encodeDownlink(input) {
    
        ...

        return {
            "fPort": 0,
            "bytes": [],
            "errors": [],
            "warnings": []
        };
    }

Input object

  • data - JavaScript object representing downlink. Defined by the converter developer

Output object

  • fPort - int - DL LoRaWAN fPort
  • bytes - int[] - DL payload byte array, each byte represented by integer in range 0-255
  • errors - string[] - list of error messages while encoding the provided payload
  • warnings - string[] - list of warning messages that do not prevent encoding the payload