2

I am trying to build an application like Wemo App for learning purpose and I am stuck at a place. I am using ESP32 for this learning. In the future, it can be ESP8266 or any other.

In the wemo device, you first connect your mobile to your wemo device through devices AP and then open the WemoApp and then you enter the SSID and PSK of the Home router you want wemo device to connect to. And after that just press, next and voila device connects to the home network and you can control it.

I searched for OTA updates and found that you need to create a new sketch and export it into .bin file and then upload it through its browser or just through an Arduino.

Is there a way to not do all of this and directly just update the SSID and PSK through a Mobile App? Because to create and convert a sketch in .bin and then sending is complicated from a Mobile App.

I searched over this forum and found this but didn't explain how to achieve that. I am continuously searching and would love to get the knowledge from experienced.

  • Why would you need to do an OTA update just to switch from AP to STA and set the SSID and PSK? Also, you probably want to consider using BLE rather than WiFi for the initial configuration step. See here for an example workflow. – jcaron Feb 25 at 17:58
  • If I use ESP8266 then I have to use Wi-Fi. And I was searching and found only through OTA way we can update the credentials to make the device switch to the home network. I am following the Wemo Smart Switch devices and learning how they pair and set the credentials. Your workflow is awesome but chances of getting tutorials for the same are rare. I was thinking If I use "Http" then? Just pass the SSID and PSK as a parameter in the background after connecting through AP and from Mobile App. And after receiving the credentials device will restart and connect to a new network. What do you think? – Lucifer Feb 26 at 5:26
  • 1
    There are sketches that already have a blueprint for this, without uploading any files. Please see my answer here: iot.stackexchange.com/a/4286/9008 – oh.dae.su Feb 26 at 6:03
  • @oh.dae.su I read your answer and all the links within it. Wifimanager documentation is not good and This link is good but is confusing a little bit. I will try to implement this but don't know how to integrate it into Mobile App. I don't want a web-view type thing to display that configuration page in-app. When I just enter SSID and PSK and hit next in the background it should send data to the device without a page. – Lucifer Feb 26 at 12:44
  • And this is complicated and doesn't expose the idea of integrating into a Mobile App or Maybe I am not understanding it. – Lucifer Feb 26 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.