I have a working prototype of a gps tracking device. It currently needs an external screen when I want to modify its settings. I'd like to change that in a way that it connects to the local WIFI and becomes discoverable for a mobile app that will be used to interact with it (like it is case with devices like, amazon echo, phillips hue, chromecast, etc.) . I am having a hard time finding information about how to do this. Sorry that it is not a very specific coding question, but I am sure that a quick hint can easily point me the right way.
1 Answers
Based on your tags you already know several options. Without you mentioning any of the constraints you have (operating system? programming language? how does your device to connect to the local network?) it's hard to say anything more than "these technologies exist"...
if your device is able to somehow join the correct network on it's own you have several fairly easy alternatives for local network discovery. You should be able to find libraries or services to do either of these for you with moderately easy integration work regardless of your platform:
- SSDP (device/service discovery protocol from UPnP)
- zeroconf (aka bonjour, avahi)
- webservice based "discovery": If you are ready to run an internet service that both the device and client can connect to you can obviously do discovery that way as well: Your device might e.g. have a printed code on it that your client needs to input and the webservice can then pass information between the two.
However, if your device needs to be discoverable before it knows how to join the local Wi-Fi network, you have at least two options, both considerably more difficult to implement:
- Wi-Fi Direct allows your device to be discoverable without being connected to a network. It requires support from your device wifi hardware and OS, as well as the wifi hardware and OS of the client device.
- You can make your device become an access point whenever it does not see a known wifi network, and let the client app connect to that AP. I believe chromecast uses this method to share the real wifi network details over that temporary connection. This is likely to be difficult to get right and I'm not familiar with any off-the-shelf solutions.
Depending on your use case you might use either of these two methods to do e.g. one-off configuration, or just to transmit the actual Wi-Fi network details to the device. In the latter case you'll still need local network discovery once you've joined the actual Wi-Fi network.

- 13,857
- 1
- 37
- 54