Pyboard Access Point doesn't ask for password to connect

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
MrRobot
Posts: 31
Joined: Mon May 11, 2020 11:30 am

Pyboard Access Point doesn't ask for password to connect

Post by MrRobot » Fri Oct 30, 2020 5:15 pm

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?

jamonda
Posts: 36
Joined: Thu May 21, 2020 3:48 pm

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

Post by jamonda » Fri Oct 30, 2020 7:44 pm

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.

irsla
Posts: 11
Joined: Mon Sep 21, 2020 2:04 pm

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

Post by irsla » Mon Nov 02, 2020 9:46 am

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.

jamonda
Posts: 36
Joined: Thu May 21, 2020 3:48 pm

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

Post by jamonda » Mon Nov 02, 2020 12:47 pm

This should be implemented so that Micropython won't lag behind other platforms like Circuitpython and Pycom.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

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

Post by jimmo » Tue Nov 03, 2020 12:29 am

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.

Post Reply