User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
25MQTT
Page 303 of 401
25.4MQTT will message configuration +UMQTTWMSG
+UMQTTWMSG
SARA-R410M-02B SARA-R410M-52B SARA-R410M-63B SARA-R410M-73B SARA-R410M-83B
SARA-R412M
Modules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No - +CME Error
25.4.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.
25.4.2Syntax
Type Syntax Response Example
Set AT+UMQTTWMSG=<will_
message>[,<hex_mode>]
[+UMQTTWMSG: <result>]
OK
AT+UMQTTWMSG="Unrequested
Disconnect. Please check network
connectivity or battery life."
+UMQTTWMSG: 1
OK
Read AT+UMQTTWMSG? +UMQTTWMSG: <wm_length>,
<will_message>
OK
+UMQTTWMSG: 74,"Unrequested
Disconnect. Please check network
connectivity or battery life."
OK
Test AT+UMQTTWMSG=? OK
URC +UUMQTTWMSG: <will_message> +UUMQTTWMSG: "Unrequested
Disconnect. Please check network
connectivity or battery life."
25.4.3Defined values
Parameter Type Description
<will_message> String Last will message. ASCII or hexadecimal data.
SARA-R4 / SARA-N4 - The maximum length is 256 characters. In case of exadecimal
data the parameter length must be even.
The default value is an empty string.
<hex_mode> Number Allowed values:
0 (default value): ASCII input for <will_message>
1: hexadecimal input for <will_message>
<wm_length> Number Number of octects in <will_message>.
<result> Number Operation result:
0: failure
1: success
25.4.4Notes
SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4
The read command does not provide the information text response.
The <hex_mode> and <wm_length> parameters are not supported.
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B
The +UUMQTTWMSG URC is not supported.