cancel
Showing results for 
Search instead for 
Did you mean: 

Lwip MQTT can't publish a message payload more than 232 Characters

dadanugm07
Associate II

Hi all, Iam trying to send a long payload message in a single buffer (const char*) to Mqtt server. Iam using Lwip Mqtt from http://www.nongnu.org/lwip/2_0_x/group__mqtt.html

It worked with payload that fewer than 232 characters. As we know the limit for mqtt payload lenght is 65536.

I tried to compare the result by publish random data (2898 characters) using mosquitto (installed in my pc), it is successfully done.

Any idea how to solve this problem?

Regards

2 REPLIES 2
dadanugm07
Associate II

has anyone faced the same problem?

or maybe it's a new bug?

i tried it on Nucleo F7 and discovery F4, but still get the same result.

wj.anggara
Associate II

Hi, open the header file with name mqtt_opts.h and edit the following sections i.e. 1024 Byte

#define MQTT_OUTPUT_RINGBUF_SIZE 1024