← index #7207Issue #1942
Off-topic · high · value 1.524
QUERY · ISSUE

Documentation WLAN.connect()

openby karfasopened 2021-05-03updated 2025-11-06
docs

In https://docs.micropython.org/en/latest/wipy/tutorial/wlan.html, the connect() method reads
wlan.connect(net.ssid, auth=(net.sec, 'mywifikey'), timeout=5000)

In contrary, https://docs.micropython.org/en/latest/library/network.WLAN.html?highlight=wlan#network.WLAN.connect describes the connect() call as
WLAN.connect(ssid=None, password=None, *, bssid=None)

Which one is the correct/current one (and for which port ?) ?
This is quite confusing for new users, I think.

CANDIDATE · ISSUE

esp8266 network run wlan.connect esp8266 restart !

closedby skylin008opened 2016-03-29updated 2016-03-29
port-esp8266

The firmware version for:MicroPython v1.6-312-gb4070ee-dirty on 2016-03-29; ESP module with ESP8266

when I run follow code,esp8266-12f restart.
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.isconnected()
False
wlan.connect('essid', 'password') #essid and password from router distribution
the esp8266-12f restart every time.
How to fix this issue?Tks!

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied