why SIM7600 MQTT return +CMQTTCONNECT: 0,6 ?

Hi all,
I used the SIM7600CE and Arduino mega to send, receive message to MQTT.
My process to start MQTT in setup as

  1. AT+CMQTTSTART
  2. AT+CMQTTACCQ=0,"SIM7600_client"
  3. AT+CMQTTCONNECT=0,"tcp://tailor.cloudmqtt.com:11831",90,1,"xxxxxx","yyyyyyyyy""
  4. AT+CMQTTSUBTOPIC
  5. subscribe name
  6. AT+CMQTTSUB

After that on loop, I send message to broker as process like this

  1. AT+CMQTTTOPIC
  2. Publish name
  3. AT+CMQTTPAYLOAD
  4. message
  5. AT+CMQTTPUB

my problem is just broker can receive the first time.
if send more, SIM7600 return error 14, mean client busy, and after that return error 11, mean disconnect

Any people can help explain this problem ??

Thanks.
VB

Post the responses you get from the SIM7600 to the above commands!

Hi pylon,

The SIM7600 return after send the AT+CMQTTCONNECT is

OK

+CMQTTCONNECT=0,6

I can't find any document talk about this error code.

Thanks.
VB

I can't find any document talk about this error code.

According to the manual:

6 – message receive fail.

Post your complete code and the complete output you get!

Did you try to disconnect (AT+CMQTTDISC) before you re-connect?

Hi pylon,

yes, I have disconnect before re-connect, and just after turn on power or reset (AT+CRESET), the module also return same.

this is function for start

void startMQTTServer(){
Serial2.println("Start MQTT server to broker >>");
Serial2.println("send AT+ATE0 >>");
sim7600.sendATcommand("ATE0", "OK", 1000);
printResponceSIM();
Serial2.println("send AT+CMQTTSTART >>");
strcpy_P(str_buffer, (char *)pgm_read_word(&(cmd_table[11]))); //start network
sim7600.sendATcommand(str_buffer, "+CMQTTSTART: 0", 2000);
printResponceSIM();
// sim7600.sendATcommand("AT+CMQTTACCQ=0,"SIM7600_client"", "OK", 2000);
Serial2.println("send AT+CMQTTACCQ >>");
strcpy_P(str_buffer, (char *)pgm_read_word(&(cmd_table[21]))); //issue name of client
sim7600.sendATcommand(str_buffer, "OK", 2000);
printResponceSIM();
Serial2.println("send AT+CMQTTWILLTOPIC >>");
sim7600.sendATcommand("AT+CMQTTWILLTOPIC=0,10", ">", 2000);
printResponceSIM();
Serial2.println("send will topic >>");
sim7600.sendATcommand("will topic", "OK", 2000);
printResponceSIM();

Serial2.println("send AT+CMQTTWILLMSG >>");
sim7600.sendATcommand("AT+CMQTTWILLMSG=0,56,1", ">", 2000);
printResponceSIM();
Serial2.println("send will topic message >>");
sim7600.sendATcommand("you’d better set will topic before setting will message.", "OK", 2000);
printResponceSIM();

// sim7600.sendATcommand(AT+CMQTTCONNECT=0,"tcp://tailor.cloudmqtt.com:11831",600,1,"xxxxxxxx","xxxxxxxxxxxx"", "OK", 2000);
Serial2.println("send AT+CMQTTCONNECT >>");
strcpy_P(str_buffer, (char *)pgm_read_word(&(cmd_table[20]))); //connect MQTT broker
result = sim7600.sendATcommand(str_buffer, "+CMQTTCONNECT: 0,0", 180000);
if(result){
connectFlag=true; //connect server OK
Serial2.println("Connect OK !");
}else Serial2.println("Connect NG !");

printResponceSIM();

}

and this is return from SIM7600

Start MQTT server to broker >>
send AT+ATE0 >>

OK
send AT+CMQTTSTART >>

OK

+CMQTTSTART: 0
send AT+CMQTTACCQ >>

OK
send AT+CMQTTWILLTOPIC >>

send will topic >>

OK
send AT+CMQTTWILLMSG >>

send will topic message >>

OK
send AT+CMQTTCONNECT >>
Connect NG !

OK

+CMQTTCONNECT: 0,6

Start send SUBTOPIC to broker >>
send AT+CMQTTSUBTOPIC >>

+CMQTTSUBTOPIC: 0,11

ERROR

This is not your complete code and you also forgot the code tags!

Can you please share the complete code because I need it

Hi, vietbac
did you resolve this?
I've been getting same issue,, so could you share how to fix this?

Sorry for bumping an old thread here, but I believe I am having this same issue.

I have detailed my problem here: SIMCOM 7600E ESP32 MQTT client is busy issue - Networking, Protocols, and Devices - Arduino Forum

Have spent weeks trying to fix this, even contacted SIMCOM support and attempted to contact one of their engineers... No response.

Did you manage to solve this issue? If so please share you fix with us.

Reopened at the request of jear17

Hello dear moderador. Anyone did you resolve this issue? I'm not have permission to make a post..A couple of days ago, I can resolve all issues with SIM7600 Module, updating the firmware, if you give to me permission to make a post it will be excellent!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.