Supported Protocols

The IoT Emulator supports multiple IoT communication protocols.

LWM2M (Lightweight M2M)

LWM2M is a device management protocol designed for IoT devices, built on top of CoAP.

Features

  • Device registration and lifecycle management

  • Resource observation and notification

  • Firmware update support

  • Bootstrap support

Default Ports

  • CoAP over UDP: 5683 (unsecured), 5684 (DTLS secured)

  • CoAP over TCP: 5883 (unsecured), 5884 (TLS secured)

The transport (UDP/TCP) and concrete port are chosen in the Protocol Options tab.

Protocol Options

These are the defaults used by the emulator (from lwm2m_gui.properties); the Protocol Options tab exposes many more advanced fields (OSCORE, firmware/software update timing, DTLS CID, content format, thread counts, etc.).

Option Default Description

Version

1.0

LWM2M Enabler version — 1.0 or 1.1

Transport

UDP

UDP (CoAP) or TCP; pairs with the port selector above

Registration Lifetime

6000

Registration validity in seconds (lifetime)

Registration Timeout

600

Seconds to wait for a registration response (lwm2m.regtimeout)

ACK Timeout

10000

CoAP acknowledgment timeout in ms (ack_timeout)

Bootstrap

false

Register against a bootstrap server before the management session (bootstrap)

Notification Type

CON

CON (confirmable) or NON (non-confirmable) observe notifications (lwm2m.notification.type)

MQTT

MQTT is a lightweight publish-subscribe messaging protocol.

Features

  • Publish/Subscribe messaging

  • QoS levels (0, 1, 2)

  • Retained messages

  • Last Will and Testament

Default Ports

  • MQTT: 1883 (unsecured)

  • MQTTS: 8883 / 8884 (TLS secured)

Protocol Options

The Protocol Options tab for MQTT exposes the fields below (from mqtt_gui.properties).

Option Default Description

Username

(empty)

MQTT broker username (optional)

Password

(empty)

MQTT broker password (optional)

QoS Level

1

Quality of Service for publish/subscribe — 0, 1 or 2

Port

1883

Broker port — 1883 (plain), 8883 / 8884 (TLS)

Keep-alive (30 s), connection timeout (30 s) and max-inflight are set by the underlying Paho v3 client and are not exposed in the UI. The proprietary FSH_HUB and DUSUN protocols are built on this MQTT client and override the default QoS.

CoAP (Constrained Application Protocol)

CoAP is a specialized web transfer protocol for constrained devices.

Features

  • RESTful interface (GET, POST, PUT, DELETE)

  • Observe pattern for subscriptions

  • Block-wise transfers

  • DTLS security

Default Ports

  • CoAP: 5683 (unsecured)

  • CoAPS: 5684 (DTLS secured)

Protocol Options

Option Default Description

ACK Timeout

2000

Acknowledgment timeout in ms

Max Retransmit

4

Maximum retransmission attempts

Block Size

512

Block size for transfers

USP (User Services Platform)

USP (TR-369) is the next-generation protocol for device management, replacing TR-069.

Features

  • Controller-Agent architecture

  • Four Message Transfer Protocols (MTPs): STOMP, CoAP, WebSocket, MQTT

  • Protobuf message encoding

  • Bulk data collection

  • Configurable session handling, onboarding and TLS host-name verification

Default Ports

Each MTP has its own plain/secured port pair (selected in the Protocol Options tab):

MTP Plain Secured

STOMP

61617

61618

CoAP

5783

5784 (DTLS)

WebSocket

8025

4430 (TLS)

MQTT

18881

18882 (TLS)

Protocol Options

Option Default Description

MTP

STOMP

Message Transfer Protocol — STOMP, CoAP, WebSocket or MQTT; selecting one enables the matching port dropdown

Endpoint ID

auto

Agent endpoint identifier (server_endpoint / usp.mqtt.client_id)

Protocol Version

1.0

USP protocol version — 1.0 or 1.2 (usp.version)

MQTT QoS

1

QoS for the MQTT MTP — 0, 1 or 2 (usp.mtp.mqtt.qos)

MTP Ping Interval

0

Seconds between MTP keep-alive pings, 0 = off (usp.mtp.ping_interval)

MQTT Connect Retry Time

5

Minimum delay (sec) between MQTT reconnect attempts. Maps to usp.mtp.mqtt.connect_retry_time and corresponds to TR-181 Device.MQTT.Client.{i}.ConnectRetryTime.

MQTT Connect Retry Max Interval

30720

Maximum delay (sec) for the exponential reconnect backoff. Maps to usp.mtp.mqtt.connect_retry_max_interval (TR-181 ConnectRetryMaxInterval).

MQTT Connect Retry Interval Multiplier

2000

Backoff multiplier in units of 0.001 (informational; the underlying Paho v5 client uses its own exponential schedule between min and max). Maps to usp.mtp.mqtt.connect_retry_interval_multiplier (TR-181 ConnectRetryIntervalMultiplier).

When the USP agent is bound to MQTT, an unexpected disconnect triggers automatic reconnect with the delay range above. After a successful reconnect the agent re-subscribes to its reply-to topic so that pending controller requests can resume.

TLS Authentication

When the USP agent communicates with the MQTT broker over TLS, the emulator supports both mutual (client + server) authentication and server-only authentication. The mode is controlled by the FT_TLS_AUTH environment variable (or -Dft.tls.auth JVM property): 1 (default) enables mutual auth, 0 switches to server-only auth.

See TLS Authentication Mode in the Installation Guide for details and examples.

FSH_HUB

Proprietary protocol for FSH Hub smart-home gateways. It is built on top of the MQTT client (JSON-RPC over MQTT) and overrides the default QoS to 2.

Transport

  • MQTT broker, ports 1883 (plain) / 8883 (TLS) — same as MQTT

  • Default QoS 2 (exactly-once delivery)

Topics

The emulated hub subscribes to and publishes on the friendlytech/oneiot/api/v1/…​ topic namespace:

Topic Direction Purpose

friendlytech/oneiot/api/v1/rpc/request

subscribe

Incoming RPC requests (get / set / delete on parameters)

friendlytech/oneiot/api/v1/events/response

subscribe

Event acknowledgements from the server

friendlytech/oneiot/api/v1/rpc/response

publish

RPC responses back to the server

friendlytech/oneiot/api/v1/events/*

publish

Telemetry events and parameter updates

Protocol Options

In addition to the MQTT fields, the FSH Hub Protocol Options tab (from fsh_hub_gui.properties) exposes a sensor-scanning simulator:

Option Default Description

async_scan_sensors

true

Scan/attach sensors asynchronously instead of blocking

bulk_sensor_addition

true

Add all sensors in a single bulk operation

sensor_addition_delay

1000

Delay in ms between sensor additions (when not bulk)

sensor_categories

PowerMeter,DoorBell

Comma-separated list of sensor categories to generate

sensors_count

1

Number of sensors to create per category

DUSUN

Protocol support for Dusun gateway devices. Like FSH_HUB it rides on the MQTT client (JSON messages over MQTT), but overrides the default QoS to 0 (at-most-once).

Transport

  • MQTT broker, ports 1883 (plain) / 8883 (TLS)

  • Default QoS 0

Topics

The gateway is addressed by its MAC address:

Topic Direction Purpose

t/{mac}

subscribe

Commands addressed to the gateway

t

publish

Reports/responses from the gateway

Message Format

Messages are JSON with a reportAttribute envelope, for example:

{
  "type": "reportAttribute",
  "from": "GATEWAY",
  "to": "CLOUD",
  "mac": "30:ae:7b:26:2d:46",
  "deviceCode": "...",
  "time": 1717579200,
  "data": { }
}
DUSUN currently has no dedicated _gui.properties file — it reuses the MQTT connection settings and a fixed gateway MAC. There is no separate *Protocol Options page for it.