openmv/scripts/examples/10-Arduino-Boards/Nicla-Vision/03-WiFi/scan.py
iabdalkader 11194954cb examples: Update all networking scripts.
* Remove non-standard timeout arg and use isconnected.
2023-06-28 17:16:27 +02:00

18 lines
438 B
Python

# Scan Example
#
# This example shows how to scan for networks with the WiFi shield.
import time, 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)