-->
Page 2 of 2

Re: MQTT does not work if payload is over 107 characters

PostPosted: Sun Jun 16, 2019 3:30 am
by schufti
in general: if you define it before the include,
Code: Select all// MQTT_MAX_PACKET_SIZE : Maximum packet size
#ifndef MQTT_MAX_PACKET_SIZE
#define MQTT_MAX_PACKET_SIZE 328
#endif
in the.h should prevent it being redefined.
If it doesn't work in arduino, it is a "feature" of the ide (reordering includes or else)

Re: MQTT does not work if payload is over 107 characters

PostPosted: Sun Jun 16, 2019 1:58 pm
by torntrousers
JohnDoe23232 wrote:...You would have to first un-define it:

Code: Select all#undef  MQTT_MAX_PACKET_SIZE // un-define max packet size
#define MQTT_MAX_PACKET_SIZE 500  // fix for MQTT client dropping messages over 128B


Cheers mate. Didn't know you could fix this like that.