So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By schufti
#82822 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)
User avatar
By torntrousers
#82831
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.