-->
Page 1 of 2

What to do when no serial port access

PostPosted: Tue Jan 26, 2016 2:13 pm
by viscomjim
Hopefully not a stupid question, but have been trying to figure this out for a while. If one were to design something using esp8266basic and then hand it off to someone with limited technical knowledge (and no serial port access), I need to figure out how to get this person to be able to connect the device to their network with minimal effort.

What I would ultimately like to do is tell the person to power up this unit, and look for the ESP wifi access point and connect to it. Once this is done, he would open a browser window and navigate to 192.168.4.1. No biggie so far.

How would it be possible to not have the typical esp menu page to show up, but just a simple page with maybe a product title and two entries, wireless network name and wireless network password and then a connect button. Or better yet, a list of available networks, one of which could be selected and then a box to enter the password for that network and then the connect button. Also, if it failed, it would just go back and ask again.

Once it connected, it would just go on and run its program without any more user interaction. Is this possible, or do you always have to access the esp8266basic menu page from the start?

Re: What to do when no serial port access

PostPosted: Tue Jan 26, 2016 3:03 pm
by Jokkepappa
All very much possible. You already can use WIFI.SCAN() command to list all wifis. Use some javascript to select the network from list and have box to type password to.

Exampel code:
http://www.esp8266basic.com/wifi-scanner-example.html

Re: What to do when no serial port access

PostPosted: Tue Jan 26, 2016 4:49 pm
by viscomjim
Thank you Jokkepappa. I will do a bit of research on this to see what I can come up with. Javascript is new to me, so it will be a bit of a learning curve.

Is it possible that the esp can be in station and access point mode at the same time so that once the esp gets an ip address from the router, you can go to the access point and see what ip address was assigned to the esp by the router? In other words, is there any way to see the esp's ip address without having to hook up the serial port and monitor the output once it gets it's ip address? This is kind of a missing link for me for some reason.

Thanks again for your input!!!!!

Re: What to do when no serial port access

PostPosted: Tue Jan 26, 2016 5:13 pm
by Mmiscool
It is possible to use the connect and ap commands at the same time. This will make it work in ap mode and station mode simultaneously.

You can take each of the values for the network name created by the loop in the WiFi scanner example and put them in to a variable adding a comma between each new network being added to the variable. Then use that variable in a drop down or list box command to supply the list of values.