I’m looking to setup a Photon so that it will try to connect to WiFi and the cloud, then if unable will go into softap. I want to have it keep switching back and forth until it is able to get to the cloud.
The question that I have is weather it is possible to tell if a device has connected to the Photon when it is in SoftAP mode.
When a device connects to the SoftAP the myPage() handler will be called - so in this function you could set a flag to indicate that someone has visited.
If you go for a “flag” that also stores the timestamp of the connection you can give it a TTL.
You’d need to clarify a bit more what your use-case would be to give you some less general hints.
Yes, what ScruffR said. Sorry, I misread your question.
There’s no way to see into the SoftAP to see if a device has only connected to Wi-Fi. There’s no list the MAC address or IP addresses of phones/computers connected to the SoftAP, for example.
Basicly my use case is to make the recovery more hands off. If it can’t connect to the cloud it goes to setup mode. If nobody connects in setup mode then it tries to connect to the cloud again. And on and on until something works.
Your idea of a timestamps flag sounds very doable.