使用範例的scan wifi僅顯示scanning,沒有顯示附近wifi
# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Scan Example
#
# This example shows how to scan for WiFi networks.
import time
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
print("Scanning...")
while True:
scan_result = wlan.scan()
for ap in scan_result:
print(
"SSID: %s BSSID: %s Channel: %d RSSI: %d Auth: %d"
% (ap[0], ":".join(["%X" % i for i in ap[1]]), ap[2], ap[3], ap[4])
)
print()
time.sleep_ms(1000)
Traceback (most recent call last):
File "<stdin>", line 76, in <module>
OSError: [Errno 11] EAGAIN
OpenMV v4.5.4; MicroPython v1.22-omv.r22; OPENMV4P-STM32H743
Type "help()" for more information.
>>> Scanning...