User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
25MQTT
Page 300 of 401
Parameter Type Description
<local_port> Number MQTT client TCP port. The range goes from 1 to 65535. If the MQTT client port
number is not specified, the default port number is the IANA assigned port of 1883 for
non-TLS MQTT and 8883 for TLS MQTT.
<server_name> String Remote server name.
SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4 - The maximum
length is 128 characters.
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B - The maximum length
is 512 characters.
The default value is an empty string.
<IP_address> String Remote server IP address. The default value is an empty string. For IP address format
reference, see the IP addressing.
<server_port> Number MQTT server port. The range goes from 1 to 65535. The default value is 1883 for non-
TLS MQTT, 8883 for TLS MQTT.
<username> String User name for the MQTT login procedure. The default value is an empty string:
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B - The maximum length
is 512 characters.
SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4 - The maximum
length is 30 characters.
<password> String Password for the MQTT login procedure. The default value is an empty string:
SARA-R410M-63B / SARA-R410M-73B / SARA-R410M-83B - The maximum length
is 512 characters.
SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4 - The maximum
length is 30 characters.
<timeout> Number Inactivity timeout expressed in seconds. According to the MQTT specification, an
MQTT server must disconnect a client if it receives nothing from the client within
1.5x the inactivity timeout. An inactivity timeout value of 0 indicates no timeout.
The default value is 0. The maximum value is 65535 (corresponding to 18 hours, 12
minutes and 15 seconds).
<will_QoS> Number MQTT last 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 last will message will be retained across disconnects:
0 (default value): the last will message will not be retained by the MQTT broker
1: the last will message will be retained by the MQTT broker
<will_topic> String Last will topic name. The default value is an empty string.
SARA-R4 / SARA-N4 - The maximum length is 256 characters.
<will_message> String Last will message: ASCII or hexadecimal data.
<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>.
<MQTT_secure> Number Enables / disables the secure option of MQTT service:
0 (default value): no TLS encryption
1: enable the MQTT TLS encryption
<USECMNG_profile> Number USECMNG profile (number). Defines the USECMNG profile which specifies the SSL/
TLS properties to be used for the SSL/TLS connection. The range goes from 0 to 4.
If no profile is set a default USECMNG profile is used (see +USECMNG AT command
description).
<clean_session> Number Clean session value. Allowed values:
0: indicates that the client subscription and delivered messages received by the
client should be remembered across disconnects by both the MQTT client and the
MQTT server
1: (default value) indicates that disconnects clean all session state information
<param1> Number /
String
Type and supported content depend on the related <op_code> parameter (details are
given above). If <param1> is not specified the value of the corresponding parameter
<op_code> is reset to the default value.
<param2> Number /
String
Type and supported content depend on the related <op_code> parameter (details are
given above). If <param2> is not specified the value of the corresponding parameter
<op_code> is reset to the default value.