Have been messing with some app development lately to configure a mos device and have come across a problem:
- mos device starts in AP mode waiting for a connection
- I connect mobile to the device, and try to send configuration data over WiFi
- phone can’t talk to the device until I disable mobile data
This is the same from both Android and iOS from what I can tell.
From what I’ve read, this is because the device network has no internet (of course, it’s not yet connected to any network) and this causes the mobile network connection to take precedence.
I’ve not yet worked out a way around this, and thought it was impossible till I realised I have some WiFi only smart lights, and the “Brilliant Smart” app (Tuya rebrand) seems to manage to connect to their own devices somehow with WiFi only and then the device appears on my home network. Have tested in both Android and iOS with bluetooth permission disabled.
Questions - anyone know how these generic Tuya rebranded apps can manage device connection / provision without getting caught in the same issue I’ve outlined above?
Currently looking at bluetooth as a fallback, but really don’t want to have to touch that.
Thanks.
That looks like a limitation on your mobile or whatever on your side, my cell phone (which is an old piece of crap, btw) has no issue connecting via WiFi, it just “complains” that network has no Internet but does not claim to know better and does as it’s told. It will disconnect from LTE during that, of course, but there’s no additional interaction on user side beyond choosing the device Wi-Fi network.
Some people would rather use Bluetooth for that initial phase
Some people prefer to use a tablet, with no cell phone network connectivity
Some people configure via UART with an ad hoc device or computer software
Some people have a commissioning button to deploy devices, and rely on finding a specific / open network for first connection
YMMV
Thanks for the reply @scaprile , I’m almost certain ESPTOUCH is how the other Tuya based apps are doing it.
It allows an app to share WiFi credentials to a device listening so they can be used to connect to an AP (same one the app is on) so then the devices can communicate over the network without the connectivity issues I mentioned in different operating systems/ecosystems.
While ESPTOUCH does work with Mongoose OS, because mos is so old now it doesn’t support the latest features and protocols (mainly ESPTOUCH_V2) which sucks.
Chinese products are outside my description, they usually employ some proprietary mechanism hogging all your resources and only oriented towards reaching their marleting goal.
Cameras send your video to their cloud without you knowing it, and devices may talk ultrasound to recognize each other.
End manufacturers may utilize intermediate manufacturer or State-owned stuff, so some apps work across several brands or several product lines or combinations of both.