If connection status is other than init state or connected, disconnect
using #MQDISC before reconnecting using #MQCONN.
For LE910Cx Linux models, URC is generated and flushed if the client
disconnected abnormally from the broker with following format:
#MQCONN: <instance_number>,DISCONNECT
AT#MQCONN?
Read command reports the configuration of active MQTT connections in the
format:
#MQCONN=<instanceNumber>,<state>
The following tables shows the <state> values and meanings:
LE910Cx Linux :
Client status
Normal operations values:
0: client is in init state
1: client is connecting to server
2: client is connected
Failure events values:
-1: connection reset by peer
-2: PINGREQ timeout failed
-3: CONNECT packet was not delivered
-4: CONNACK packet was not received
-5: Network error, such as socket timeout
-6: Fatal error in internal library. Deinit client and open it again with AT#MQEN
LE910Cx ThreadX :
Normal / Failure events values:
0: client is initialized but not connected
1: client performed MQTT authentication with broker
2: connection closed or reset by the server
3: the answer to the ping request packet was not received
4: the CONNACK packet was not received
5: the CONNECT packet was not delivered