# mPy - Activate Esp32 WiFi Access-Point
# Copyright by Anthony Vogelaar, Perth Scotland
# rev 0.10  2025-11-25  initial release

import	network

# ======================= global ==========================

def startWifiAP(ssid='Esp32_AP', passwd='12345678'):
    network.WLAN(network.STA_IF).active(False)
    ap = network.WLAN(network.AP_IF)
    ap.active(False)
    ap.active(True)
    ap.config(essid=ssid, password=passwd, authmode=network.AUTH_WPA2_PSK)
    print(f'WiFi AP {ssid}:{passwd} started') 
    
# ========================= end ============================
