User Manual

Table Of Contents
SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R11
24MQTT
Page 252 of 308
Parameter Type Description
<Will_Retain> Number Whether or not the Will Message will be retained across disconnects:
0 (default value): the Will Message will not be retained at the MQTT server across
disconnects from MQTT client
1: the Will Message will be retained by the MQTT server across disconnects from
MQTT client (until superseded by another message).
<Will_Topic> String Standard MQTT Topic Name. It could include various Topic Separators "/" to form
various Topic levels.
<result> Number Operation result:
0: failure
1: success
24.2.4Notes
If a connection is attempted when the Will Message is not valid (i.e., either the empty string or the default
value), then the <Will_QoS> and <Will_Retain> parameters revert to default values.
24.3MQTT Will Message configuration +UMQTTWMSG
+UMQTTWMSG
SARA-R410M-02B SARA-R410M-52B SARA-R412MModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No - MQTT Error
24.3.1Description
Configures the Will Message associated with the other MQTT profile parameters for an MQTT client's
connection. In the MQTT Protocol, an MQTT client can configure a Will Message to be broadcast from the
MQTT message broker (MQTT server) whenever it disconnects the MQTT client outside of a specific MQTT
client disconnect request.
24.3.2Syntax
Type Syntax Response Example
Set AT+UMQTTWMSG=<Will_Msg> +UMQTTWMSG: <result>
OK
AT+UMQTTWMSG="Unrequested
Disconnect. Please check network
connectivity or battery life."
+UMQTTWMSG: 1
OK
Read AT+UMQTTWMSG? OK
Test AT+UMQTTWMSG=? OK
URC +UUMQTTWMSG: <Will_Msg> +UUMQTTWMSG: "Unrequested
Disconnect. Please check network
connectivity or battery life."
24.3.3Defined values
Parameter Type Description
<Will_Msg> String Standard MQTT message
<result> Number Operation result:
0: failure
1: success