wln. Object
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 a network of your own and have other Wi-Fi stations connect to it.
Supported Hardware
The wln. object works with Tibbo's GA1000 and WA2000 devices:
- The GA1000 is our original Wi-Fi add-on module supporting 802.11b/g (2.4GHz) communications.
- The WA2000 is our newer Wi-Fi/BLE add-on module implementing 802.11a/b/g/n (2.4/5.0GHz), as well as BLE4.2, communications. The BLE (Bluetooth low-energy) part of the WA2000 is controlled through the separate bt. object.
Since the GA1000 has been around for a long time and the WA2000 is a newer device that many of our users may be unfamiliar with, we have prepared a quick-reference page that lists all the differences between the WA2000 and the GA1000.
In addition, the wln. object also works with the WM2000 wireless IIoT module and the WS1102 wireless device server, albeit with a few changes.
What Does the wln. Object Do?
The wln. object is not responsible for data communications over the Wi-Fi interface — this is the job of the sock. object.
On platforms with Wi-Fi support, you will find the Wi-Fi interface listed or available on the following sock. object properties:
In the job it performs, the wln. object is similar to the net. object, which controls the Ethernet interface of your device. In comparison, the wln. object is quite a bit more complex.
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 interface, finding the specified access point (AP), and associating with it using the 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 discovered.
- Set WEP, WPA-PSK, or WPA2-PSK security modes and related keys*.
- Associate with a wireless network (access point).
- Detect disassociation from a wireless network (access point).
- Start your device's own network.
- Monitor received signal strength.
- Detect power-downs and malfunctions of the Wi-Fi module.
* For the GA1000, a part of the required WPA/WPA2 functionality (pre-shared key calculation) is implemented in the WLN library. The WA2000 calculates the key internally and does not require any outside help.