Module lib.wifi

Class to manage wifi and access point

Expand source code
# Distributed under Pycameresp License
# Copyright (c) 2023 Remi BERTHOLET
""" Class to manage wifi and access point """
import sys
if sys.platform == "rp2":
    AUTHMODE = {0: b"open", 0x00200002: b"WPA-PSK", 0x00400004: b"WPA2-PSK", 0x00400006: b"WPA/WPA2-PSK"}
    AUTHMODE_DEFAULT = 0x00400004
else:
    AUTHMODE = {0: b"open", 1: b"WEP", 2: b"WPA-PSK", 3: b"WPA2-PSK", 4: b"WPA/WPA2-PSK"}
    AUTHMODE_DEFAULT = 3

Sub-modules

lib.wifi.accesspoint

Classes used to manage the wifi access point

lib.wifi.hostname

Manage the host name

lib.wifi.ip

Ip address tools

lib.wifi.station

Classes used to manage the wifi station

lib.wifi.wifi

Manages access to wifi, treats cases of network loss with retry, and manages a fallback on the access point if no network is available