Skip to content

Add support for SAE Wifi Auth Type (and maybe catch the ValueError) #140

@Alphare

Description

@Alphare

Hi, thanks for the very useful piece of software.

I just got a new router and it uses newer SAE (WPA3) authentication, which is not listed in your enum.

Traceback (most recent call last):
  File "/app/share/cobang/cobang/pages/scanner.py", line 707, in display_result
    if wifi := parse_wifi_message(raw_data):
               ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/app/share/cobang/cobang/messages.py", line 80, in parse_wifi_message
    winfo.auth_type = WifiAuthType(auth_type) if auth_type != 'nopass' else None
                      ~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/enum.py", line 726, in __call__
    return cls.__new__(cls, value)
           ~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/enum.py", line 1203, in __new__
    raise ve_exc
ValueError: 'SAE' is not a valid WifiAuthType

I think this requires two fixes: catching the ValueError and adding support for SAE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions