Skip to content

RS485 Transceive

Sends a raw bus request to a device that supports RS485 passthrough, then waits for the slave response. Use this endpoint when you need to communicate with an RS485 or Modbus RTU slave connected behind a WLTE device.

This endpoint only transports raw hexadecimal data. It does not parse Modbus business fields. The caller is responsible for constructing the request, validating CRC, and interpreting responseHex.

Applicability

  • Only devices with RS485 passthrough capability are supported.
  • Call List Devices to obtain deviceId, then call List Device Type Definitions to confirm device capabilities.
  • If the device is offline, does not support this capability, or the underlying gateway is unavailable, the command may be rejected or time out.

Rate Limit

Command endpoints are rate limited to protect device and bus stability. If the response is 429 RATE_LIMITED, retry only after the Retry-After response header or retryAfterSeconds value allows it.

Synchronous Wait

  • The first request waits synchronously for up to about 10 seconds.
  • If an RS485 slave response is received within the wait window, the response returns status=SUCCESS with raw response data in result.responseHex.
  • If no response is received within the wait window, the response returns status=TIMEOUT; this means the operation was not confirmed successful, and result is usually absent.
  • If the caller retries with the same Idempotency-Key while the original request is still waiting for device confirmation, the response may return SENT.

Endpoint

http
POST /wlte/v1/devices/{deviceId}/rs485/transceive

Authorization Requirements

ScopeRequiredDescription
device:controlYesSend an RS485 passthrough command to the target device

Request

Full URL:

http
POST {baseUrl}/wlte/v1/devices/{deviceId}/rs485/transceive

Request headers:

http
Authorization: Bearer {accessToken}
Content-Type: application/json
Accept: application/json
Idempotency-Key: <caller-generated unique string>

Path parameters:

ParameterTypeRequiredRule
deviceIdstringYesMust not be empty

Request body:

json
{
  "requestHex": "02060034000109F7"
}

Body fields:

FieldTypeRequiredRule
requestHexstringYesRaw RS485/Modbus RTU request data as a continuous hexadecimal string, from 1 to 30 bytes

requestHex may use uppercase or lowercase hexadecimal characters, but must not include spaces, 0x prefixes, or separators.

Idempotency-Key

Idempotency-Key is a required request header. It is a unique string generated by the caller to identify one operation intent. The server uses it to prevent duplicate execution caused by network retries or application-layer retries.

ScenarioAction
Sending a new RS485 transceive requestGenerate a new key
Request sent but network timeout, no response receivedReuse the original key for the same request
Received 429 RATE_LIMITED and retrying the same requestReuse the original key for the same request
requestHex or target device changesGenerate a new key

Repeated request behavior:

  • Same client, same path, same key + same body: returns the original command id and current status; command is not executed again.
  • Same key but different body: returns 409 IDEMPOTENCY_CONFLICT.
  • The server retains idempotency records for about 48 hours; after expiry the same key is treated as a new request.

Success Response

HTTP status:

text
202 Accepted

Response body (RS485 response received):

json
{
  "code": "COMMAND_ACCEPTED",
  "message": "Command accepted.",
  "requestId": "req_001",
  "data": {
    "id": "cmd_001",
    "deviceId": "rek053537488",
    "type": "RS485_TRANSCEIVE",
    "status": "SUCCESS",
    "result": {
      "responseHex": "02060034000109F7"
    },
    "createdAt": "2026-06-11T00:00:00Z"
  }
}

Response body (wait window timed out):

json
{
  "code": "COMMAND_ACCEPTED",
  "message": "Command accepted.",
  "requestId": "req_001",
  "data": {
    "id": "cmd_001",
    "deviceId": "rek053537488",
    "type": "RS485_TRANSCEIVE",
    "status": "TIMEOUT",
    "createdAt": "2026-06-11T00:00:00Z"
  }
}

Status Semantics

  • SENT: the command has been accepted and is still waiting for final device confirmation. This status mainly appears on repeated requests using the same Idempotency-Key or on subsequent polling.
  • SUCCESS: an RS485 slave response was received.
  • FAILED: the command did not complete successfully.
  • TIMEOUT: no RS485 response was received within the wait window; treat as not confirmed successful.

Response data Schema

FieldTypeRequiredDescription
idstringYesUnique command identifier; persist this for subsequent result polling
deviceIdstringYesDevice identifier
typestringYesCommand type, always RS485_TRANSCEIVE
statusstringYesCommand status. Enum: SENT, SUCCESS, FAILED, TIMEOUT
resultobjectNoCommand result. May be absent on timeout or failure
result.responseHexstringNoRaw hexadecimal response returned by the RS485 slave
createdAtstringYesCommand creation time in RFC3339 UTC

Get Command Result

If the initial response does not provide a final result, or if your integration needs to confirm status later, call Get Command Result with data.id.

Error Responses

Possible responses:

  • 400 INVALID_REQUEST
  • 401 AUTH_REQUIRED
  • 401 AUTH_INVALID
  • 401 AUTH_EXPIRED
  • 403 AUTH_SCOPE_DENIED
  • 404 DEVICE_NOT_FOUND
  • 409 IDEMPOTENCY_CONFLICT
  • 422 COMMAND_REJECTED
  • 422 DEVICE_OFFLINE
  • 429 RATE_LIMITED
  • 503 GATEWAY_UNAVAILABLE
  • 500 INTERNAL_ERROR
Docs buildVersion v1.2.21-20260612-141814-62
Copyright © 2026 WLTE