Commands

Commands are generated by LoRa Server or external applications integrating with the LoRa Gateway Bridge. Depending the marshaler configuration these must be 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.

Request the gateway to schedule a downlink transmission.

The context key must contain the same value as the related uplink frame. It holds the gateway internal context (e.g. internal timing information).

JSON

Delay timing (e.g. Class-A)

{
    "phyPayload": "IHN792Ld0vEHetyVv9+llJnnmz88Up6pFz8UiUdJMnUc",
    "txInfo": {
        "gatewayID": "AQIDBAUGBwg=",
        "frequency": 868100000,
        "power": 14,
        "modulation": "LORA",
        "loRaModulationInfo": {
            "bandwidth": 125,
            "spreadingFactor": 10,
            "codeRate": "4/5",
            "polarizationInversion": true
        },
        "board": 0,
        "antenna": 0,
        "timing": "DELAY",
        "delayTimingInfo": {
            "delay": "1s"
        },
        "context": "AAAAAAAAAAMAAAAAAAAABA=="
    },
    "token": 1234
}

GPS timing (e.g. Class-B)

{
    "phyPayload": "IHN792Ld0vEHetyVv9+llJnnmz88Up6pFz8UiUdJMnUc",
    "txInfo": {
        "gatewayID": "AQIDBAUGBwg=",
        "frequency": 868100000,
        "power": 14,
        "modulation": "LORA",
        "loRaModulationInfo": {
            "bandwidth": 125,
            "spreadingFactor": 10,
            "codeRate": "4/5",
            "polarizationInversion": true
        },
        "board": 0,
        "antenna": 0,
        "timing": "GPS_EPOCH",
        "gpsEpochTimingInfo": {
            "timeSinceGPSEpoch": "1s"
        }
    },
    "token": 1234
}

Immediately (e.g. Class-C)

{
    "phyPayload": "IHN792Ld0vEHetyVv9+llJnnmz88Up6pFz8UiUdJMnUc",
    "txInfo": {
        "gatewayID": "AQIDBAUGBwg=",
        "frequency": 868100000,
        "power": 14,
        "modulation": "LORA",
        "loRaModulationInfo": {
            "bandwidth": 125,
            "spreadingFactor": 10,
            "codeRate": "4/5",
            "polarizationInversion": true
        },
        "board": 0,
        "antenna": 0,
        "timing": "IMMEDIATELY"
    },
    "token": 1234
}

Protobuf

This message is defined by the DownlinkFrame Protobuf message.

exec - Command execution request

This will request the execution of a command by the LoRa Gateway Bridge. Please note that these commands must be pre-configured in the Configuration file.

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "command": "reboot",
    "token": "[BASE64 ENCODED BLOB]",
    "stdin": "[OPTIONAL BASE64 ENCODED BLOB]",
    "environment": {
        "ENV_VAR_1": "value1",
        "ENV_VAR_2": "value2"
    }
}

Protobuf

This message is defined by the GatewayCommandExecRequest Protobuf message.