Gateway Profile (11000-11999)

Gateway heartbeat monitoring, Wirepas mesh management, and MQTT configuration.

Remote Commands (via 1402)

Gateway devices support the following remote commands through the generic command interface (dataId 1402):

CommandPayloadDescription
REBOOTemptyReboot the gateway device
CELLLOCATEemptyRequest cellular location (2G/3G gateways only)
CLEAR_SCRATCHPADemptyClear OTAP scratchpad on Wirepas sink
WP_REMOTE_UPDATESee belowTrigger Wirepas firmware update
SET_SINK_COST"<cost>"Set sink cost value (0-254)

WP_REMOTE_UPDATE payload format:

nodeid='target_nodeid';scratchpad_num='target_scratchpad_num';delay='update_delay'

Heartbeat Monitoring

Gateway Heartbeat Summary (11200)

Aggregated heartbeat status for all connected sensors.

{
    "tsmId": 11200,
    "tsmEv": 10,
    "slotInterval": Number,
    "slotBitCount": Number,
    "heartbeats": [
        {
            "tuid": "String",
            "slotBits": Number
        }
    ]
}
FieldDescription
slotIntervalHeartbeat slot interval in seconds
slotBitCountNumber of meaningful bits in slotBits
slotBitsBit-field of received heartbeats (LSB = most recent)

Gateway Heartbeat Single Device State Change (11201)

Instant notification when a device’s connectivity changes.

{
    "tsmId": 11201,
    "tsmEv": 10,
    "tuid": "String",
    "slotInterval": Number,
    "slotBitCount": Number,
    "slotBits": Number
}
  • slotBitCount is typically 3 when heartbeats have been missed
  • slotBitCount is typically 1 when connection is re-established
  • slotBits of 0 indicates connection lost

Gateway Heartbeat Configuration (11210)

Configure heartbeat monitoring behavior. Sent with tsmEv: 30.

{
    "tsmId": 11210,
    "tsmEv": 30,
    "transactionId": Number,
    "heartbeatInterval": Number,     // minutes (0 = disabled)
    "reportInterval": Number,        // minutes
    "instantMode": Boolean,          // Enable 11201 messages
    "updateSinkCost": Boolean,       // Dynamic load balancing
    "sinkCostMin": Number,           // Default: 0
    "sinkCostMax": Number,           // Default: 16
    "sinkCostStep": Number           // Max change per hour, default: 1
}

Gateway Heartbeat Request Summary (11211)

Request current heartbeat summary. Sent with tsmEv: 32.

{
    "tsmId": 11211,
    "tsmEv": 32
}

Gateway responds with message 11200 using tsmEv: 33.


Wirepas Raw Packet Interface

Send Wirepas Raw Packet (11310)

Send arbitrary data through the Wirepas mesh. Sent with tsmEv: 35.

{
    "tsmId": 11310,
    "tsmEv": 35,
    "wpnode": Number,                // Destination node address
    "payload": "Buffer",             // 1-102 bytes
    "srcEndpoint": Number,           // 0-255
    "dstEndpoint": Number,           // 0-255
    "transactionId": Number
}

Response (tsmEv: 36):

{
    "tsmId": 11310,
    "tsmEv": 36,
    "result": Number,
    "transactionId": Number
}

Result codes:

  • 0: OK
  • -1: Other error
  • -2: Payload too long
  • -3: Invalid parameters

Receive Wirepas Raw Packet (11311)

Incoming raw packets from the mesh network. Sent with tsmEv: 0.

{
    "tsmId": 11311,
    "tsmEv": 0,
    "wpnode": Number,
    "payload": "Buffer",
    "srcEndpoint": Number,
    "dstEndpoint": Number
}

Wirepas Raw Packet Reception Configuration (11312)

Configure which raw packets to forward to cloud. Sent with tsmEv: 30.

{
    "tsmId": 11312,
    "tsmEv": 30,
    "receiveEndpoints": [Number],    // Destination endpoints to listen
    "diagSrcEndpoints": [Number],    // Source endpoints for diagnostics
    "transactionId": Number
}

Wirepas Application Configuration

Wirepas Application Config Data (11320)

Configure shared application data broadcast to all mesh nodes. Sent with tsmEv: 30.

{
    "tsmId": 11320,
    "tsmEv": 30,
    "appConfigData": "Buffer",       // Wirepas Mesh Application Config
    "transactionId": Number
}

Secondary MQTT Connection

Secondary MQTT Configuration (11500)

Configure an additional MQTT connection for data forwarding.

{
    "host": "mqtt.broker.hostname.org",
    "port": 8888,
    "tls": false,
    "anonymous": false,
    "username": "user",
    "password": "pass",
    "publishTopic": "topic/to/publish"
}

Secondary MQTT Control (11501)

Enable/disable secondary MQTT and configure data routing.

{
    "enabled": true,
    "tsopsMode": Number  // 0-2
}

tsopsMode values:

  • 0: Send all data to TSOPS (tsmId = *)
  • 1: Send full diagnostics (tsmId < 9999)
  • 2: Send only minimum system data (reset info, etc.)