|
.Scan Method |
Top Previous Next |
Function: |
Causes the Wi-Fi interface to commence either the search for available wireless networks or obtain additional information about a particular network whose SSID matches that specified by the name argument. |
Syntax: |
wln.scan(byref name as string) as accepted_rejected |
Returns: |
One of accepted_rejected constants: 0- ACCEPTED. 1- REJECTED. |
See Also: |
Details
Part |
Description |
name |
If the name argument of this method is left empty, the wln object will search for all available wireless networks. If the name argument is set to the name of a particular network, the wln object will obtain additional information on this network. |
If the name argument of this method is left empty, the wln object will search for all available wireless networks. If the name argument is set to the name of a particular network, the wln object will obtain additional information on this network.
The scan process is a task. As such, the wln.scan will be rejected (return 1- REJECTED) if another task is currently in progress. The task will also be rejected if the Wi-Fi interface is in the associated state (wln.associationstate= 1- PL_WLN_ASSOCIATED), or if the Wi-Fi hardware is not online (wln.enabled= 0- NO). The method will return 0- ACCEPTED if the task is accepted for processing.
The task is completed when the wln.task R/O property becomes 0- PL_WLN_TASK_IDLE. The on_wln_task_complete event will also be generated at that time.
After the completion, the following read-only properties will be updated:
If the name argument was left empty, the wln.scanresultssid will contain a comma-delimited list of available wireless networks or nothing if no networks were discovered.
If the name argument specified a particular network, the wln.scanresultssid will contain the name of this network, or nothing if the network wasn't found. If the network was found, the wln.scanresultbssid, wln.scanresultbssmode, wln.scanresultchannel, and wln.scanresultrssi will be updated with the information pertaining to the specified network.