SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
24 MQTT
Page 250 of 307
indicates that more information from this MQTT parameter remains to be displayed. If the continuation
symbol appears on both sides of the double-quotes, then this message is the continuation of a previous
display (and requires future displays to complete), e.g.,
Topic: +"is in the middle of a long messa"+
.
• The profile parameters 6, 7, 8, 9 and 14 are provided in the read response for informational purposes.
They cannot be set using the +UMQTT set command. Profile parameters 6, 7 and 8 are set with the
command. Profile parameter 9 is set with the
command. Parameter
command.
• When displaying all of the MQTT Client profile parameters, (AT+UMQTT?), only the non-default string
parameters are displayed. Thus, if Will Message, Will Topic, server name, IP address, username, or
password are not entered, they will not be displayed.
• Only IPv4 is supported.
• Secure MQTT (TLS) is not supported.
• Client subscriptions and delivered messages across disconnects by either the server or the client <clean_
session>=0 is not supported.
• The MQTT <op_code>=8 has no effect on the server behavior because the MQTT client automatically
sends an MQTT ping to the MQTT server prior to the <timeout>
24.2 MQTT Will Topic configuUMQTTWTOPIC
+UMQTTWTOPIC
SARA-R410M-02B SARA-R410M-52B SARA-R412M
Modules
SARA-N4
Syntax
PIN required
Settings saved Can be aborted
Response time Error reference
Attributes
full
No
No
No
-
24.2.1 Description
Configures the MQTT profile parameters related to the MQTT's Will Message ("Last Will and Testament"). In
the MQTT protocol, an MQTT client can configure a Will Message to be broadcast from the MQTT message
broker (MQTT server) whenever the server disconnects the MQTT client outside of a specific MQTT client
disconnect request. Upon disconnect, the MQTT server will publish the Will Message for a given connection
to the specified Will Topic name, with the specified Will QoS (Quality of Service). The Will Retain flag indicates
whether the MQTT server saves the Will Message (and the corresponding Will Message parameters) across
MQTT disconnects.
24.2.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?
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"
24.2.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: