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

ESP keeps resetting after the first packet should be sent #480

Closed
chris-iot opened this issue Jan 29, 2018 · 4 comments
Closed

ESP keeps resetting after the first packet should be sent #480

chris-iot opened this issue Jan 29, 2018 · 4 comments

Comments

@chris-iot
Copy link

Hi,
first of all: Thanks for this amazing framework!

I have an issue that my ESP8266 keeps resetting at the end of my setup handler. It seems like it resets shortly after the code of my setup handler is done or if it enters the loop code for the first time.

My guess is that there are too many packets to be sent in the buffer and this causes an out of memory error, but this is just a guess...
Can anyone of the experts have a look on it?

Thanks.

Here are some more details:
console_out.txt
stacktrace_decoded.txt
code.zip

I'm using the following versions of libs:

If i did miss something, just leave a message here.
Thanks in advance!

@chris-iot
Copy link
Author

BTW: a fully function based implementation does work (only tested with 3 attached sensors, so it only publishes 3 subnodes, but it works). Code is available at https://github.com/chris-iot/esp8266_iot/commit/a957a433e17b44034d9c0844838c83308005b586 or https://github.com/chris-iot/esp8266_iot/releases/tag/Mainboard_0.1.1

Also the code from the zip file from above is now online. You can find it at https://github.com/chris-iot/esp8266_iot/commit/afca8885aebd7ea9d5497c60f80114163c15a415
Perhaps it is easier to read through the code online instead of needing to download it...

@timpur
Copy link
Contributor

timpur commented Jan 30, 2018

I belive this is your error. you need to only use the number of devices that have been initialized Use nextHomie not TEMP_MAX_DEVS. Make sure you check for this through out your code. :)

for(i=0; i<TEMP_MAX_DEVS; i++){
  homies[i]->homie_setup();
}

Other wise pointers will point to weird locations when you try to access them and cause crashes .....

Report back if this is not the issue??

@chris-iot
Copy link
Author

Hi timpur, thanks for the reply and the code review. Seems like i had big tomatoes on my eyes :-)
I will fix it in my code, test it soon (most likely tomorrow evening) and give you feedback here.

@chris-iot
Copy link
Author

Hi, the error mentioned in #480 (comment) was exactly the reason why it failed.
Thanks for pointing me the right direction. I close this one here.

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

2 participants