Post topics, source code that relate to the Arduino Platform

User avatar
By Vini
#22260 I thought this was the code that turns the ESP8266 an Access Point, and then I can connect my device to it (without any other router). When I ran this code on ESP8266 it generates the network called "ESPap", and I'm able to connect to it using the password "thereisnospoon", but the page created on http://192.168.4.1 doesn't work.
User avatar
By torntrousers
#22261 I think its a bug in the example code.

The ESP can be in several WiFi modes - WiFi off, Access Point mode, station mode, both Access Point and Station mode. By default its in both Access Point and Station mode. It also by default when in one of the station modes will try to reconnect to one of the access points it has previously connected to.

The while (WiFi.status() != WL_CONNECTED) line is waiting for the station to be connected to an access point. If you've not done that successfully before on that ESP i guess it will not happen hence your endless dots. Probably when the example was coded and tested it was on an ESP that had previously connected to an access point ok so it does reconnect ok and the while loop terminates.

Try just deleting the line with that while statement. Also to prevent it trying to connect to an access point you could add WiFi.mode(WIFI_AP); so that its only an access point, which looks like the point of the example.
User avatar
By Vini
#22265 Perfect!
I took off this line, accessed the http://192.168.4.1/ and I could see the "You are connected" website. Thank you very much.

Now, it's probably something inside the library but, how can I change this http://192.168.4.1/ address?

Funny thing: when I open the Serial Monitor, no information is shown (none of Serial.print are shown)..interesting....