mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
scripts/examples: Update AP mode examples.
This commit is contained in:
parent
c7d40f6af7
commit
3672773459
@ -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]))
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user