.Scan Method

Top  Previous  Next

Function:

Causes the Wi-Fi interface to commence either the passive detection of available wireless networks or obtainment of an additional information about a particular network specified by its SSID (name).

Syntax:

wln.scan(byref ssid as string) as accepted_rejected

Returns:

One of accepted_rejected constants:

0- ACCEPTED.

1- REJECTED.

See Also:

Scanning for Wi-Fi Networks, Wln Tasks,

wln.activescan

 


Part

Description

ssid

Network name. Leave empty to detect all available networks — after the scan, the comma-delimited list of networks will be in wln.scanresultssid. Alternatively, specify the network name. If the network is detected, its parameters will be available through wln.scanresultssid, wln.scanresultbssid, wln.scanresultbssmode, wln.scanresultchannel, wln.scanresultrssi, wln.scanresultwpainfo.

Details

Passive scanning process is a task and there is a certain correct way of handling tasks.

Scanning while the Wi-Fi interface is in the associated state (wln.associationstate= 1- PL_WLN_ASSOCIATED) or running its own ad-hoc network (wln.associationstate= 2- PL_WLN_OWN_NETWORK) will temporarily disrupt communications between the device and the "current" access point.

Passive detection of networks is performed on all channels, regardless of the value of the wln.domain property. This is because no radio signal is transmitted during the passive scanning.

Passive scanning won't work with networks that have their SSID (name) hidden. To work with "hidden networks", use wln.activescan method instead.