Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If internet becomes unavailable; ESP goes in wdt reset #11

Closed
devansh17 opened this issue Jul 9, 2016 · 2 comments
Closed

If internet becomes unavailable; ESP goes in wdt reset #11

devansh17 opened this issue Jul 9, 2016 · 2 comments

Comments

@devansh17
Copy link

Hello,
I checked out the code and works fine with AWS. However, I came across one issue.
After MQTT is subscribed and running, and then at any point after this if the ESP does not get access to internet (Wifi router is on), ESP goes in wdt reset mode. Maybe someone else also encountered this issue and has a fix for it?

@thehellmaker
Copy link

I have the same issue. What I figured out is
client = new MQTT::Client<IPStack, Countdown, maxMQTTpackageSize, maxMQTTMessageHandlers>(ipstack);

Reduces the memory from 30KB to 10KB and it crashed because of out of memory. Still trying to figure out where the memory is getting consumed.

@odelot
Copy link
Owner

odelot commented Apr 15, 2018

@devansh17 it was a bug from arduino/esp8266 sdk esp8266/Arduino#3537

It is already fixed in the version 2.4.1.

@thehellmaker I've uploaded working examples with a not dynamic allocated client. You can also use another mqtt client, as pubsubclient. Another way to get memory is reduce the circular buffer that make the interface between the mqtt client and the websocket layer. Remember that this can limit the size of messages sent and received.

AWSWebSocketClient awsWSclient(1000); //it is using 1000 bytes

@odelot odelot closed this as completed Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants