MQTT::return_code

Description

This command gets or sets the return-code field of MQTT CONNACK messages.

Syntax

MQTT::return_code [<return_code>]

MQTT::return_code

  • Get the return-code field of MQTT CONNACK message.

MQTT::return_code <return_code>

  • Set the return-code field of MQTT CONNACK message to specified number. The number must be smaller than 256.
    • 0 : Connection Accepted.
    • 1 : Connection Refused. Protocol level not supported.
    • 2 : Connection Refused. The client-identifier is not allowed by the server.
    • 3 : Connection Refused. The MQTT service is not available.
    • 4 : Connection Refused. The data in the username or password is malformed.
    • 5 : Connection Refused. The client is not authorized to connect.
    • 6-255 : Reserved for future use.

Examples