I am occasionally (1-2 times per day) experiencing a dropped connection. After further investigation through serial monitor and by casually observing the RBG light on the Boron, I FINALLY caught at least one and likely two events that resulted in the dropped/reconnection. I’m quite certain it is something within my specific code on the Boron rather than an issue with the device at all.
When this occurs, the boron RBG does an SOS of 10 blinks between two SOS patterns which per https://docs.particle.io/tutorials/device-os/led/photon/#red-flash-sos means assertion failure. It only happens 4-5 times a day when I’m publishing data every minute (more frequent then needed but trying to get to the bottom of this issue). So far, I can’t figure out what’s causing it. As soon as this happens my serial logger disconnects from the PC and it is “mid stream” of spitting out data to the serial logger. I’m afraid I am not getting the full picture or exactly what line in the code is causing this. I’m afraid the actual issue is occurring several steps forward in the code. Even if I put a serial.println() within every line of code, I am afraid serial monitor still wouldn’t provide details.
Can someone provide better clarification on what Assertion failure really means or what are the leading causes of it. Secondly, any guidance on ways to pinpoint what piece of code is causing it? For now, my strategy is to add serial.println() on each line of code and a short delay(100) to try and give it some time to print each step to serial and then try to pinpoint the exact line of code.
For reference, I’m on LTS 2.0 Particle Boron. I flashed Tinker and it stayed connected for the entire day with no issue so for now I’m thinking it’s something I’m trying to do in my specific code.