ESP32 creates accesspoint although configured as WIFI client

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mzm
Posts: 3
Joined: Fri Dec 18, 2020 3:07 pm

ESP32 creates accesspoint although configured as WIFI client

Post by mzm » Sat Feb 13, 2021 11:26 pm

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

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 creates accesspoint although configured as WIFI client

Post by Roberthh » Sun Feb 14, 2021 10:21 am

Did you try to switch it off deliberately with:

Code: Select all

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

mzm
Posts: 3
Joined: Fri Dec 18, 2020 3:07 pm

Re: ESP32 creates accesspoint although configured as WIFI client

Post by mzm » Sun Feb 14, 2021 10:40 pm

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.

Post Reply