I have several questions:
1, since I use sleep and wake, why does the device come online again and again(see picture)?
2, from the screenshot, no wake events after sleep but “device came online” info.
3, no any event during 2 hours, from 10:55-12:55.
@anderson916, I believe you are trying to use this form of sleeping:
System.sleep(uint16_t wakeUpPin, uint16_t edgeTriggerMode, SLEEP_NETWORK_STANDBY, long seconds);
However, your parameter for time in the wrong position. Which version of system firmware are you running? I believe only version 0.7.0-rc.x will correctly complete the Particle.publish() before going to sleep.
@anderson916, I guess you are using an Electron, yes?
If so 0.6.2 should already take care of the correct delivery of events before going to sleep - only WiFi devices need 0.7.0-rc.3
Now, the problems are:
1, since I use sleep and wake, why does the device come online again and again(see picture)? Did the device get disconnected due to the weak signal? But if the signal is weak, why did it get connected again and publish sleep event?
2, from the screenshot, no wake events after sleep but “device came online” info. When the device comes online, it should publish wake event immediately.
My project has been delayed for a long time by these issues. Please help me. Thanks.
And for the third time: "How does your wiring on the wake pin look?"
Unexpected wake will not be caused by a weak radio signal but more likely by a noisy wake line.
You also ignored this question so far
Also “device came online” only tells you that the device came online after it was offline, but this does not necessarily mean that the offline state was due to the device sleeping.
Your code may have caused the connection loss (e.g. panic, hard_fault will most likely come from your code and does inevitably cause a connection loss).
And as also mentioned before, the screenshot does not show the time for most events so it’s hard to judge how frequent the issue happened.
That we can’t help better comes in parts also from not providing essential info