Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi.radio.start_ap - Cannot set AuthMode because it is not iterable #7680

Closed
dotpointer opened this issue Mar 4, 2023 · 3 comments · Fixed by #8105
Closed

wifi.radio.start_ap - Cannot set AuthMode because it is not iterable #7680

dotpointer opened this issue Mar 4, 2023 · 3 comments · Fixed by #8105

Comments

@dotpointer
Copy link

CircuitPython version

Adafruit CircuitPython 8.0.2 on 2023-02-14; Adafruit Feather ESP32S2 with ESP32S2

Code/REPL

import wifi
# 1 - give it an AuthMode
wifi.radio.start_ap(ssid='Wireless', password='wireless', authmode=wifi.AuthMode.WPA2)
# 2 - give it an AuthMode inside an iterable list to make it iterable as requested
wifi.radio.start_ap(ssid='Wireless', password='wireless', authmode=[wifi.AuthMode.WPA2])

Behavior

1 - It refuses and requests the AuthMode to be iterable

TypeError: 'AuthMode' object is not iterable

2 - It is not satisified even when it is iterable

ValueError: Invalid authmode

Description

The AP mode refuses to use AuthMode other than the default open unencrypted mode.

The problem might be a usage/syntax error, please tell me if so and how to fix it.

The errors are translated from Swedish.

Additional information

No response

@dotpointer dotpointer added the bug label Mar 4, 2023
@dotpointer
Copy link
Author

I found a solution, with WPA2 you also need to supply PSK:

import
wifi.radio.start_ap(ssid='Wireless', password='wireless', authmode=[wifi.AuthMode.WPA2, wifi.AuthMode.PSK])

@dhalbert
Copy link
Collaborator

dhalbert commented Mar 4, 2023

The documentation signature is wrong, it should say authmodes, so reopening.

@dhalbert dhalbert reopened this Mar 4, 2023
@dhalbert
Copy link
Collaborator

dhalbert commented Mar 4, 2023

We should also maybe say that PSK is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants