M66 MQTT Connection Issue when Roaming

Hi, everyone!

I have successfully made an MQTT connection to my server and published some data at the dedicated topic with our country’s local SIMCard.

But unfortunately, I could not do the same with ThingsMobile SIMCard. I checked that the SIM card is working fine on any telephone and connect to the internet.

Could you please tell What am I doing wrong? I am a beginner at these kinds of modules. If possible, can you share some AT code examples for making MQTT connections and publish messages over roaming SIM Cards?

Hi Onur,

The issue can be related to APN setting. Could you please check the APN name, user and password with the service provider for ThingsMobile SIMCard?

Could you please provide us AT logs to analyze the issue?

Dear @mcihangir, as I told in my first post, I am a beginner about these modules. I do not know how to get AT logs.

The APN of ThingsMobile Network Operator is TM and I tried to set some settings as below:
AT+CGDCONT=1,“IP”,“TM”

Normally, when I am using Turkcell (local network operator) SIM Card, even the APN is set as above, it connects GPRS itself and I am able to publish MQTT messages with the code below. I do not do any other extra configurations over UART.

AT+QMTCFG=“WILL”,0,0,0,0,/M66,0
AT+QMTCFG=“TIMEOUT”,0,60,10,0
AT+QMTCFG=“SESSION”,0,0
AT+QMTCFG=“KEEPALIVE”,0,120
AT+QMTCFG=“SSL”,0,0
AT+QMTCFG=“VERSION”,0,1
AT+QMTOPEN=0,“xxx.xxx.xxx.xxx”,30030
AT+QMTCONN=0,“4c65f81d-9d37-4589-a381-8a7458227e42”,“xxxxx”,“xxxxxxxxx”
AT+QMTPUB=0,0,0,0,"/M66",6

If possible, please share a sample code with me.