- Short range radio modules
- Positioning chips and modules
u-blox Products
- Product selector
- Previous generations
- Contact sales
Find products
- Product documentation
Documentation
AT Command | Description |
|---|---|
MQTT Connection Parameters | |
MQTT Connect to Broker | |
MQTT Keep Alive | |
MQTT Last Will and Testament | |
MQTT TLS Configuration | |
MQTT Disconnect | |
MQTT Publish String | |
MQTT Publish Binary | |
MQTT Subscribe | |
MQTT Read String | |
MQTT Read Binary |
AT Command | Description |
|---|---|
AT+UMQCP=<mqtt_id>,<hostname>,<port>[,<client_id>[,<username>[,<password>]]] | |
AT+UMQCP=<mqtt_id> | Get the MQTT connection parameters. |
Response | Description |
|---|---|
+UMQCP:<mqtt_id>,<hostname>,<port>,<client_id>,<username> | Successful read response |
Parameter | Type | Description |
|---|---|---|
hostname | string | Hostname or IP address of the broker Valid length: 0..128 |
port | integer | The port of the broker Valid values: 1..65535 |
client_id | string | Client ID. Can be left empty to let the broker decide Valid length: 0..128 |
username | string | Valid length: 0..128 |
password | string | Valid length: 0..128 |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
AT Command | Description |
|---|---|
AT+UMQC=<mqtt_id> | Connect to a broker using the MQTT config ID. |
Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
AT Command | Description |
|---|---|
AT+UMQKA=<mqtt_id>,<keep_alive> | |
AT+UMQKA=<mqtt_id> | Get keepalive timeout for MQTT config |
Response | Description |
|---|---|
+UMQKA:<mqtt_id>,<keep_alive> | Successful read response |
Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
keep_alive | integer | MQTT keepalive in seconds. If set to 0, no keepalive is used Valid values: 0..65535 Default value: 60 |
AT Command | Description |
|---|---|
AT+UMQLWT=<mqtt_id>,<topic>,<will_msg>[,<qos>[,<retain>]] | |
AT+UMQLWT=<mqtt_id> | Get last will and testament configuration for the client |
Response | Description |
|---|---|
+UMQLWT:<mqtt_id>,<topic>,<will_msg>,<qos>,<retain> | Successful read response |
Parameter | Type | Description |
|---|---|---|
will_msg | string | Valid length: 0..256 |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
qos | enumerator | Quality of Service (QoS) for the message or topic Valid values: 0: At most once 1: At least once 2: Exactly once Default value: 0 |
retain | enumerator | Retain flag for message Valid values: 0: Do not retain message on broker 1: Retain message on broker Default value: 0 |
AT Command | Description |
|---|---|
AT+UMQTLS=<mqtt_id>,<tls_version>[,<ca_name>[,<client_cert_name>,<client_key_name>]] | Setup MQTT TLS config. Certs do not have to be uploaded until connection. Notes: Can be stored using AT&W. |
AT+UMQTLS=<mqtt_id> | Get TLS config |
Response | Description |
|---|---|
+UMQTLS:<mqtt_id>,<tls_version>,<ca_name>,<client_cert_name>,<client_key_name> | Successful read response |
+UMQTLS:<mqtt_id>,<tls_version> | Successful read response with TLS off |
Parameter | Type | Description |
|---|---|---|
tls_version | enumerator | Minimum TLS version to use Valid values: 0: Disable TLS 1: TLS 1.2 or up |
ca_name | string | Name of the certificate authority (CA) certificate to use Valid length: 1..32 |
client_cert_name | string | Name of the client certificate to use Valid length: 1..32 |
client_key_name | string | Name of the private key for client certificate Valid length: 1..32 |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
AT Command | Description |
|---|---|
AT+UMQDC=<mqtt_id> | Disconnect the MQTT client from the broker. Note that the disconnection is not complete until the +UEMQDC URC arrives. |
Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
AT Command | Description |
|---|---|
AT+UMQPS=<mqtt_id>,<qos>,<retain>,<topic>,<message> | Publish an MQTT message in string format to the specified topic. |
Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
qos | enumerator | Quality of Service (QoS) for the message or topic Valid values: 0: At most once 1: At least once 2: Exactly once Default value: 0 |
retain | enumerator | Retain flag for message Valid values: 0: Do not retain message on broker 1: Retain message on broker Default value: 0 |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
message | string | MQTT message Valid length: 0..730 |
AT Command | Description |
|---|---|
AT+UMQPB=<mqtt_id>,<qos>,<retain>,<topic>{binary_data} | Publish an MQTT message in binary format to the specified topic. |
Parameter | Type | Description |
|---|---|---|
binary_data | binary | The MQTT message data. |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
qos | enumerator | Quality of Service (QoS) for the message or topic Valid values: 0: At most once 1: At least once 2: Exactly once Default value: 0 |
retain | enumerator | Retain flag for message Valid values: 0: Do not retain message on broker 1: Retain message on broker Default value: 0 |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
AT Command | Description |
|---|---|
AT+UMQS=<mqtt_id>,<subscribe_action>,<topic>[,<qos>] | Subscribe or unsubscribe to/from MQTT topic. |
Parameter | Type | Description |
|---|---|---|
subscribe_action | enumerator | Valid values: 0: Subscribe to topic 1: Unsubscribe from topic |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
qos | enumerator | Quality of Service (QoS) for the message or topic Valid values: 0: At most once 1: At least once 2: Exactly once Default value: 0 |
AT Command | Description |
|---|---|
AT+UMQRS=<mqtt_id> | Read available MQTT message in string format. |
Response | Description |
|---|---|
+UMQRS:<mqtt_id>,<topic>,<message_len>,<message> | Successful read response |
Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
message_len | integer | Length of the MQTT message |
message | string | MQTT message Valid length: 0..730 |
AT Command | Description |
|---|---|
AT+UMQRB=<mqtt_id> | Read available MQTT message in binary format. |
Response | Description |
|---|---|
+UMQRB:<mqtt_id>,<topic>{binary_data} | Successful read response |
Parameter | Type | Description |
|---|---|---|
binary_data | binary | The MQTT message data. |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
topic | string | Topic name or filter (wildcard allowed) Valid length: 0..256 |
Unsolicited Response Code | Description |
|---|---|
Event MQTT Connected | |
Event MQTT Disconnected | |
Event MQTT Data Available |
+UEMQC:<mqtt_id>Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
+UEMQDC:<mqtt_id>,<disconnect_reason>Parameter | Type | Description |
|---|---|---|
disconnect_reason | integer | Disconnection reason |
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
+UEMQDA:<mqtt_id>,<message_len>Parameter | Type | Description |
|---|---|---|
mqtt_id | integer | MQTT Config ID Valid values: 0 only |
message_len | integer | Length of the MQTT message |