← index #7207Issue #6524
Off-topic · high · value 1.517
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

Space in wifi name

closedby rajmasudopened 2020-10-07updated 2024-09-13
port-esp32

If we have a space in the wifi name, the wlan.connect() wouldn't work.
For an example,
If we use wlan.connect('mywifi','mypassword') it will work but if the wifi name has a space as below:
wlan.connect('my wifi','mypassword'), it will fail.

Is there any workaround?

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