
SCANNED is a read-only pseudo variable. Writes to SCANNED prohibited and treated as error. SCANNED can be used in conjunction with the SCAN command to read the current scan status or, if finished, to get the number of found WLAN nets.
The following program starts a scan and polls SCANNED until the scan is complete. It then reads the number of found nets and prints the result.
outmode -2 ' Start a scan with 300ms per channel scan 0, 300 ' Busy wait until scan finished while SCANNED < 0 sleep 100 print "."; wend ' Store number of found WLAN nets and print it let a = SCANNED print "found wlans: "; a ' Loop thru all records and print them let s$ = "" for s = 1 to a getscan s$ print s$ next
SCANNED reads -1 if there's no scan in progress. While a scan is running, SCANNED reads -2 and if the scan is over, SCANNED becomes a positive value that is the number of found WLANs in the neighbourhood. See also the SCAN command.
SCAN : Search for WLAN networks
SCANNED : Returns number of found WLAN networks
GETSCAN : Read results from scan command
STATUS(-4]) : Returns status of WLAN connection