MQTT and TCP/IP Connection Configuration Guide-V2.0
Last revision 2025/12/30
This article provides a detailed guide on configuring MQTT and TCP/IP connections using the SIM7600G(-H) module, including hardware and software preparation, and step-by-step instructions for using AT commands to establish connections, perfect for IoT enthusiasts and developers.
Hardware Preparation
- TEL0124 SIM7600G(-H) 4G(LTE) Shield x 1
- FIT0265 Micro USB Cable x 1
- DFR0216 DFRduino UNO R3 x 1
- Windows 11 PC x1
- SIM mobile card x1
- 7.4V external battery
Software Preparation
- Download and install the driver: Click to download driver
MQTT Connection
This experiment involves using AT commands to send predefined messages from SIM7600G(-H) to the target server.
Operating Steps:
Access Easy IoT, if you don't have an account, you can register first.

After successful login, open the workspace and obtain the account (user) and (password), add a new device (Topic), and record the three important parameters mentioned above

Open SSCOM assistant, send AT+CMQTTSTART (to start the MQTT service) to start the module's MQTT service

Send AT+CMQTTACCQ=0, "EASYIOT" (Set the connection mode as TCP and the username as EASIOT). Note: (0: TCP, 1: SSL, username can be customized). Set the connection mode as TCP and the username as EASYIOT

Send AT+CMQTTCONNECT=0, "tcp://iot.dfrobot.com:1883", 120, 1, "user", "password" (TCP, set the server address as Easy IoT, heartbeat time is 120 seconds [maximum 64800], enter the account (user) and password (password) obtained from the Easy IoT platform in the user and password fields respectively. Clear user information when the device is offline, user, password)

Send AT+CMQTTSUB=0, 9, 1 (Parameter 1 is the client parameter, parameter 2 is the message publishing count setting, parameter 3 is the publishing timeout interval in seconds). When the ">" symbol appears, send the topic obtained from the Easy IoT platform

Send AT+CMQTTTOPIC=0, 9 (Set the publishing topic, the first parameter is the client numeric parameter 0, 1, the second parameter is the length of the topic data). When the ">" symbol appears, send the topic obtained from the Easy IoT platform

Send AT+CMQTTPAYLOAD=0, 12 (Set the message content, similar to the parameters of AT+CMQTTTOPIC, directly send the characters afterwards, the length should correspond). When the ">" symbol appears, send the message content (helloDFROBOT)

Send AT+CMQTTPUB=0, 1, 60 (Publish the message, parameter 1 is the client parameter, parameter 2 is the message publishing count setting, parameter 3 is the publishing timeout interval in seconds)

Access the Easy IoT workspace and view the detailed information of the created topic, confirming the receipt of the message (helloDFROBOT) sent from the module.

Note: Press Enter/Return after inputting the topic and message.
TCP/IP Connection
- To establish a TCP/IP connection with the module, find a public TCP server. Open the public TCP server and note down its IP address and port number.
- Open SSCOM and send the AT+NETOPEN command to open the network.
- Send AT+CIPOPEN=0, "TCP", "IP address", port number. Upon receiving the "OK" response, the module is successfully connected to the server.
- Send AT+CIPSEND=0, 5 (send five characters). When the ">" prompt appears, send "HELLO".
- The public TCP server receives the data message "HELLO" from the SIM7600G(-H) module, confirming a successful TCP connection.
Was this article helpful?
