Unable Connect MQTT with Sara R410 Module

Hi, whatever I do, I failed to connect MQTT with this module supported by Sodaq, due my connection requirements I am currently using a Hologram sim and connect to O2 Cat-M1 network without any problems.

Yet, any attempts to connect public, unencrypted MQTT brokers fail, i.e Pub/Sub scheme is not effective. An example as follows:

17:19:09.228 -> AT //Check serial connection

17:19:09.228 -> OK
17:19:14.663 -> AT+CFUN=1 //full functionaliy of the device

17:19:14.696 -> OK
17:19:23.261 -> AT+CPIN? //check if the SIM is ready

17:19:23.261 -> +CPIN: READY
17:19:23.261 -> 
17:19:23.261 -> OK
17:19:29.126 -> AT+CGDCONT=1,"IP","hologram" //setting APN

17:19:29.126 -> OK
17:19:34.499 -> AT+URAT=7 // Chopsing Cat M1 radio, NB-IoT does not supported by the network

17:19:34.499 -> OK
17:19:41.358 -> AT+COPS=? // Check networks

17:20:13.404 -> +COPS: (2,"o2 - de","o2 - de","26203",8),,(0,1,2,3,4),(0,1,2) // The only Cat-M1 network is O2 here
17:20:13.404 -> 
17:20:13.404 -> OK
17:21:38.762 -> AT+COPS=1,2,"26203" //Connect to the netowrk

17:21:38.762 -> OK
17:21:48.727 -> at+CEREG? //check if connected

17:21:48.727 -> +CEREG: 0,5
17:21:48.727 -> 
17:21:48.727 -> OK
17:22:44.594 -> AT+CGDCONT? //Check Ip to be sure that We are on the network

17:22:44.594 -> +CGDCONT: 1,"IP","hologram","10.170.117.96",0,0,0,0
17:22:44.594 -> +CGDCONT: 3,"IP","hologram","0.0.0.0",0,0,0,0
17:22:44.594 -> 
17:22:44.594 -> OK
17:22:49.143 -> AT+CGATT?

17:22:49.143 -> +CGATT: 1
17:22:49.143 -> 
17:22:49.143 -> OK
17:22:57.911 -> AT+UMQTT=2,"broker.mqttdashboard.com" // set broker details


17:22:57.911 -> +UMQTT: 2,1

17:22:57.911 -> 
17:22:57.911 -> OK
17:23:07.678 -> AT+UMQTTC=1 // attempt conenction


17:24:27.651 -> +UMQTTC: 1,0 // According to application notes of SARA this is a successfull connection, but for AT commands document it says unsuccessfull

17:24:27.651 -> 
17:24:27.651 -> OK
17:24:55.828 -> AT+UMQTTC=4,0,"user/ublox" // subscribe to the topic first, so publish will not be discarded


17:24:55.828 -> +UMQTTC: 4,0

17:24:55.828 -> 
17:24:55.828 -> OK
17:25:08.411 -> AT+UMQTTC=2,0,0,"user/ublox","Hi! This is an MQTT message." // publishing to the previous channel


17:25:08.444 -> +UMQTTC: 2,0

17:25:08.444 -> 
17:25:08.444 -> OK
17:26:14.990 -> AT+UMQTTC=6


17:26:14.990 -> +UMQTTC: 6,1 // No messages are shown although we have successfully(?) published

17:26:14.990 -> 
17:26:14.990 -> OK

Any help is appreciated, thanks in advance.

Can you make sure that both eDRX and PSM are disabled as both of these will interfere with the delivery of MQTT packets. To disable these modes use the following commands:

AT+CPSMS=0
AT+CEDRXS=0

Also other things to keep in mind. Do not use the AT+UMQTTC=8 the command. The keep alive pings are sent automatically. Not only does the ‘8’ command fail to send a keep alive ping, it also seems to mess up the automatic pings. You should set the automatic keep alive period using:

AT+UMQTT=10,<Seconds>