User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
25MQTT
Page 308 of 401
Parameter Type Description
<retain> Number Whether or not the message will be retained across disconnects. Allowed values:
0 (default value): the message will not be retained by the MQTT broker
1: the message will be retained by the MQTT broker
<hex_mode> Number Allowed values:
0 (default value): ASCII input for <pub_msg>
1: hexadecimal input for <pub_msg>
<pub_msg> String ASCII or hexadecimal data, the maximum parameter length is 1024 characters if
<hex_mode>=0 or 512 octects if <hex_mode>=1.
<message> String ASCII or hexadecimal data. The maximum length is 256 characters. The starting
quotation mark shall not be taken into account like data. At the end of the byte
stream, another quotation mark is provided for user convenience and visualization
purposes.
<filename> String File name containing the message to be published.
SARA-R4 / SARA-N4 - The maximum parameter length is 250 characters and the
maximum file content is 1024 characters.
<max_QoS> Number Maximum QoS level at which the MQTT broker can send messages to the MT. For
more details, see MQTT version 3.1.1 - OASIS standard [134].
0: at most once delivery
1: at least once delivery
2: exactly once delivery
<topic_filter> String An expression to indicate an interest in one or more topics, wildcard characters are
used to subscribe/unsubscribe to multiple topics at once. See MQTT introduction.
SARA-R4 / SARA-N4 - The maximum length is 256 characters.
<topic_name> String Indicates the topic to which the given MQTT message was published.
SARA-R4 / SARA-N4 - The maximum length is 256 characters.
<reason> Number Result of an MQTT subscribe request:
0-2: success
128: failure
Allowed values:
SARA-R4 / SARA-N4 - 0, 1, 2, 128
<num_unread_
msgs>
Number Indicates the number of unread received messages.
<format> Number Specifies the format of the messages when read using the <op_code>=6. Allowed
values:
0: no formating. All messages will be concatenated into a single line with no
separation between meeages
1 (default value): each messages will contain the <topic_name> and <message>
2: each messages will contain the <topic_name>, <msg_length>, <QoS> and
<message>
<mqtt_server> String IP address or URL of MQTT server.
SARA-R4 / SARA-N4 - The maximum length is 512 characters.
<one_message> Number Allowed values:
0: read all received messages
1: read only one message
<topic_msg_length> Number Sum of topic and message length
<topic_length> Number Topic length
<msg_length> Number Specifies the number of octets in <message> for <op_code>=6 (MQTT read
message)
<read_msg_length> Number Specifies the number of octets in <read_msg>
<read_msg> String Message received from MQTT server.
SARA-R4 - The maximum length is 1024 octects.
<ping_ON_OFF> Number Allowed values:
0 (default value): ping disabled
1: ping enabled the MT will ping the MQTT broker. The ping is issued when the MQTT
inactivity timeout period expires. See AT+UMQTT=10,<timeout>.
<memory_full> Number Indicates the message memory status. Allowed values:
0: message memory is available
1: message memory is full