So while I may have been overrunning the serial buffer previously, I think something else is going on. I have implemented the following function that is run every iteration of the main loop.
void cloudKeepAlive(){
unsigned long processtimer = millis();
while(!Particle.connected() && (millis()-processtimer<10000)){
Particle.process();
}
if(millis()-processtimer>5000){
Log.info("Cloud Keep Alive Ran for: %u", millis()-processtimer);
}
}
If it was a blocking issue then I was hoping the above would solve the issue. The problem is that the device is breathing cyan, so thinks it's connected, but I cannot communicate with the device from the particle console, ie. vitals, signal or particle functions. So it seems like the device thinks that it is connected when it is not. I did read in the api that if particle.process is not being called enough that the device can think its connected when infact it is not.
- Does anyone have any ideas how I can trouble shoot this a bit further?
- Should I just force Particle process to run for x amount of time every loop?
- If so, what would be an appropriate amount of time to call Particle process for to see if this resolves my issue?
- Could this be a bad signal issue?
EDIT: One other thing I have noticed is that when I try to push a new firmware to device using workbench cloud flash, I still get the started event but it will fail to update. Does the started event mean that the cloud has successfully connected to the particle?