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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- sellensr
- Posts: 47
- Joined: Tue Nov 06, 2012 9:41 pm
8266 resets on longer MQTT payloads (>~100 char)
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
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: 8266 resets on longer MQTT payloads (>~100 char)
our code has a bug it doesnt support > 127 byte payloads (at this moment) you could try using pubsubclient as a client
- sellensr
- Posts: 47
- Joined: Tue Nov 06, 2012 9:41 pm
Re: 8266 resets on longer MQTT payloads (>~100 char)
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.
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: 8266 resets on longer MQTT payloads (>~100 char)
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
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
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.