0

I am building an IoT device based on Android and I am trying to understand how I can use a smartphone to configure a device for connection to Wifi. The IoT device doesn't have a Screen. So I want to connect the device to Wifi through the Smartphone.

I can build Android Apps that can be pushed to the device as well as to the smartphone.

I want to do something like this - How to Set Up Your Ring Video Doorbell 1:25 Set Up WIFI Connection

How do devices like Security cameras connect to Internet by using a mobile phone?

2 Answers 2

1

I've set up several Shelly relays. When you power them up, they create their own WiFi access point. I connect my phone to the Shelly's WiFi network then navigate to its home page where the built in web server allows me to edit its configuration.

One of the config options is to give it an SSID to connect to (and password if necessary let's be honest, it's necessary). If you change this setting, the relay will reboot itself and connect to the specified SSID. It does have a physical reset button so if you screw up your settings you can reset it to factory default and try again.

Once you've connected the device to your home WiFi, you can then access it from any device on your home network to continue configuring it, control it, etc.

0
1

One option is to use BLE. This requires an app on the smartphone (rather than just a web browser when using WiFi), but it avoids the requirement to touch the phone’s settings.

Your device would advertise as a connectable peripheral with a well known name or other advertising data. The app on your phone will scan for matching devices, (optionally liste the devices for the user to choose from), connect, and exchange data (info from the device, settings chosen by the user to the device).

Your device may provide the list of WiFi networks it sees so the user just has yo pick and enter the key (or possibly use WPS instead).

I believe at some point there was a way for apps to retrieve current network connection info from the phone, so you could use that as well if that still works.

2
  • Would you directly pass the SSID and Password to the IoT device?
    – SyncMaster
    Commented Jun 22, 2022 at 23:43
  • If you can retrieve the existing connection settings from your phone you could send them directly. Otherwise you can ask the user for input (or selection in the case of the SSID) and send them, yes.
    – jcaron
    Commented Jun 23, 2022 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.