Why is my ESP8266 appearing as an access point ?

8 years 11 months ago #2702 by vuden
I just uploaded my first sketch to an ESP8266-01 via the Arduino IDE.
Just a simple sketch to blink an LED on GPIO2.
No libraries included.

Works fine but ...

I now see "ESP_9BECA5" as an access point on my iPhone.
And I can log onto it and access the internet.
No userID or password required.

Furthermore, the Access Point is on the same channel (11) that I have my router using for 2.4GHz.

I think I'm missing something elemetary here.

Could someone point me in te right direction?
Thank you.

Please Log in or Create an account to join the conversation.

8 years 6 months ago - 8 years 6 months ago #3377 by edautz
This is the default behaviour of the ESP. It default acts as an station and access point at the same time.

If you don't want that you have to program the ESP as an station (STA) only.

Please Log in or Create an account to join the conversation.

8 years 6 months ago - 8 years 6 months ago #3378 by NightOne
Thats the default if you dont tell it otherwise..... with the blink example there is no code telling the ESP what to connect too.... If you have a look at the other examples they include the ESP wifi library which does the heavy lifting for you

the code looks like this
#include <ESP8266WiFi.h>

const char* ssid = "your-ssid";
const char* password = "your-password";

Once you add this to your code it will connect to your wifi router..... It however wont do anything on the router till you tell it to..

for example you can tell it to run as a webserver .
WiFiServer server(80);

Here is a super easy example for making a webserver on the ESP and turing on the led remotely

www.arduinesp.com/wifiwebserver

Please Log in or Create an account to join the conversation.

7 years 11 months ago #3623 by wini
Simply add this line to set the station mode:
WiFi.mode(WIFI_STA);

I did it right before:
server.begin();

Please Log in or Create an account to join the conversation.

Time to create page: 0.211 seconds

Forum latest

  • No posts to display.