Events

Events are generated by the ChirpStack Gateway Bridge and forwarded to the configured integration. Depending the marshaler configuration, these are sent as JSON or Protobuf. For the Protobuf definitions, please refer to gw.proto.

  • The Protocol Buffers JSON Mapping defines that bytes must be encoded as base64 strings. This also affects the gatewayID field. When re-encoding this filed to HEX encoding, you will find the expected gateway ID string.

stats - gateway statistics

Statistics reported by the gateway.

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "ip": "192.168.1.5",
    "time": "2018-07-26T13:36:31Z",
    "location": {                   // only set when gateway has GPS
        "latitude": 1.12345,
        "longitude": 2.12345,
        "altitude": 10,
        "source": "GPS",
    },
    "configVersion": "1.2.3",       // maps to the 'Gateway configuration' message version
    "rxPacketsReceived": 4,
    "rxPacketsReceivedOK": 1,
    "txPacketsReceived": 0,
    "txPacketsEmitted": 1
}

Protobuf

This message is defined by the GatewayStats Protobuf message.

Uplink frame received by the gateway.

JSON

{
    "phyPayload": "AAEBAQEBAQEBAQEBAQEBAQGXFgzLPxI=",  // base64 encoded LoRaWAN frame
    "txInfo": {
        "frequency": 868300000,
        "modulation": "LORA",
        "loRaModulationInfo": {
            "bandwidth": 125,
            "spreadingFactor": 11,
            "codeRate": "4/5",
            "polarizationInversion": false
        }
    },
    "rxInfo": {
        "gatewayID": "cnb/AC4GLBg=",
        "time": "2018-07-26T15:15:58.599497Z",         // only set when the gateway has a GPS time source
        "timestamp": 58692860,                         // gateway internal timestamp (23 bit)
        "rssi": -55,
        "loRaSNR": 15,
        "channel": 2,
        "rfChain": 0,
        "board": 0,
        "antenna": 0,
        "fineTimestampType": "ENCRYPTED",
        "encryptedFineTimestamp": {
            "aesKeyIndex": 0,
            "encryptedNS": "d2YFe51PraE3EpnrZJV4aw=="  // encrypted nanosecond part of the time
        }
    }
}

Protobuf

This message is defined by the UplinkFrame Protobuf message.

Acknowledgement (or error) after a downlink command.

The index of items correlates to the same order of the down command payload items.

Possible status values are specified by the TxAckStatus enum in the gw.proto Protobuf definition.

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "token": 12345,
    "items": [
        {
            "status": "GPS_UNLOCKED"
        }
    ]
}

Protobuf

This message is defined by the DownlinkTXAck Protobuf message.

exec - Command execution response

The exec event is sent back after an exec command and contains the execution output (or possible error).

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "token": "[BASE64 ENCODED BLOB]",
    "stdout": "[BASE64 ENCODED BLOB]",
    "stderr": "[BASE64 ENCODED BLOB]",
    "error": "optional error message"
}

Protobuf

This message is defined by the GatewayCommandExecResponse Protobuf message.

raw - Raw packet-forwarder event

This payload is used for raw packet-forwarder events that are not integrated with the ChirpStack Gateway Bridge. Currently these are the:

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "rawID": "gsy9FN+rTwOEL8YzJJo+Kw==",
    "payload": "[BASE64 ENCODED BLOB]"
}

Protobuf

This message is defined by the RawPacketForwarderEvent Protobuf message.