1 of 1 people found this helpful
If it can't find any it switches to AP mode itself and waits for a smartphone to make a connection to itself .
I think this process is very normal and easy to have a role switch in the code .
For Mqtt client running on STA mode or AP mode, I think the device normally runs as STA mode to connect with a AP which can ping internet successfully. I think your smart phone should run as a Hotspot to make the connection stable.
about relaying the messages (as an MQTT client) to the clout MQTT broker it sounds reasonable to me.