Know if a received message was acknowledged from the HTTP integration

Hi,

We have build our own HTTP integration for the Chirpstack Application Server and need to know if we receive acknowledged after sending a ConfirmedDataDown message. In Chirpstack we can see the device has send a LoRa message with the “macPayload.fhdr.fCtrl.ack”: true, but we don’t see this in the JSON body of the HTTP integration.

It’s clear there are ack and txack events documented, but we do not receive those.

Below are the screenshots of the two messages in Chirpstack and the received JSON bodies.

NO ACK

{
  "applicationID": "1",
  "applicationName": "Test-server",
  "deviceName": "0017BB0000012443",
  "devEUI": "0017BB0000012443",
  "rxInfo": [
    {
      "gatewayID": "AIAAAAgGAFE=",
      "time": null,
      "timeSinceGPSEpoch": null,
      "rssi": -83,
      "loRaSNR": 10,
      "channel": 4,
      "rfChain": 0,
      "board": 0,
      "antenna": 0,
      "location": {
        "latitude": 52.68852535400337,
        "longitude": 5.035284161567689,
        "altitude": 0,
        "source": "UNKNOWN",
        "accuracy": 0
      },
      "fineTimestampType": "NONE",
      "context": "43evEw==",
      "uplinkID": "8nj7F4ziTn2AiWPyvWXMAQ==",
      "crcStatus": "CRC_OK"
    }
  ],
  "txInfo": {
    "frequency": 867900000,
    "modulation": "LORA",
    "loRaModulationInfo": {
      "bandwidth": 125,
      "spreadingFactor": 7,
      "codeRate": "4/5",
      "polarizationInversion": false
    }
  },
  "adr": true,
  "dr": 5,
  "fCnt": 1233,
  "fPort": 2,
  "data": "22CEBED9C7625B09A1114B28A80471031E02",
  "objectJSON": "",
  "tags": {},
  "confirmedUplink": false,
  "devAddr": "AXAWYQ==",
  "publishedAt": "2022-07-08T07:16:19.610172246Z",
  "deviceProfileID": "02a0a385-5479-462e-be6a-9acbd988ea5b",
  "deviceProfileName": "OTAA"
}

ACK

{
  "applicationID": "1",
  "applicationName": "Test-server",
  "deviceName": "0017BB0000012443",
  "devEUI": "0017BB0000012443",
  "rxInfo": [
    {
      "gatewayID": "AIAAAAgGAFE=",
      "time": null,
      "timeSinceGPSEpoch": null,
      "rssi": -81,
      "loRaSNR": 10.2,
      "channel": 3,
      "rfChain": 0,
      "board": 0,
      "antenna": 0,
      "location": {
        "latitude": 52.68852535400337,
        "longitude": 5.035284161567689,
        "altitude": 0,
        "source": "UNKNOWN",
        "accuracy": 0
      },
      "fineTimestampType": "NONE",
      "context": "6p8eKw==",
      "uplinkID": "/Jx7BjU5RWCV5qNZzP0xDQ==",
      "crcStatus": "CRC_OK"
    }
  ],
  "txInfo": {
    "frequency": 867700000,
    "modulation": "LORA",
    "loRaModulationInfo": {
      "bandwidth": 125,
      "spreadingFactor": 7,
      "codeRate": "4/5",
      "polarizationInversion": false
    }
  },
  "adr": true,
  "dr": 5,
  "fCnt": 1236,
  "fPort": 2,
  "data": "22D036DAC7625B09AE114B28F40471032402",
  "objectJSON": "",
  "tags": {},
  "confirmedUplink": false,
  "devAddr": "AXAWYQ==",
  "publishedAt": "2022-07-08T07:18:19.635770073Z",
  "deviceProfileID": "02a0a385-5479-462e-be6a-9acbd988ea5b",
  "deviceProfileName": "OTAA"
}

The acknowledgement is a separate integration event (ack), which contains a boolean indicating the downlink was confirmed or not. You are looking at the up event, which does not contain this boolean.

I noticed we only receive the up event, but never any other event.

We have been logging the event parameter from the integration POST request for the last 6 hours. And only receive the up event. Even though I have just seen an ack message being received in the Chirpstack Application Manager, and that can’t be the only ack message we have received during the past hours.

Could there be a bug in the HTTP integration?

The above screenshot shows the settings for our HTTP integration if that helps.

Have you used a service like requestbin to validate that this is not an issue with your end-application?

It sound to me that there is a problem with your application.
Have you checked it’s propper connection? :smiling_face_with_tear:

I would like to test that.

Just so we are on the same page:
When Chirpstack receives a “unconfirmedDataUp” message with the ack flag set to true the HTTP integration will send a event=up, and the integration also sends event=ack.

Are there any other ways we can trigger Chirpstack to send an ack event to the server?

The ack event is send if you have scheduled a confirmed downlink in the following cases:

  • In case of an uplink with ack=true (in which case the event will contain acknowledged=true)
  • In case of an uplink with ack=false (in which case the event will contain acknowledged=false)
  • In case the downlink timed out (Class-B/C) (in which case the event will contain acknowledged=false)