Drop downlink data message: no payload when using downlink payload formatters

We are using a selfhosted ttn-stack-v3. Everything seems to be working well, except when we try to send a downlink using the Downlink payload formatters.

If we use the example of Downlink Encoder function from: TTN docs

We can push a download message via MQTT using

  {"downlinks": [{
    "f_port":15,
    "confirmed":false,
    "priority": "NORMAL",
    "frm_payload": "AQ=="
  }]
}

However, if we send the object:

  {"downlinks": [{
    "f_port":15,
    "confirmed":false,
    "priority": "NORMAL",
    "payload_fields": {
    "led": true
  }
  }]
}

Following the examples in TTN it should run the Downlink payload formatters, however we get this error code:

{
  "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
  "namespace": "pkg/applicationserver",
  "name": "no_payload",
  "message_format": "no payload",
  "code": 2
}

This error code is received also if we change the object “payload_fields” to any other, for example “fields_payloads”. This is why I think we are not using the right object.

· Which object must be sent to execute the Downlink payload formatters?
· Are the Downlink payload formatters a functionality not ready yet?

Thank you very much.

Solved

By deeply searching in the github I arrived till this page where there are a lot of examples, so I could find the right object was “decoded_payload”.

  {"downlinks": [{
    "f_port":15,
    "confirmed":false,
    "priority": "NORMAL",
    "**decoded_payload**": {
    "led": true
  }
  }]
}

It might be useful to give more visibility to these examples in the documentation

3 Likes