MQTT Error Code: AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG

yukselenis
Posts: 2
Joined: Mon Oct 09, 2023 8:38 am

MQTT Error Code: AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG

Postby yukselenis » Thu Nov 23, 2023 7:03 am

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.

esp-at
Posts: 200
Joined: Mon May 09, 2022 3:00 am

Re: MQTT Error Code: AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG

Postby esp-at » Tue Dec 05, 2023 12:50 pm

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.

~

Who is online

Users browsing this forum: No registered users and 64 guests