Page 1 of 1

ESP32 creates accesspoint although configured as WIFI client

Posted: Sat Feb 13, 2021 11:26 pm
by mzm
Hi,
Unfortunately I can't find my error with my ESP32 and esp32-the firmware idf3-20191220-v1.12.bin or esp32-idf3-20200902-v1.13.bin
The Esp32 creates an accesspoint with the SSID "MicroPython-39XXXX" + default password although boot.py is configured as WIFI client.

I was even able to connect to this AP. The DHCP server is inactive, but the IP of the ESP32 is 192.168.4.1. I was not able to reach any services.

Here my sequence(only WIFI part):

Code: Select all

import network

print('Try to connect...')

station = network.WLAN(network.STA_IF)
station.active(True)
station.connect(WIFI_SSID, WIFI_PASSWORD)
while station.isconnected() == False:
    pass
print('Connection successful')

print(station.ifconfig())
Has anybody an idea why this happens?

Thanks in advance

Re: ESP32 creates accesspoint although configured as WIFI client

Posted: Sun Feb 14, 2021 10:21 am
by Roberthh
Did you try to switch it off deliberately with:

Code: Select all

import network
ap = network.WLAN(network.AP_IF)
ap.active(False)

Re: ESP32 creates accesspoint although configured as WIFI client

Posted: Sun Feb 14, 2021 10:40 pm
by mzm
Thanks, that solved it.

Also ap.active() returns True
before I deactivate it.

Code: Select all

import network
ap = network.WLAN(network.AP_IF)
ap.active() -> True
ap.active(False)
Hmmm, looks kind of obvious now.