There are two Wi-Fi interfaces available for use with ZentriOS, a wlan client (802.11 STA) interface and a softAP (802.11 AP) interface. Both interfaces share the same physical Wi-Fi radio and antennas. To set the Wi-Fi transmit power for both interfaces, use the common wlan.tx_power variable.
WLAN Client Interface
The wlan client interface enables ZentriOS to join with a Wi-Fi access point at home, work or in-between. It is possible to use the wlan and softap interfaces concurrently, however these interfaces share the Wi-Fi radio and hence must operate on the same Wi-Fi radio channel in concurrent mode. The wlan interface has priority, and if the wlan interface starts on a different channel to the softap interface, the softap channel switches to the wlan channel.
ZentriOS provides various commands and variables to configure the wlan interface. See the documentation for wlan commands and wlan variables. An overview of WLAN functionality is provided in the following sections.
Scanning for Networks
There are two methods to scan for networks in range, active scanning and passive scanning. Active scanning involves the Wi-Fi module actively transmitting 802.11 probe request packets. When a Wi-Fi Access Point receives a probe, it replies with an 802.11 probe response. Passive scanning on the other hand avoids actively transmitting, and the Wi-Fi module simply listens for Wi-Fi Access Point beacons for a period of time on each channel scanned.
To initiate a scan for Wi-Fi networks in range, use the wlan_scan command.
WLAN Security Type
ZentriOS supports all SOHO security types including Open, WEP, WPA & WPA2, and WPA2 mixed mode.
ZentriOS determines security type automatically, from the network you are attempting to join.
Joining a Network
To join a network manually, set the wlan.ssid and wlan.passkey variables to match the network name and network password the module is attempting to join. You can do this by setting the values of the variables directly. See Configuration and Setup for other provisioning methods.
If your application is sensitive to latency or power, you should also consider customizing the number of join retry attempts with the wlan.join.retries.
To hide the passkey after it has been set, simply set the wlan.hide_passkey variable. After the passkey is hidden, it is no longer possible to read the passkey until a factory reset is performed. This stops an attacker learning the network password by physically acquiring a product with a ZentriOS device.
If the application requires the module to auto-join a network after boot up, set the wlan.auto_join.enabled variable. The number of automatic retry attempts and the delay between automatic retries is configurable with the variables wlan.auto_join.retries and wlan.auto_join.retry_delay.
Once the module is joined to a Wi-Fi network, the received signal strength (signal level) of the Wi-Fi Access Point is available with the wlan_get_rssi command.
Access Point (SoftAP) Interface
The softAP interface enables a Wi-Fi client such as a notebook, smartphone or tablet to join with ZentriOS. The softap interface is primarily controlled with the softap variables:
- Auto start on reboot - softap.auto_start
- Wi-Fi radio channel selection - softap.channel
- Control of interface settings such as IP address range, DHCP server, DNS redirect server - softap.static.ipsoftap.dhcp_server.enabled
Combined use with a web server for provisioning of the WLAN interface - Configuration and Setup, Setup with a Web Browser
- Control of client idle timeout - softap.idle_timeout
- Monitoring of connected clients and activity information - softap.client_list, softap.info
Note: The SoftAP is limited to a maximum of 4 WLAN clients for ZentriOS on the AMW004 (Wallaby) and AMWx06 (Numbat) modules.