Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Listen Mode unable to save credentials #1550
Listen mode should allow you to set wifi credentials.
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.
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.
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
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.