WLAN Interface

wlan.antenna.select

Abbreviationwl a s
Accessget/set

Description

The default antenna used by the Wi-Fi radio.

Note: Availability of antennas is hardware dependent. Currently only the Zentri AMW004 evaluation board has both an internal PCB antenna and a u.FL connector for an external antenna. On other hardware this setting has no effect.

Note: An external antenna must be connected if 2, ext or auto mode are selected.

Arguments

<1|int/2|ext/auto>

Default

1

Properties

Supported Platforms

Get example

> get wl a s
R000003
1

Set example

> set wl a s auto
R000008
Set OK

wlan.auto_join.enabled

Abbreviationwl o e
Accessget/set

Description

Enable/disable network auto-join using the wlan interface on bootup.

See Procedure for Joining a WLAN Network.

Arguments

<0/off/false/1/on/true>

Default

0

Properties

Supported Platforms

Get example

> get wl o e
R000003
0

Set example

> set wl o e true
R000008
Set OK

wlan.auto_join.retries

Abbreviationwl o r
Accessget/set

Description

Maximum number of attempts to auto-join a network. 0 = retry indefinitely.

See Procedure for Joining a WLAN Network.

Arguments

<0-255>

Default

3

Properties

Supported Platforms

Get example

> get wl o r
R000003
3

Set example

> set wl o r 5
R000008
Set OK

wlan.auto_join.retry_delay

Abbreviationwl o d
Accessget/set

Description

The period between auto-join attempts in seconds.

See Procedure for Joining a WLAN Network.

Arguments

<0-255>

Default

10

Properties

Supported Platforms

Get example

> get wl o d
R000004
10

Set example

> set wl o d 5
R000008
Set OK

wlan.bssid

Abbreviationwl b
Accessget/set

Description

Specify the BSSID for the WLAN.

When wlan.bssid is set, ZentriOS attempts to associate with the network via the access point with the specified BSSID, regardless of the wlan.ssid setting. This allows connecting to hidden networks.

The wlan.passkey must be provided.

The wlan.ssid cannot be empty. Setting wlan.ssid clears wlan.bssid, so set wlan.ssid first, then set wlan.bssid. For example:

ZentriOS Commands Description
set wlan.ssid my_network
set wlan.bssid 11:22:33:44:55:66
set wlan.passkey my_password
network_up
first set the SSID
next set the BSSID
set the network's password (if required)
connect to the network

Note: On joining a WLAN, if the WLAN SSID is advertised, it replaces the value of wlan.ssid.

To disable wlan.bssid, set the value to 00:00:00:00:00:00 or set wlan.ssid to clear it.

See Procedure for Joining a WLAN Network.

Arguments

<bssid>

Default

00:00:00:00:00:00

Properties

Supported Platforms

Get example

> get wl b
R000019
00:00:00:00:00:00

Set example

> set wl b 7C:69:F6:35:8F:F8
R000008
Set OK

wlan.dhcp.enabled

Abbreviationwl d e
Accessget/set

Description

Select whether DHCP is used to automatically obtain an IPv4 IP address on the wlan interface.
Note: Renamed from network.dhcp after ZentriOS v1.2. Renamed from network.dhcp.enabled in ZentriOS 3.0.

See Networking and Security, DHCP Client.

Arguments

<0/off/false/1/on/true>

Default

1

Properties

Supported Platforms

Get example

> get wl d e
R000003
1

Set example

> set wl d e off
R000008
Set OK

wlan.dhcp.cache_enabled

Abbreviationwl d c
Accessget/set

Description

When DHCP caching is enabled, the received DHCP IP address and corresponding lease time is cached to RAM. When the device is put to sleep (via sleep command or system.gotosleep.timeout, or rebooted via the reboot command, the RAM cache and corresponding timestamp is saved to NVM.

Upon rebooting the saved DHCP IP is restored and the lease time is updated with the amount of time that has elapsed since it was last stored. DHCP IP caching can save a considerable amount of time when re-connecting to the network as the full DHCP sequence is skipped (assuming there is enough time left on the DHCP lease).

See Networking and Security, DHCP Client.

Arguments

<0/off/false/1/on/true>

Default

1

Properties

Supported Platforms

Get example

> get wl d c
R000003
1

Set example

> set wl d c 0
R000008
Set OK

wlan.dhcp.hostname

Abbreviationwl d h
Accessget/set

Description

Configures the DHCP client's hostname (DHCP option 12) sent to the DHCP server.

See Networking and Security, DHCP Client.

Arguments

<hostname>

Default

Zentri-# where # is replaced by the last three digits of the WLAN MAC address

Properties

Supported Platforms

Get example

> get wl d h
R000009
Zentri-#

Set example

> set wl d h my_dhcp_client
R000008
Set OK

wlan.dhcp.timeout

Abbreviationwl d t
Accessget/set

Description

Amount of time in seconds the module waits as a client for an IP from a DHCP server. See wlan.dhcp.enabled.

See Networking and Security, DHCP Client.

Arguments

<timeout_seconds> Range: 1-255 seconds

Default

15

Properties

Supported Platforms

Get example

> get wl d t
R000004
15

Set example

> set wl d t 25
R000008
Set OK

wlan.hide_passkey

Abbreviationwl h
Accessget/set

Description

Hide the variable wlan.passkey. Once hidden, a factory reset must be issued to reset this variable and reveal the (reset value) of the passkey.

Note: Don't forget to save before reboot!

See Procedure for Joining a WLAN Network.

Arguments

<0/off/false/1/on/true>

Default

0

Properties

Supported Platforms

Get example

> get wl h
R000003
0

Set example

> set wl h true
R000008
Set OK
> save
R000009
Success
> get wlan.passkey
R000008
******

wlan.info

Abbreviationwl i
Accessget

Description

WLAN connection status parameters: state, SSID, BSSID, channel and datarate

Arguments

-

Default

<varies>

Supported Platforms

Get example

> get wlan.info
state: up
SSID: Zentri
BSSID: 30:85:A9:E7:9C:B0
channel: 6
datarate: 450.0

wlan.join.result

Abbreviationwl j s
Accessget

Description

Result of most recent join attempt. Returns a code:

CodeDescription
0Haven't tried to join
1Success - Joined network
2Joining network
3SSID not set
4No password set and AP requires security
5Specified security not supported by AP
6Network not found
7Failed to join network. All attempts to join have failed
8Join aborted. network_down called while trying to join

See Procedure for Joining a WLAN Network.

Arguments

-

Default

<varies>

Supported Platforms

Get example

> get wl j s
1

wlan.join.retries

Abbreviationwl j r
Accessget/set

Description

Specifies the maximum number of attempts to join a WLAN network after issuing the network_up command (or any other command requiring network access when the network is down).

See Procedure for Joining a WLAN Network.

If the network_down command is issued while attempting to join a network, the subsequent attempts are canceled.

Note that wlan.join.retries is separate from the wlan.auto_join.retries variable. If wlan.auto_join.retries > 0, then the total number of retries is calculated by the multiplication of wlan.join.retries with wlan.auto_join.retries.

Arguments

<retries> where '' is an integer ranging 1-255.

Default

3

Properties

Supported Platforms

Get example

> get wl j r
R000003
5

Set example

> set wl j r 5
R000008
Set OK

wlan.join.timeout

Abbreviationwl j t
Accessget/set

Description

The maximum amount of time to wait while the module attempts to join a network.

See Procedure for Joining a WLAN Network.

Arguments

<timeout in ms>

Default

7000 ms

Properties

Supported Platforms

Get example

> get wlan.join.timeout
R000006
7000

Set example

> set wl j t 5000
R000008
Set OK

wlan.mac

Abbreviationwl m
Accessget

Description

Returns the wlan MAC address.

Arguments

-

Default

varies

Properties

Supported Platforms

Get example

> get wl m
R000019
4C:55:CC:01:23:45

wlan.multicast.address

Abbreviationwl m a
Accessget

Description

Configure UDP multicast address range.

When the WLAN interface is brought up, it joins the configured multicast group address. When the interface is brought down it leaves the multicast group address.

Notes

The valid multicast group address range is 224.0.0.0 to 239.255.255.255

0.0.0.0 disables the multicast feature

Multicast is supported only by the UDP client and server. The TCP protocol does not support multicast.

Arguments

<IP address range>

where:

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl m a
0.0.0.0

Set example

> set wl m a 239.0.0.255
Set OK

wlan.network.dns

Abbreviationwl n d
Accessget

Description

Return a comma separated list of the DNS server addresses that the wlan interface is using.

Note: To set a static DNS address list, use the wlan.static.dns variable.

See Networking and Security, DNS Client

Arguments

-

Default

0.0.0.0 (i.e. No DNS addresses in use)

Properties

Supported Platforms

Get example

> get wl n d
10.5.6.1

wlan.network.gateway

Abbreviationwl n g
Accessget

Description

Returns the wlan interface IPv4 gateway IP address resolved by DHCP.

Note: To set a static gateway, use the wlan.static.gateway variable.

Arguments

-

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl n g
R000013
192.168.0.1

wlan.network.ip

Abbreviationwl n i
Accessget

Description

Returns the wlan interface IPv4 IP address resolved by DHCP.

Note: To set a static IP address, use the wlan.static.ip variable.

Arguments

-

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl n i
R000014
192.168.0.79

wlan.network.netmask

Abbreviationwl n n
Accessget

Description

Returns the wlan interface IPv4 netmask resolved by DHCP.

Note: To set a static netmask, use the wlan.static.netmask variable.

Arguments

-

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl n n
R000015
255.255.255.0

wlan.network.status

Abbreviationwl n s
Accessget

Description

Returns the wlan network status. 0 = down, 1 = WLAN connected, 2 = IP network connected (with a valid IP address)

Arguments

-

Default

0

Properties

Supported Platforms

Get example

> get wl n s
R000003
2

wlan.network.status_gpio

Abbreviationwl n o
Accessget/set

Description

The GPIO used to indicate network connectivity status. GPIO low = not connected, GPIO high = the default network interface is connected and has an IP address.

See also system.oob.gpio.

Arguments

<GPIO#>

Default

-1

Properties

Supported Platforms

Get example

> get wl n o
R000004
-1

Set example

> set wl n o 4
R000008
Set OK

wlan.passkey

Abbreviationwl p
Accessget/set

Description

The WPA passphrase, WPA PSK or WEP key used when connecting to a Wi-Fi Access Point.

Notes for WEP

Arguments

<passphrase> / <WEP key>Description
WPA Passphraselength: 8 - 63 characters
WPA PSKlength: 64 characters
WEP KeyA 40-bit WEP key is specified as a 5-byte hex string, for example: 1122334455
A 104-bit WEP key is specified as 13-byte hex string, for example: 112233445566778899aabbccdd
""Sets a NULL passphrase

Default

""

Properties

Supported Platforms

Get example

> get wl p
R000000

Set example

> set wl p "Use the force!"
R000008
Set OK

wlan.powersave.listen_interval

Abbreviationwl p l
Accessget/set

Description

The Wi-Fi sub-system remains in low power mode for a period specified in units of DTIM intervals (typically multiples of 100ms).

Arguments

<sleep time>

Default

0

Properties

Supported Platforms

Get example

> get wl p l
R000003
0

Set example

> set wl p l 90
R000008
Set OK

wlan.powersave.mode

Abbreviationwl p m
Accessget/set

Description

Wi-Fi powersave mode. For lowest poweruse mode = 1.

Arguments

<mode>

valueDescription
0no powersave
1powersave with PS-Poll. Lowest power mode
2powersave optimised to maintain throughput

Default

0

Properties

Supported Platforms

Get example

> get wl p m
R000003
0

Set example

> set wl p m 2
R000008
Set OK

wlan.powersave.sleep_delay

Abbreviationwl p s
Accessget/set

Description

Return to sleep delay in milliseconds when wlan.powersave.mode = 2 is used. Longer delays increase power consumption but may improve throughput performance. is in the range 10-100ms in increments of 10ms.

Arguments

<delay>

Default

10

Properties

Supported Platforms

Get example

> get wl p s
R000004
10

Set example

> set wl p s 40
R000008
Set OK

wlan.rate.protocol

Abbreviationwl r p
Accessget/set

Description

WLAN client data rate protocol selection.

Arguments

<11b/11g/auto>

ValueDescription
11bRestrict 802.11 PHY data rates to 802.11b
11gRestrict 802.11 PHY data rates to 802.11g
autoAutomatically select the best rate from all 802.11b/g/n rates

Default

auto

Properties

Supported Platforms

Get example

> get wl r p
auto

Set example

> set wlan.rate.protocol 11b
Set OK

wlan.rate.transmit

Abbreviationwl r x
Accessget/set

Description

Force the WLAN interface to transmit at a fixed data rate. The transmit rate is taken from valid rates specified by wlan.rate.protocol.

Arguments

<rate> where:

valueDescription
autoauto rate selection
1, 2, 5.5, 11protocol = 802.11b
6, 9, 12, 18, 24, 36, 48, 54protocol = 802.11g
mcs0, mcs1, mcs2, ... , mcs7protocol = 802.11n 1x1

Default

auto

Properties

Supported Platforms

Get example

> get wl r x
5.5

Set example

> set wlan.rate.transmit mcs3
Set OK

wlan.region

Abbreviationwl g
Accessget/set

Description

The WLAN region determines the available Wi-Fi channels and sets a limit on Tx power for the module.

The table below shows the permitted channels and Tx power for the different Regions. Note the maximum transmit power for the AMW004, AMW006 and AMW106 modules is 18dBm.

USAEuropeJapanROW (Rest of World)
Wi-Fi channels1-111-131-131- 13
Transmit power1818 - antenna_gain18 - antenna_gain18

For the eu and jp regions, the variable wlan.tx_power must be set to the maximum power corresponding to the module minus the measured antenna gain.

To set channels used, see wlan.scan.channel_mask.

Arguments

<eu / jp / us / row>

Default

us

Properties

Supported Platforms

Get example

> get wl g
us

Set example

> set wl g eu
Set OK

wlan.roam.threshold

Abbreviationwl r t
Accessget/set

Description

The wlan interface searches for a new AP to connect to once the signal from the AP it is currently associated with drops below the roam trigger level. The trigger level is specified in dBm in the range -1 to -99.

Arguments

<dBm>

Default

-99

Properties

Supported Platforms

Get example

> get wl r t
R000005
-99

Set example

> set wl r t -70
R000008
Set OK

wlan.rssi_average

Abbreviationwl r
Accessget/set

Description

The number of consecutive wlan RSSI readings to average. Averaging smooths variations in the measured signal strength of the AP. Set to 0 to disable averaging.

Arguments

<# readings>

Default

5

Properties

Supported Platforms

Get example

> get wl r
R000003
5

Set example

> set wl r 12
R000008
Set OK

wlan.scan.active_dwell

Abbreviationwl s a
Accessget/set

Description

Time spent listening on a channel when actively scanning for APs.

Arguments

<milliseconds>

Default

75

Properties

Supported Platforms

Get example

> get wl s a
R000004
75

Set example

> set wl s a 90
R000008
Set OK

wlan.scan.channel_mask

Abbreviationwl s m
Accessget/set

Description

Channels to scan. Specified by a hex bitmask.

Arguments

<channel_bitmask> where bits correspond to channels, as shown in the following examples:

Channels :13121110987654321channel_bitmask
Channel 1 only00000000000010x001
Channels 11/6/100100001000010x421
All US region channels00111111111110x7FF
All EU, Japan, Rest of World channels11111111111110x1FFF

Note: Availability of channels 12 and 13 depends on the wlan.region.

Default

0x7FF

Properties

Supported Platforms

Get example

> get wl s m
R000007
0x7FF

Set example

Set channels 11 & 1 only

> set wl s m 0x401
R000008
Set OK

wlan.scan.home_dwell

Abbreviationwl s h
Accessget/set

Description

Time spent listening on the softap home channel when scanning in softap mode.

Arguments

<milliseconds>

Default

50

Properties

Supported Platforms

Get example

> get wl s h
R000004
50

Set example

> set wl s h 70
R000008
Set OK

wlan.scan.num_probes

Abbreviationwl s n
Accessget/set

Description

Number of 802.11 probes to send when actively scanning.

Arguments

<# probes>

Default

3

Properties

Supported Platforms

Get example

> get wl s n
R000003
3

Set example

> set wl s n 5
R000008
Set OK

wlan.scan.passive_dwell

Abbreviationwl s p
Accessget/set

Description

Time spent listening on a channel when passive scanning.

Arguments

<milliseconds>

Default

110

Properties

Supported Platforms

Get example

> get wl s p
R000005
110

Set example

> set wl s p 130
R000008
Set OK

wlan.scan.retries

Abbreviationwl s r
Accessget/set

Description

Number of times to repeat a full scan when the scan command is issued.

Arguments

<# retries>

Default

3

Properties

Supported Platforms

Get example

> get wl s r
R000003
3

Set example

> set wl s r 5
R000008
Set OK

wlan.scan.type

Abbreviationwl s t
Accessget/set

Description

Type of scan. Passive is listen-only, active transmits 802.11 probe management frames.

Arguments

<passive/active>

Default

active

Properties

Supported Platforms

Get example

> get wl s t
R000008
active

Set example

> set wl s t passive
R000008
Set OK

wlan.security

Abbreviationwl c
Accessget/set

Description

The wlan security type. If set to Auto, the security type is automatically populated when joining a network (except WEP). Alternatively, the security type may be forced to one of the options listed in Arguments below.

Notes for WEP

See Procedure for Joining a WLAN Network.

Arguments

<security type>

Options:

Default

Auto

Properties

Supported Platforms

Get example

> get wl c
R000006
Auto

Set example

> set wl c WPA2-AES
R000008
Set OK

wlan.ssid

Abbreviationwl s
Accessget/set

Description

The name of the AP the wlan client interface will attempt to join.

See Procedure for Joining a WLAN Network.

Arguments

<ssid>

Default

""

Properties

Supported Platforms

Get example

> get wl s
R000012
My Home AP

Set example

> set wl s "Obi-wan Kenobi"
R000008
Set OK

wlan.static.dns

Abbreviationwl t d
Accessget/set

Description

DNS server address if static network settings are used for the wlan interface.

See Networking and Security, DNS Server.

Arguments

<[IP address]/[host name]>

Default

8.8.8.8

Properties

Supported Platforms

Get example

> get wl t d
R000009
8.8.8.8

Set example

> set wl t d 8.8.4.4
R000008
Set OK

wlan.static.gateway

Abbreviationwl t g
Accessget/set

Description

Gateway address if static network settings are used for the wlan interface.

Arguments

<IP address>

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl t g
R000009
0.0.0.0

Set example

> set wl t g 192.168.0.1
R000008
Set OK

wlan.static.ip

Abbreviationwl t i
Accessget/set

Description

Local IP address if static network settings are used for the wlan interface.

Arguments

<IP address>

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl t i
R000009
0.0.0.0

Set example

> set wl t i 192.168.0.2
R000008
Set OK

wlan.static.netmask

Abbreviationwl t n
Accessget/set

Description

Netmask if static network settings are used for the wlan interface.

Arguments

<network mask>

Default

0.0.0.0

Properties

Supported Platforms

Get example

> get wl t n
R000009
0.0.0.0

Set example

> set wl t n 255.255.255.0
R000008
Set OK

wlan.tx_power

Abbreviationwl t
Accessget/set

Description

The Wi-Fi RF transmit power in units of dBm. Range is 0-31. The maximum achievable transmit power is dependent on the capability of the module (see Module Comparison).

Transmit power is also restricted by regulatory bodies. The maximum permitted Tx power depends on the wlan.region setting.

The maximum transmit power is module dependent. The limit is +18dBm for the AMW004, AMW006 and AMW106 modules in all regions.

The value auto sets wlan.tx_power to the maximum value permitted in the wlan.region. This gives the correct maximum value for all regions, unless using an external antenna in the eu (Europe) and jp (Japan) regions.

Regulatory Compliance in Europe & Japan

In Europe and Japan, the antenna gain must be taken into account to limit transmit power to +18dBm. Antenna gain is subtracted from the maximum of +18dBm to calculate the value of wlan.tx_power.

For a device with an internal antenna, the known antenna gain is programmed into the firmware, and is automatically subtracted by ZentriOS.

For a device with an external antenna, the antenna gain must be measured, and the maximum wlan.tx_power value manually set to:

wlan.tx_power = 18 - antenna_gain

Arguments

0-31/auto

Default

auto

Properties

Supported Platforms

Get example

> get wl t
R000006
auto

Set example

> set wl t 15
R000008
Set OK