BG95-m3 ESP32 AT+QMTPUBEX ERROR

Hello I am trying to send a MQTT message using AT+QMTPUBEX fuction trough an ESP32.

Everythig connects fine and works perfectly via QCOM_v16 but when run in arduino i get ERROR.

AT+CPIN?

+CPIN: READY

OK
AT+CGDCONT=1,“IP”,“Internet.comcel.com.co

OK
AT+CEREG=2

OK
AT+COPS=0,2,“732101”

OK
AT+CEREG?

+CEREG: 2,4

OK
AT+QIACT=1

ERROR
AT+QIACT?

+QIACT: 1,1,1,“10.128.79.251”

OK
Entro a LTE Push
AT+QMTOPEN=1,“myserver”,1883

OK

+QMTOPEN: 1,0
AT+QMTCONN=1,“Analyzer”,“juan”,“”

OK
AT+QMTPUBEX=1,1,1,0,“v1/devices/me/telemetry”,“{“key5”:“juan”}”

ERROR
AT+QMTCLOSE=1

OK

this is my Arduino code:

  String comando = "AT+QMTOPEN=1,\"" + String(broker) + "\"," + String(port);
  Serial2.println(comando);
  while (Serial2.available() == 0) {}//esperar respuesta
  Serial.print(Serial2.readString());
  delay(1000);

  comando = "AT+QMTCONN=1,\"Analyzer\",\"" + String(token) + "\",\"\"";
  Serial2.println(comando);
  while (Serial2.available() == 0) {}//esperar respuesta
  Serial.print(Serial2.readString());
  delay(1000);

  comando = "AT+QMTPUBEX=1,1,1,0,\"v1/devices/me/telemetry\",\"{\"key5\":\"juan\"}\"";
  Serial2.println(comando);
  while (Serial2.available() == 0) {}//esperar respuesta
  Serial.print(Serial2.readString());

  Serial2.println("AT+QMTCLOSE=1");
  while (Serial2.available() == 0) {}//esperar respuesta
  Serial.print(Serial2.readString());

Hi @d3str0y3rport
QMTPUBEX command can be publish HEX data only.

Hi @Linkin-Q

Where it is written in AT command document that QMTPUBEX command only takes hex data ?
I am referring LTE_Standard_MQTT_Application_Note_V1.2

Is AT+QMTPUB command available for EC25 module ?

Hi @gaurav.patni @d3str0y3rport
Sorry for the mistake for the QMTPUBEX command, this command publish messages via command mode not the hex only.
And for EC25 series module not support QMTPUB command.

Can you please reply on following related to QMTPUBEX command ?

  1. Which data type is supported ? hex , bin , string , ASCII etc can we send special / non printable characters ?
  2. Which data types are not supported ?

Hi @d3str0y3rport
you need to wait QMTCONNT finished, and it should be report +QMTCONN: <client_idx>, urc when connected.
image

Thank you. this was the problem.