TCP connection SIM900

Hello, Im trying to connect my arduino with the cloudmqtt, using shield 3G/SIM900 and mosquito, I follow the steps on the video guide but the messages dont arrive to the cloud.

How can I make the error check for this connection, what does the AT+CIPSTART/CSTT commands returns? how can I check does errors?

Thanks for the help

The SIM900 is 2G module and doesnt support 3G.

Have you set the correct username , password , MQTT host and port number?

Thanks Ravi, that was the problem, we were using a 3G SIM in a network that doesn`t support 2G anymore.

Which shield that supports 3G do you recommend to make the connection between an arduino and cloudmqqt using mosquito.


You can use SIM5320 or SIM5360 shields. Or SIM5300E if you are in Europe.

Ravi I was able to establish the tcp connection, thanks you very mucho for your help.

I have two more questions about the SIM900, that maybe you can help me with.

  1. Does it come with GPS?

  2. About the AT commands, is there a way to read the responses with the arduino so as to take actions which each response?

Thanks again

SIM900 doesnt have GPS. SIM908 and SIM808 have.

Yes you can read responses and collect in buffer and process them, Collect UART data in a buffer byte by byte and process them.

Thanks for the answer Ravi,

I have been trying to process the AT responses so as to make the TCP connect automatically, but the arduino skecht keeps getting blocked. I have tried using the serial. read, serial.find, serial.findUntil, setTimeOut and also the function millis to create my own countdown, but I get no results. If anyone could help me I would really apreciate it.

Manually my sketch works perfectly, it creates a TCP connection and send HTTP POST & GET, but I`m trying to take it to the next level.

Thanks for the help


I have read your code. Do you tell me that it works for https or only for http url?



At the moment I only used http url, I haven`t tried using https.

For http the get & post work perfectly, but y have a switch(case) on the arduino loop sketch that allows me to send each AT command manually.
I want to establish the TCP connection automatically when my program starts, without me sending each command when I it should be sent.
The problem I`m having is when trying to read the AT responses(“OK”; “SHUT OK”; “CONNECT OK”) and then act in consequence, send the next command if the answer is OK or send the same command again if other answer is given.
I tried different ways as mentioned in my early post, but the result is always the same, the program stays hanged. like if nothing is happening.

Hope I explained myself,