Class C Downlink Json Format Definitions

Hi Guys, presently using webhooks to schedule downlinks to Class C devices on The Things Stack. I cannot locate any detailed documentation on the available fields in the JSON downlink format. I have managed to generate the following data downlink:

{"downlinks":[{ "frm_payload":"ARDwEAABAgAAVM8=", "f_port":1, "priority":"NORMAL", "class_b_c":{"absolute_time": "2023-08-27T11:04:53Z"} }]}

I would like to know what additional fields/attributes exist with respect to the downlink format. I would greatly appreciate it if anyone can point me to where I can find additional information in this regard. Thanks

What are you hoping for? The spec doesn’t really provide for much else …

If it’s not in the docs, then it’s unlikely to be an official thing, but you could look at the TTS code to see if there are any extras, just beware, there may be :dragon: :dragon_face:

1 Like

Was wondering if it is actually specified anywhere, examples and docs appear to list subsets of the available options. An obvious one I can add is ‘confirmed’, but I was wondering if it is possible to specify that the downlink is only sent in the RX2 window.

Thanks for the heads up on the TTS code, will see what I can find there.

Ouch! Perpetual circular downlink queue speeding up global warming and maiming puppies. :wink:

https://www.thethingsindustries.com/docs/devices/class-c/

Gateway list is useful, wonder what is default behavior?
Best gateway or all recent gws?

I’d suspect this in only really useful for multi-cast as the LNS will already know which is the best gateway to send the downlink for a particular device.

Hi Guys, can anyone cast some light on why this message would occasionally occur:

This particular event details are as follows:

{
  "name": "ns.down.data.schedule.fail",
  "time": "2023-09-13T04:54:02.805622623Z",
  "identifiers": [
    {
      "device_ids": {
        "device_id": "eui-86-80-00-01-01-19-01-02",
        "application_ids": {
          "application_id": "aus-eastron-elec-v3"
        },
        "dev_eui": "8680000101190102",
        "join_eui": "8680000201190102",
        "dev_addr": "2702E1D6"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
    "namespace": "pkg/gatewayserver",
    "name": "schedule",
    "message_format": "failed to schedule",
    "correlation_id": "227079ed62f348549d4274dec588bd0d",
    "code": 10,
    "details": [
      {
        "@type": "type.googleapis.com/ttn.lorawan.v3.ScheduleDownlinkErrorDetails",
        "path_errors": [
          {
            "namespace": "pkg/gatewayserver",
            "name": "schedule_path",
            "message_format": "failed to schedule on path `{gateway_uid}`",
            "attributes": {
              "gateway_uid": "aus-iot-bottleprint@aus-iot"
            },
            "correlation_id": "7146c72c41c64df08c61df1bb117504d",
            "cause": {
              "namespace": "pkg/gatewayserver/io",
              "name": "tx_schedule",
              "message_format": "failed to schedule",
              "correlation_id": "60959139ef3b4f6298656a1dedbb18a6",
              "code": 10,
              "details": [
                {
                  "@type": "type.googleapis.com/ttn.lorawan.v3.ScheduleDownlinkErrorDetails",
                  "path_errors": [
                    {
                      "namespace": "pkg/gatewayserver/io",
                      "name": "rx_empty",
                      "message_format": "settings empty",
                      "correlation_id": "3582cfa910f441f2922c4bcb6ffda5bd",
                      "code": 9
                    },
                    {
                      "namespace": "pkg/gatewayserver/io",
                      "name": "rx_window_schedule",
                      "message_format": "schedule in Rx window `{window}` failed",
                      "attributes": {
                        "window": 2
                      },
                      "correlation_id": "6a206597228b4957a515cf46c3a9a0dd",
                      "cause": {
                        "namespace": "pkg/gatewayserver/scheduling",
                        "name": "conflict",
                        "message_format": "scheduling conflict",
                        "correlation_id": "1f72b5f75ddc45169ad540e41748c4e4",
                        "code": 6
                      },
                      "code": 6
                    }
                  ]
                }
              ]
            },
            "code": 10,
            "details": [
              {
                "@type": "type.googleapis.com/ttn.lorawan.v3.ScheduleDownlinkErrorDetails",
                "path_errors": [
                  {
                    "namespace": "pkg/gatewayserver/io",
                    "name": "rx_empty",
                    "message_format": "settings empty",
                    "correlation_id": "3582cfa910f441f2922c4bcb6ffda5bd",
                    "code": 9
                  },
                  {
                    "namespace": "pkg/gatewayserver/io",
                    "name": "rx_window_schedule",
                    "message_format": "schedule in Rx window `{window}` failed",
                    "attributes": {
                      "window": 2
                    },
                    "correlation_id": "6a206597228b4957a515cf46c3a9a0dd",
                    "cause": {
                      "namespace": "pkg/gatewayserver/scheduling",
                      "name": "conflict",
                      "message_format": "scheduling conflict",
                      "correlation_id": "1f72b5f75ddc45169ad540e41748c4e4",
                      "code": 6
                    },
                    "code": 6
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "correlation_ids": [
    "as:downlink:01HA6E5PKMBFN8EBKHCE51VBRS",
    "ns:downlink:01HA6E789MPBKERXK8K2764BW7",
    "ns:transmission:01HA6E789ME39H6RMACAR9FXY8"
  ],
  "origin": "ip-10-23-15-79.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgdhdXMtaW90"
  },
  "visibility": {
    "rights": [
      "RIGHT_APPLICATION_TRAFFIC_READ"
    ]
  },
  "unique_id": "01HA6E789N1EJS29CPC4HHYG3K"
}

Thanks

Likely because the gateway was supposed to transmit another packet at that time, hence the conflict mentioned in the message.

Thanks Jac, I don’t think this is the case as I only have 4 nodes connected via this gateway. Will continue to dig.