Relay event payload

The Relay event payload allows a Relay Gateway to broadcast data like a heartbeat, location information, battery status, ... The event payloads are encoded as TLV such that the event payload can contain data for known and unknown (proprietary) event types.

Bytes:

1 byte4 bytes4 bytesn bytes4 bytes
Event MHDRTimestampRelay IDTLV payload (encrypted)MIC

Event MHDR

Bits:

7..54..32..0
MTypePayload typeHop count
  • MType = 111 (= Proprietary LoRaWAN MType)
  • Payload type = 10 (= Relay event)
  • Hop count = 000 = 1, ... 111 = 8

Note: The hop count is incremented each time the event payload is relayed by an other Relay Gateway. The MIC must be re-calcalculated on each relay.

Timestamp

Unix timestamp (seconds).

Relay ID

The Relay ID of the Relay Gateway sending the event payload.

TLV payload

Bytes:

1 byte1 byten bytes
TypeLengthPayload

Please see the TLV payloads page for the known payload types.

Encryption

The TLV payload is encrypted using the same encryption scheme as the LoRaWAN FrmPayload (see section 4.3.3 of the LoRaWAN 1.0.4 specs). For the encryption the block Ai is defined as follow:

Octets:

1414411
0x014 x 0x000x00Relay IDTimestamp0x00i

MIC

Message integrity code, used by other Relay and Border gateways to check the data integrity of the packet. This is obtained by calculating the CMAC over the event payload (- MIC bytes), and using the first 4 bytes of the calculated CMAC as MIC. Note: The MIC must be calculated after encrypting the TLV payload!