User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
25MQTT
Page 302 of 401
whether the MQTT server saves the will message (and the corresponding will message parameters) across
MQTT disconnection.
25.3.2Syntax
Type Syntax Response Example
Set AT+UMQTTWTOPIC=<Will_QoS>,
<Will_Retain>,<Will_Topic>
[+UMQTTWTOPIC: <result>]
OK
AT+UMQTTWTOPIC=0,0,"sensor/
heat/SD/bldg5/DelMarConfRm/
status"
+UMQTTWTOPIC: 1
OK
Read AT+UMQTTWTOPIC? +UMQTTWTOPIC: <Will_QoS>,
<Will_Retain>,<WT_length>,<Will_
Topic>
OK
+UMQTTWTOPIC: 2,1,22,"This is the
will topic"
OK
Test AT+UMQTTWTOPIC=? +UMQTTWTOPIC: (list of supported
<Will_QoS>),(list of supported
<Will_Retain>)
OK
+UMQTTWTOPIC: (0-2),(0-1)
OK
URC +UUMQTTWTOPIC: <Will_QoS>,
<Will_Retain>,<Will_Topic>
+UUMQTTWTOPIC: 0,0,"user/u-
blox"
25.3.3Defined values
Parameter Type Description
<Will_QoS> Number MQTT will Quality of Service:
0 (default value): at most once delivery
1: at least once delivery
2: exactly once delivery
<Will_Retain> Number Whether or not the will message will be retained across disconnects:
0 (default value): the will message will not be retained by the MQTT broker
1: the will message will be retained by the MQTT broker
<Will_Topic> String Last will topic name. The maximum length is 256 characters.
<result> Number Operation result:
0: failure
1: success
<WT_length> Number Last will topic length.
25.3.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.
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B
The +UUMQTTWTOPIC URC is not supported.
SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4
The read command does not provide the information text response: only the final result code is issued.