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.

config - gateway configuration

Request the gateway to update its channel-plan configuration.

The LoRa Gateway Bridge assumes this configuation will be applied to an 8-channel gateway (+ 1 single-SF LoRa and 1 FSK channel). Make sure that the channel-plan fits within the bandwidth of both radios of the gateway.

Note: in order to configure the packet-forwarder over MQTT, don’t forget to configure at least one [[packet_forwarder.configuration]] section in the configuration file.

JSON

{
    "gatewayID": "cnb/AC4GLBg=",
    "version": "1.2.3",
    "channels": [
        {
            "frequency": 868100000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 868300000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 868500000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 867100000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 867300000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 867500000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 867700000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 867900000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 125,
                "spreadingFactors": [7, 8, 9, 10, 11, 12]
            }
        },
        {
            "frequency": 868300000,
            "modulation": "LORA",
            "loRaModulationConfig": {
                "bandwidth": 250,
                "spreadingFactors": [
                    7
                ]
            }
        },
        {
            "frequency": 868800000,
            "modulation": "FSK",
            "fskModulationConfig": {
                "bandwidth": 125,
                "bitrate": 50000
            }
        }
    ]
}

Protobuf

This message is defined by the GatewayConfiguration Protobuf message.