Discovering All Wireless Networks

Top  Previous  Next

When called with an empty string argument, wln.scan and wln.activescan will attempt to find all wireless networks in range. After the task completes, the wln.scanresultssid R/O property will contain a comma-separated list of network names.  



'Scan for available network. This is a simplified example.

Dim s As String


wln.scan("") 'you could use wln.activescan('') instead

While wln.task<>PL_WLN_TASK_IDLE


s=wln.scanresultssid 'the list of networks will be copied into s



After the execution of the above, the s string may contain something like this: "TIBBO,c1100_1,.....,WNET2". Notice "....." — these are five bytes with ASCII code 0. They represent a hidden network (i.e. the network that does not broadcast its SSID). Naturally, the name of this network is not revealed to your device. This will be the case regardless of whether you used wln.scan or wln.activescan.