Page 1 of 1

Pyboard Access Point doesn't ask for password to connect

Posted: Fri Oct 30, 2020 5:15 pm
by MrRobot
So I've used the code:

Code: Select all


import network

wl_ap = network.WLAN(1)
wl_ap.config(essid='PyboardD')          # set AP SSID
wl_ap.config(password='password')   # set AP password
wl_ap.config(channel=6)             # set AP channel
wl_ap.active(1)                     # enable the AP


while True:

	#Do Stuff
I can connect my laptop to the access point but for some reason it doesn't request I enter the password.

Anyone know how I can make this happen?

Re: Pyboard Access Point doesn't ask for password to connect

Posted: Fri Oct 30, 2020 7:44 pm
by jamonda
I can confirm it does not work for me too. I think that there is an authentication mode config parameter, but it is impossible to find it for the Pyboard D. The docs are scarce and information is always insufficient.

The network library seems to be inconsistent also. It is ok if you set password with wl_ap.config(password='pybd0123'), but if you try to query the parameter with wl_ap.config('password'), you get an error ('unknown config param').

I tryed to find answers in the source code, but I think I do not have knowledge enough. Maybe somebody in the forum can help.

Re: Pyboard Access Point doesn't ask for password to connect

Posted: Mon Nov 02, 2020 9:46 am
by irsla
It's a known issue,

There's a PR open for this https://github.com/micropython/micropython/pull/5170

The patch kind of work, although it's not fully correct.

I posted the right values for the wifi chip configuration in the comments.

Re: Pyboard Access Point doesn't ask for password to connect

Posted: Mon Nov 02, 2020 12:47 pm
by jamonda
This should be implemented so that Micropython won't lag behind other platforms like Circuitpython and Pycom.

Re: Pyboard Access Point doesn't ask for password to connect

Posted: Tue Nov 03, 2020 12:29 am
by jimmo
You're right, this isn't currently implemented.

The setting is config(authmode=N) (described http://docs.micropython.org/en/latest/l ... .WLAN.html ) however, this is only implemented in ESP32/ESP8266 and not on STM32+CYW43 (i.e. PYBD).

The missing detail is that network_cyw43_config in extmod/network_cyw43.c needs to call cyw43_wifi_ap_set_auth (similar to how it calls cyw43_wifi_ap_set_password).

Probably the main bit of work that actually needs to be done is define a standard set of authmode values that's common across ports.