Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

8266 resets on longer MQTT payloads (>~100 char)
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

8266 resets on longer MQTT payloads (>~100 char)

by sellensr on Sun Feb 07, 2016 1:39 pm

I started from the mqtt_esp8266 sketch and tried sending longer string payloads to the photocell feed. It works well up to string lengths of about 100 chars, then starts to generate wdt resets on the 8266 Huzzah. This behaviour is similar to crashes with long serial writes locally that fill the buffer and wait without yield()ing to the 8266 for background tasks. Has anybody else run into this? found a solution? Thanks... Rick

sellensr
 
Posts: 47
Joined: Tue Nov 06, 2012 9:41 pm

Re: 8266 resets on longer MQTT payloads (>~100 char)

by adafruit2 on Mon Feb 08, 2016 6:43 pm

our code has a bug it doesnt support > 127 byte payloads (at this moment) you could try using pubsubclient as a client

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: 8266 resets on longer MQTT payloads (>~100 char)

by sellensr on Mon Feb 08, 2016 11:33 pm

Thanks adafruit2. In Adafruit_MQTT.h I found #define MAXBUFFERSIZE (125) and changing it up to something bigger allowed the code to run at my end without crashing, but none of the longer payloads showed up on the server. The publish call returned OK, so it looked like they had been delivered, but there was nothing there when I looked, which counts as a bug somewhere along the line ;-). I wasn't immediately successful with pubsubclient. I probably need to spend some more time sorting out the authentication.

sellensr
 
Posts: 47
Joined: Tue Nov 06, 2012 9:41 pm

Re: 8266 resets on longer MQTT payloads (>~100 char)

by adafruit2 on Tue Feb 09, 2016 6:36 pm

the bug is inthe packet construction, not the #define
right now we do have code for *incoming* large packets, but not outgoing ones
no ETA on the fix, we're doing a lot of work on the library

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.