scripts/examples: Update AP mode examples.

This commit is contained in:
iabdalkader 2024-03-04 12:36:53 +01:00
parent c7d40f6af7
commit 3672773459
2 changed files with 4 additions and 3 deletions

View File

@ -15,8 +15,9 @@ PORT = 8080 # Arbitrary non-privileged port
# Init wlan module and connect to network
wlan = network.WLAN(network.AP_IF)
wlan.config(ssid=SSID, key=KEY, channel=2)
wlan.active(True)
wlan.config(essid=SSID, key=KEY, security=wlan.WEP, channel=2)
print("AP mode started. SSID: {} IP: {}".format(SSID, wlan.ifconfig()[0]))

View File

@ -25,9 +25,9 @@ sensor.set_pixformat(sensor.GRAYSCALE)
# Init wlan module in AP mode.
wlan = network.WLAN(network.AP_IF)
wlan.config(ssid=SSID, key=KEY, channel=2)
wlan.active(True)
# Note some WiFi modules only support WEP in AP mode.
wlan.config(ssid=SSID, key=KEY, channel=2) # security=wlan.WEP
print("AP mode started. SSID: {} IP: {}".format(SSID, wlan.ifconfig()[0]))
# You can block waiting for client to connect