Wln Object

Top  Previous  Next

object_wln

The wln. object represents the Wi-Fi interface of your device. It is through this object that you find available Wi-Fi networks and select the one to associate with. You can also create an ad-hoc network of your own and have other stations connect to it.

The wln. object is not responsible for actual data communications over the Wi-Fi — this is the job of the sock. object.

On platforms with Wi-Fi support, you will find Wi-Fi interface listed or available on the following sock. object's properties:

Sock.availableinterfaces
Sock.allowedinterfaces
Sock.currentinterface
Sock.targetinterface

 

In the task it performs, the wln. object is similar to the net object, which controls another interface — the Ethernet. In comparison, the wln. object is much more complex.

 

note_tip-wt

You can avoid dealing with the complexity of Wi-Fi by using our WLN library. The library handles the tasks of bringing up the Wi-Fi unterface, finding the specified access point, and associating with it using selected security protocol. The library also offers other convenient "services".

 

The wln object allows you to:

Scan for available networks and obtain their parameters such as name, channel, mode, etc. "Hidden networks" (those that do not broadcast their SSID) can also be found.
Set WEP, WPA-PSK, or WPA2-PSK security modes and related keys. Part of required WPA/WPA2 functionality is implemented in the WLN library. That is, the wln. object and WLN library work together to achieve WPA-PSK and WPA2-PSK support.
Associate with one of the networks (at a time) or form your own "ad-hoc" network on a desired channel.
Monitor received signal strength.
Detect disassociation from the network.
Detect Wi-Fi interface power-down or malfunction.

 

The wln. object works with dedicated hardware — the GA1000 add-on module. This add-on hardware is described in our Programmable Hardware Manual.