0

I can't for the life of me figure out why my ESP8266s create WiFi access points.

I plug it in and send an empty sketch, and it creates an AP called "ESP_28F2F8" and here the ESP is at 192.168.4.1.

I do not want it to create a WiFi network. I just want it to connect to one.

Has anyone else run into this issue? Is this perhaps some weird OS?

1 Answer 1

1

That's normal operation of the underlying Espressif's SDK. It remembers some of the settings in flash, like the last created AP and last WiFi network connected.

You need to run

WiFi.softAPdisconnect(true);

so the ESP disconnects all clients currently connected to it, disables AP and remembers it to flash.


If you might also need to disable automatic connection to the last WiFi network, you need to call:

WiFi.setAutoConnect(false);
Sign up to request clarification or add additional context in comments.

2 Comments

Hmm, I'll try this. Thanks! I'll let you know when I've tried this.
This worked and fixed my confusion as to why it did this without me telling it should. Many thanks!

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.