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

Listen Mode unable to save credentials #1550

Closed
jenschr opened this Issue Jun 17, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@jenschr
Contributor

jenschr commented Jun 17, 2018

Bug Report

Expected Behavior

Listen mode should allow you to set wifi credentials.

Observed Behavior

Upon saving credentials via CLI, we receive serial errors and messages telling that wifi credentials could not be saved. When setting up wifi from App (both Android/iOS), the app just hangs at various stages in the setup process.

Steps to Reproduce

Tested and reproduced on 0.70 and 0.80r4. The problem is 100% repeatable, but only manifests itself when using the firmware for our commercial product. We cannot ship the product to customers with this bug present as they will never be able to setup wifi on their device.

Test App

We can not post the code publicly, but a verified Particle representative can contact https://community.particle.io/u/jenschr/ to get a copy of the source. We have tried to compile smaller versions of the codebase, but have not been able to reproduce the bug using this.

References

Ref this forum thread: https://community.particle.io/t/listen-mode-possible-bug/42423/5 See video in this post for a visual description of the bug.

Also some error messages listed in this thread: https://community.particle.io/t/p1-setup-fails-on-app-cli-interactive-listen-mode/42308/4

@fitchn

This comment has been minimized.

Show comment
Hide comment
@fitchn

fitchn Jul 6, 2018

I've recently seen similar behavior in an application that was running low on RAM. Listening mode in 0.7.0 seems to use ~20kB of dynamically allocated RAM (!) and we observed no saving of wifi credentials (followed by safe mode entry) when attempting to load credentials via our own app/discovery. This ended up being extremely difficult to troubleshoot but you can query your current (minimum) free RAM via System.freeMemory(). I had ~25kB available (before entering listening mode) before we started to see problems. I was able to reduce the RAM usage of our code significantly and the problem has gone away.

fitchn commented Jul 6, 2018

I've recently seen similar behavior in an application that was running low on RAM. Listening mode in 0.7.0 seems to use ~20kB of dynamically allocated RAM (!) and we observed no saving of wifi credentials (followed by safe mode entry) when attempting to load credentials via our own app/discovery. This ended up being extremely difficult to troubleshoot but you can query your current (minimum) free RAM via System.freeMemory(). I had ~25kB available (before entering listening mode) before we started to see problems. I was able to reduce the RAM usage of our code significantly and the problem has gone away.

@jenschr

This comment has been minimized.

Show comment
Hide comment
@jenschr

jenschr Jul 12, 2018

Contributor

@fitchn yeah. If you check the end of the community thread above, @bsatrom concluded that the problem happens at around 21496 bytes. He'll add this to the docs and then probably close this issue 👍

Contributor

jenschr commented Jul 12, 2018

@fitchn yeah. If you check the end of the community thread above, @bsatrom concluded that the problem happens at around 21496 bytes. He'll add this to the docs and then probably close this issue 👍

@bsatrom

This comment has been minimized.

Show comment
Hide comment
@bsatrom

bsatrom Jul 19, 2018

Member

Thanks @jenschr I am working on some content to add to the docs now, and will post here and close the issues once I have that.

Member

bsatrom commented Jul 19, 2018

Thanks @jenschr I am working on some content to add to the docs now, and will post here and close the issues once I have that.

@bsatrom

This comment has been minimized.

Show comment
Hide comment
@bsatrom

bsatrom Aug 15, 2018

Member

Docs have been updated, thanks again @jenschr!

Member

bsatrom commented Aug 15, 2018

Docs have been updated, thanks again @jenschr!

@bsatrom bsatrom closed this Aug 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment