Go Down

Topic: Connecting IoT "things" to a secured wireless network (Read 131 times) previous topic - next topic


Hi everybody,
My question was probably answered a thousand times, but it's so basic that I don't really know what to look for. Any link to get me started would be highly appreciated.

I want to create an IoT product which needs internet access, but it has no I/O capabilities that the user can use to configure it (i.e. tell it which WiFi network to connect to, and what the password is). Every piece needs to have a specific id, and there will be an app to control all the products the user has, so I was thinking of attaching a QR to each product, and when the user scans the QR with the app, it automatically configures the device to use the network.
I guess it should be complicated to write from scratch in a secure way, but it's a basic IoT demand, so I figured there must be a library to support it, but I can't find one.
I would really appreciate some info on the best way to do what I'm trying to do.

Thanks a lot!


Dear shayelk,

If I understand your requirement, you are asking to configure your device via web,
and you want the device to store the Username and password,

if yes, you can use the EEPROM.h
where you can read and write on the device.
i already implement it on ESP8266-01, for home Automation devices.

hope i answered your requirement

Samir Tafesh


Hi SamirTafesh, thank you for taking the time to answer :)
You answered a question I didn't even realize I needed to ask (now that you introduced me to EEPROM it has become obvious that I need to write to the Arduino's non-volatile memory), so thanks for saving me a lot of troubles in the future!

My original question, though, was different:
I need to have a protocol that will let me configure this settings using my phone.
What I'm looking for is the last method in the following link (under "An alternative method"):

It should look like this:
1) User powers the device on for the first time -> device enters a listening mode and waits for network info from smartphone (how is that done? over WiFi? can the phone "talk" to the WiFi module which is not yet connected to the network?)
2) User enters the device id to an app on his/her smartphone, which in turn sends the network info to the listening device
3) Device writes the network info to EEPROM (thanks for that! :) ) and connects to the network.

hope my question is clearer now


Dear Shayelk,

I got your point, it can be implemented by:

1- in your code the Void Setup() will handle the job
   a- when the device boots for the first time, the EEPROM parameters are empty, so you set your device as access point with fixed IP example, and it acts as a Web server, serving the config page as in the attachement
   b- you connect your phone to the AP and you fill the attached form as an example, once you post the form, the parameters should be saved into the EEPROM
   c- once done you reboot the device and it will will check the EEPROM, if filled then it will continue the normal JOB

hope this clarifies on how you should start, if you need more assistance, please do not hesitate to contact me back

Samir Tafesh


Sounds like just what I'm looking for.
Now that I know where I'm going, I'll start learning how to implement this phone-arduino interface.
Thanks a lot for pointing me in the right direction!


 :) dear shayelk,

Happy to hear that the solution answers your need,

Having more inquiry, please do not hesitate to contact me back

Samir tafesh

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131