Page 1 of 1

MQTT Error Code: AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG

Posted: Thu Nov 23, 2023 7:03 am
by yukselenis
Hi all,

Sometimes we do get the error code "AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG" even we are not trying to send (publish) anything to the broker.

This error occurs rarely while we are waiting a command from the MQTT broker even we do not try to send any data. We receive commands with the help of a mobile application via the broker. While trying to send data from the mobile app, sometimes we receive this error. After we get this error message, system gets stuck and we can no longer receive any data from the broker.

After triggering the system with another publish data, it gets to normal working principle. But we cannot discover the real reason.

Any help will be muchly appreciated.

Re: MQTT Error Code: AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG

Posted: Tue Dec 05, 2023 12:50 pm
by esp-at
Hello yukselenis,
From a code perspective, you'll only receive this MQTT error code if you send the AT+MQTTPUBRAW command with a data_len parameter less than or equal to 0.

If the issue persists, please provide logs from the AT logg port and AT command port. Thank you.

~