Third post here.
I would like to ask if there is a way to wake up Photon from its deep sleeping mode without using external wake up pin.
General layout is like that.
There is photon and sensor in remote area.
I want to set the monitoring time for sensor via web page like per hour or per half an hour.
Lets say…
System.sleep(SLEEP_MODE_DEEP, 1800); // I am not sure if there is time limit for sleep mode.
When Photon is in sleeping mode for half an hour, I change my mind and want to set the sleeping time to another value via web page.
But I cannot do that because it is in sleeping mode.
Is there is a way to wake up Photon from deep sleeping mode without physical pin but with trigger from webpage?
Because It is not ideal for me to physically go there and set the wake up trigger pin.
I’d say no. The purpose of sleep is to turn off the processor and Wi-Fi to save power, so the only way to wake up a Photon is via an external hardware interrupt pin, like WKP.
Exceptions to this are situations where the radio stays active, like some sleep modes on the Electron where some sort of external trigger like an SMS would wake it up (not supported, but theoretically possible). Also, things like the Bluz Bluetooth LE device where the radio protocol is designed to wake up and sleep again quickly using very little power so it can be done continuously, even on battery power.
I don’t have a direct method, however there is a way to adjust sleep time without having to reflash/ catch the particle in the few moments it is online.
I would say your best bet is to set a web flag somewhere called “Sleep Time”. The particle can the check this check this when it wakes up and adjust it’s sleeping time. Alternatively you could set a flag called “Can I sleep?”, that would allow you to keep the photon on indefinitely until you can update the firmware.
Without any knowledge about your code it’s hard to tell - there is just too much to explain when starting from zero up to all the possible ins and outs of all different kinds of sleep modes.
If you have a particular issue, try to explain it as exact as possible with all the context needed to properly assess the situation - that usually involves a minimal test code that exhibits the unexpected behaviour you are seeing.
However, if your device was online when it went to (stop mode) sleep, it will try to reestablish the connection on next wake.