EC21 AUX QMTT error when publishing

Hi, I’m able to connect correctly to my MQTT test server (test.mosquitto.org), but when I try to publish (AT+QMTPUBEX), I receive an ERROR.

My server is working ok as I used MQTTX software to test.

What whould I change to correct this, or what else can I test? I can never receive the “>”
to send the payload.

Here’s the code:

(here I check I have signal and internet in my modem)

Serial2.flush();

Serial2.println(“AT+QMTCFG="recv/mode",0,0,1”);
Serial.println(“AT+QMTCFG="recv/mode",0,0,1”);
response = Serial2.readString();
Serial.print(response);
Serial2.flush();

//readSerial();
delay(100);
Serial2.println(“AT+QMTOPEN=0,"test.mosquitto.org",1883”);
Serial.println(“AT+QMTOPEN=0,"test.mosquitto.org",1883”);

z=0;
while (z < 1){
response = Serial2.readString();
Serial2.flush();
isWaiting = response.indexOf(“+QMTOPEN: 0,0”);
if (isWaiting > 0){
z = 1;
} else {
Serial.print(“esperando respuesta MQTOPEN\n”);
delay(1000);
}
}

Serial2.println(“AT+QMTCONN=0,"nacho1"”);
Serial.println(“AT+QMTCONN=0,"nacho1"”);
z=0;
while (z < 1){
response = Serial2.readString();
Serial2.flush();
//isWaiting = response.indexOf(“+QMTCONN:”);
isWaiting = response.indexOf(“OK”);
if (isWaiting > 0){
Serial.print(“CONN RESULT” + response);
z = 1;
} else {
Serial.print(“esperando respuesta MQTCONN\n”);
delay(1000);
}
}

delay(2000);
//AT+QMTPUB=<client_idx>,,=0,,“”
Serial2.println(“AT+QMTPUBEX=0,0,0,0,"nacho/chat",10”);
Serial.println(“AT+QMTPUBEX=0,0,0,0,"nacho/chat",10”);
response = Serial2.readString();
Serial.print(response);
Serial2.flush();

delay(100);

}

Hi @ignarl
I thought you could try connecting to Amazon Cloud. According to the provided AT log, it’s not connected.