MQTT client not able to send CONNECT packet to server using Airtel M2M sims but works with Normal sims


I am trying to connect to an MQTT server using an Airtel M2M sim and a normal SIM.

It worked with normal SIM but didnt with the M2M sim. I have attached the response from LTE using both the sims for the same command (AT+QMTCONN=<client_idx>,,,).

Normal SIM’s output:
I (17783) UART: AT Command sent : AT+QMTCONN=4,“ClientID”,“Username”,“Pwd”

I (19513) UART: Response from LTE -

+QMTCONN: 4,0,0

M2M SIM’s Output:
I (17843) UART: AT Command sent : AT+QMTCONN=4,“ClientId”,“UserName”,“Pwd”

I (19043) UART: Response from LTE -



When I changed the client_idx to 3 with M2M sim, I got +QMTSTAT: 4,3 with error code being 3 (Not able to send CONNECT packet)

Please guide me with this. Am I missing anything with M2M sim?

Hi @Hari
I think the problem is probably in the APN, can you check to make sure the APN is entered correctly? Also you can ping the public IP address before connecting to make sure the module can be networked properly.

Actually the problem was with the network provider. After enabling MQTT for my M2M sims from their side, I was able to connect to cloud and establish communication with the cloud