WiConnect Variables

This page provides a list of WiConnect variables with a full description of the function of each variable together with example usage.

Variables are cached in volatile RAM and must be saved to non-volatile flash memory to persist between reboots. To save variables to flash, use the save command. Some variables impact the operation of the entire system, wake and sleep timers for example. A save and reboot is required before new settings for these types of variables take effect.

Shortcuts

A shortcut is assigned to each variable. The format for shortcuts is shown in the following table. The shortcut is a hybrid of the first two characters of the first word of the variable name, plus (typically) the first character of the second word (if a second word exists), plus (typically) the first character of the third word of the variable name (if a third word exists). Each of these characters is separated by a space character. In some instances, it was not possible to use the first letter of the second or third word in the variable name, in these cases another letter has been somewhat arbitrarily chosen.

Variable NameShortcut
Templatefirst_word.second_word.third_wordfi s t
Example 1time.uptimeti u
Example 2wlan.scan.retrieswl s r

Documentation Format

Many WiConnect responses shown in the examples on this page were captured with system.print_level = 0, and system.cmd.header_enabled = 1. These machine friendly settings make it easy for a host MCU to parse responses by examining response headers. Documentation for each variable is provided in the format shown below.

variable

Abbreviationvar
Accessget/set

Description

A description of variable function.

Arguments

A full list of mandatory and optional arguments.

Default

The factory reset default value.

Get example

An example of how to read the variable, including response codes.

Set example

An example of how to write the variable, including response codes (for writeable variables).

NOTE! Don't forget to check out command navigation tips to make it easier to find and type specific variable names.

List of Variables

Variable Description


ALL

all

Abbreviationall
Accessget

Description

Returns a list of all variables

Arguments

-

Default

-

Get example

> get all
R003978
broadcast.data: mac,bssid,channel,ip,ssid,...
broadcast.http.host: None
broadcast.interface: default
broadcast.interval: 10
broadcast.udp.data: mac,bssid,channel,ip,ssid,...
broadcast.udp.interface: default
broadcast.udp.interval: 10
broadcast.udp.ip: 255.255.255.255
broadcast.udp.port: 55555
bus.data_bus: uart0
...

Broadcast

broadcast.data

Abbreviationbr d
Accessget/set

Description

A comma separated list of information fields to be periodically transmitted in a UDP packet or sent to a remote HTTP server. See the Broadcast UDP Packet application note.

Arguments

<csv list> where <csv list> is a comma separated value list constructed from:

List ItemDescription
adcXCurrent value of ADC X
bssidwlan interface -> BSSID of the AP
channelWi-Fi radio channel
gpioXCurrent state of GPIO X
ipnetwork.ip - Current IP address
macwlan.mac - wlan MAC address
namemdns.name
remote_terminal_portremote_terminal.port inbound network port for the remote terminal
rssiwlan.rssi_average - wlan interface -> RSSI of the AP
ssidwlan.ssid - wlan interface -> SSID of the AP
timeWiConnect local time
uuidsystem.uuid - Hardware ID
versionsystem.version - Firmware version

Default

mac,bssid,channel,ip,ssid,rssi,remote_terminal_port,time,version,uuid

Get example

> get br d
R000033
mac,bssid,channel,version,gpio0

Set example

> set br d mac,bssid,channel
R000008
Set OK

broadcast.http.host

Abbreviationbr h h
Accessget/set

Description

When specified, periodically issue JSON formatted data to the specified host as an HTTP(S) post request. If null, the HTTP post function is disabled. The post may be to an unencrypted or HTTPS secure webserver. If a non-standard HTTP/HTTPS port is required, the port may be appended to the end of the URL, for example myserver.com:3002. The URL must be prefixed with https:// for HTTPS secure connections on the default port 443.

Arguments <http_host>

Default

Null

Get example

> get br h h
myhttpserver.com
Set OK

Set example

> set br h h myhttpserver.com
Set OK

Set example 2

> set br h h https://mysecureserver.com
Set OK

broadcast.interface

Abbreviationbr i
Accessget/set

Description

The default interface used to transmit informational packets.

If set to default, uses the interface specified in network.default_interface

Arguments

<wlan/softap/default>

Default

default

Get example

> get br i
R000006
wlan

Set example

> set br i softap
R000008
Set OK

broadcast.interval

Abbreviationbr t
Accessget/set

Description

The time between transmission of informational packets. Units are in seconds.

To disable both UDP and HTTP broadcast, set the interval to 0.

Arguments

<seconds>

Default

10

Get example

> get br t
R000004
10

Set example

> set br t 20
R000008
Set OK

broadcast.udp.data

Abbreviationbr u d
Accessget/set

This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.data.

broadcast.udp.interface

Abbreviationbr u i
Accessget/set

This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.interface.

broadcast.udp.interval

Abbreviationbr u t
Accessget/set

This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.interval.

broadcast.udp.ip

Abbreviationbr u a
Accessget/set

Description

Informational UDP packets are sent to this IP address.

To enable general UDP broadcast, set the IP address to 255.255.255.255 (default), i.e

set broadcast.udp.ip 255.255.255.255

To disable UDP broadcast, set the IP address to 0.0.0.0, i.e

set broadcast.udp.ip 0.0.0.0

Alternatively, set broadcast.interval to 0 to disable both UDP and HTTP broadcast.

Arguments

<IP address>

Default

255.255.255.255

Get example

> get br u a
R000017
255.255.255.255

Set example

> set br u a 192.168.1.255
R000008
Set OK

broadcast.udp.port

Abbreviationbr u p
Accessget/set

Description

Informational UDP packets are sent to this port.

Arguments

<port>

Default

55555

Get example

> get br u p
R000007
55555

Set example

> set br u p 50007
R000008
Set OK

Bus

bus.command.read_timeout

Abbreviationbu c t
Accessget/set

Description

Controls the maximum amount of time that the read command waits to complete a read.

The amount of data to be read is specified in the parameters of the read command.

Note: a timeout still returns success.

Arguments

<timeout ms> where:

Default

100 Range: 0 - 65535

Get example

> get bu c t
R000005
100

Set example

> set bu c r 256
R000008
Set OK

bus.command.rx_bufsize

Abbreviationbu c r
Accessget/set

Description

Configure the size of the UART rx buffer in command mode.

Arguments

<buffer size>

Default

256 (bytes) Range 256 to 10000 bytes

Get example

> get bu c r
R000005
256

Set example

> set bu c r 512
R000008
Set OK

{*

bus.command.tx_bufsize

Abbreviationbu c ?
Accessget/set

Description

NOT IMPLEMENTED YET Configure the size of the UART tx buffer in command mode.

Arguments

<buffer size>

Default

256 (bytes) Range 256 to 10000 bytes

Get example

> get bu c t
R000005
256

Set example

> set bu c t 512
R000008
Set OK

*}

bus.command.write_timeout

Abbreviationbu c w
Accessget/set

Description

Controls the maximum amount of time the write command blocks waiting for more data to be read from the data bus.

Note: On timeout the command fails.

Arguments

<timeout ms> where:

Default

25000 Range: 0 - 65535 ms

Get example

> get bu c w
R000007
25000

Set example

> set bu c w 60000
R000008
Set OK

bus.data_bus

Abbreviationbu d
Accessget/set

Description

The serial data bus to use for communication with a host.

Arguments

<uart0/uart1>

Default

<platform dependent>

Get example

> get bu d
R000007
uart1

Set example

> set bu d uart0
R000008
Set OK

bus.log_bus

Abbreviationbu l
Accessget/set

Description

All log messages are sent to this serial bus regardless of bus mode.

Arguments

<uart0/uart1>

Default

<platform dependent>

Get example

> get bu l
R000007
uart1

Set example

> set bu l uart0
R000008
Set OK

bus.mode

Abbreviationbu m
Accessget/set

Description

The serial bus mode.

Arguments

<command/stream>

Default

command

Get example

> get bu m
R000009
command

Set example

> set bu m command
R000008
Set OK

bus.stream.cmd_gpio

Abbreviationbu s g
Accessget/set

Description

The GPIO used to force the module into command mode (from stream mode). A value of -1 disables this feature.

Arguments

<[GPIO#]/[-1]>

Default

0

Get example

> get bu s g
R000003
0

Set example

> set bu s g 6
R000008
Set OK

bus.stream.cmd_seq

Abbreviationbu s s
Accessget/set

Description

Break-in sequence for stream mode. After 3 seconds of inactivity on the serial interface, sending the break-in sequence changes stream mode to command mode; send 'exit' to return to stream mode.

Note: The length of the break-in sequence affects the allowed minimum value of bus.stream.flush_count.

Arguments

<1-15 characters>

Default

$$$

Get example

> get bu s s
R000005
$$$

Set example

> set bu s s ###
R000008
Set OK

bus.stream.flush_count

Abbreviationbu s c
Accessget/set

Description

Number of bytes received on the serial bus before flushing to the network stream.

Arguments

<count> where <count> can range from minimum value to maximum value:

Default

1460

Get example

> get bu s c
R000006
1460

Set example

> set bu s c 1450
R000008
Set OK

bus.stream.flush_time

Abbreviationbu s t
Accessget/set

Description

Timeout in milliseconds before bytes are automatically flushed to the network stream.

If set to 0, automatic flush is disabled.

To achieve optimal throughput, set flush time to 0. WiConnect transfers data with 'Zero Copy'. i.e. a data packet is directly transferred from the bus to network or network to bus.

Arguments

<0-65535>

Default

50

Get example

> get bu s t
R000004
20

Set example

> set bu s t 10
R000008
Set OK

bus.stream.flush_time_reset

Abbreviationbu s r
Accessget/set

Description

Flag whether to reset the flush timer if data is received before the flush timeout expires. When this variable is set and data is streaming, data is flushed only when the buffer is full. This allows for efficient use of the packet buffer and prevents packet fragmentation. When the variable is reset, the buffer is flushed at intervals of bus.stream.flush_time and also when the buffer is full. This allows data to be sent at consistent intervals.

Arguments

<1/0>

Default

0

Get example

> get bus.stream.flush_time_reset
0

Set example

> set bus.stream.flush_time_reset 1
Set OK

Email

email.name_address

Abbreviationem n
Accessget/set

Description

The email name and/or address registered with the SMTP server used by the smtp_send command. This is shown as the name and/or email address of the email sender. It may be overridden by the SMTP server.

The name and/or email address is supplied in the standard format for Internet Address Specifications. For further information see Section 3.4, RFC-2822.

The following get example shows an address only format, and the set example shows an example of a name and address.

Arguments

<name_address> in either of the forms:

Default

None

Get example

> get email.name_address
no.name@example.com

Set example

> set em n "Firstname Lastname <first.last@mydomain.com>"
Set OK
> get em n
Firstname Lastname <first.last@mydomain.com>

email.smtp.host

Abbreviationem s h
Accessget/set

Description

The SMTP server host (e.g. smtp.myemail.com) used by the smtp_send command.

Arguments

<host string>

Default

None

Get example

> get email.smtp.host
smtp.example.com

Set example

> set em s h smtp.myemail.com
Set OK

email.smtp.password

Abbreviationem s w
Accessget/set

Description

The SMTP server login password used by the smtp_send command. This is optional depending on the SMTP host: email.smtp.host.

Arguments

<password>

Default

None

Get example

> get email.smtp.password
abc123

Set example

> set em s w loooong_SECR3T_password
Set OK

email.smtp.port

Abbreviationem s p
Accessget/set

Description

The SMTP server port used by the smtp_send command. Standard non-encrypted port is 25. Standard encrypted (TLS) port is 587.

Arguments

<port_number> Range: 1 - 65535

Default

587

Get example

> get email.smtp.port
25

Set example

> set em s p 587
Set OK

email.smtp.username

Abbreviationem s u
Accessget/set

Description

The SMTP server login username used by the smtp_send command. This is optional depending on the SMTP host: email.smtp.host.

Arguments

<user_name>

Default

None

Get example

> get email.smtp.username
No Name

Set example

> set email.smtp.user "Firstname Lastname"
Set OK 
> get em s u
Firstname Lastname

goHACK.me

ghm.capabilities

Abbreviationgh c
Accessget

Description

Returns the name of the goHACK.me capabilities file used by the device. Use the ghm_capabilities command to manipulate the capabilities file.

Arguments

-

Default

ghm_capabilities.json

Get example

> get ghm.capabilities
R000023
ghm_caps_pwm_adc.json

ghm.cache_size

Abbreviationgh s
Accessget/set

Description

The maximum number of stream samples to store locally (per stream) before samples are automatically pushed to goHACK.me. All cached stream samples are automatically pushed to goHACK.me when the number of cached samples for any stream exceeds the cache size.

Arguments

<#samples>

Default

50

Get example

> get ghm.cache_size
R000004
50

Set example

> set ghm.cache_size 20
R000008
Set OK

ghm.solo.echo

Abbreviationgh o c
Accessget/set

Description

After the device synchronizes with goHACK.me, any control parameter changes are echoed to the bus.log_bus in a comma separated list format.

Arguments

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

Default

0

Get example

> get ghm.solo.echo
0

Set example

> set ghm.solo.echo 1
Set OK

ghm.solo.enabled

Abbreviationgh o e
Accessget/set

Description

In solo mode, the device automatically monitors and controls GPIOs without help from an external host. GPIOs connected to streams are automatically sampled and pushed to goHACK.me, and control parameters are automatically pulled from goHACK.me and new values are applied to control GPIOs.

Arguments

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

Default

0

Get example

> get ghm.solo.enabled
0

Set example

> set ghm.solo.enabled 1
Set OK

ghm.solo.gpio

Abbreviationgh o g
Accessget/set

Description

Assign a GPIO to a goHACK.me stream or control parameter in solo mode. Streams are GPIO inputs, controls are GPIO outputs.

Arguments

<GPIO#> <slug/none> [<function> [config] ]

where parameters are as follows:

FunctionDescription
inInput, high impedance (default for streams)
inpuInput, pull up
inpdInput, pull down
outOutput (default for controls)
out_odOutput, open drain
out_od_puOutput open drain, pull up
adcAnalog-Digital Converter.
The default value is specified in the capabilities file.
dacDigital-Analog Converter.
The default duty cycle and (optional) default frequency are specified in the capabilities file.
pwmPulse Width Modulator output.
The default value is specified in the capabilities file.
pulsePulsed GPIO output.
The inactive level is specified in the capabilities file.
GPIO typeConfiguration SpecificationDescription
Input GPIOs
(streams only)
in <rising / falling / both>Edge detection.
A stream sample is taken each time a rising or falling (or both) edge occurs on the GPIO input.
Output GPIOs
(controls only)
pulse [length]Pulsed output.
If pulse is specified, the GPIO output is pulsed once each time the control parameter is set. The pulse length is specified in multiples of 10 milliseconds and defaults to 50 ms if the [length] option is omitted.
ADC lookup tableadc [<LUT filename>]Analog-Digital Converter lookup table. See Peripherals, ADC Lookup Tables. Example: set ghm.solo.gpio 7 thermistor adc therm_celsius_lut.csv
Pulse Width Modulationpwm [<frequency name>]The name of a control in the capabilities file that may be used to set the PWM frequency. If the frequency is not specified, it defaults to 1000 Hz.
Pulsed GPIOpulse [<pulse length>]Set the one-shot pulse length in units of tens of milliseconds.

Default

-

Get example

> get ghm.solo.gpio 10
control.led1 - opp

Set example

> set gpio.alias 10 GPIO10
Set OK
> set ghm.solo.gpio GPIO10 led1
Set OK

ghm.solo.sync_period

Abbreviationgh o s
Accessget/set

Description

Period (in seconds) to automatically sync with goHACK.me.

Arguments

[push/pull]

Default

20

Get example

> get ghm.solo.sync_period
20

Set example

> set ghm.solo.sync_period 4
Set OK

ghm.status

Abbreviationgh t
Accessget

Description

Get the device activation status. Local query only, does not query the goHACK.me server.

Arguments

-

Default

0

Get example

> get ghm.status
Device is activated
1

GPIO

gpio.alias

Abbreviationgp a
Accessget/set

Description

A GPIO alias name between 1-15 characters. GPIO name aliasing avoids the need to remember which GPIO is connected where. You can give the GPIO a recognisable name instead! Retrieve aliases with get gp a all. Remove an alias by setting to an empty double quoted string ("").

Arguments

<all> / <GPIO#> <alias name>

Default

Get example

> get gp a 6
R000008
MyGPIO

Set example

> set gp a 6 FrontDoor
R000008
Set OK

gpio.config_file

Abbreviationgp c
Accessget/set

Description

A file used to configure and initialize GPIOs on bootup. The file may have multiple lines and must follow a specified format. Further information about GPIO configuration using system indicators is provided in Configuration and Setup, GPIO Configuration.

Arguments

<filename>

Default

gpio_config_init.csv

Get example

> get gp c
R000022
gpio_config_init.csv

Set example

> set gp c my_gpio_config.csv
R000008
Set OK

gpio.init

Abbreviationgp i
Accessget/set

Description

The initial direction and value of a GPIO after bootup/reset. Retrieve a list of GPIOs that will be initialized with the all option.

Arguments

<all> / <GPIO#> <direction> <initial value>

Default

<none for unassigned GPIOs>

Get example

> get gp i 0
R000021
output_open_drain 1

Set example

> set gp i 0 out 1
R000008
Set OK

gpio.sleep

Abbreviationgp s
Accessget/set

Description

Set the state of the specified GPIO when sleeping.

GPIOs are initialized is as follows:

Arguments

<all> / <GPIO#> <state> where state is one of the following:

StateDescription
defaultfactory default state
input_highzinput high impedance
input_pull_downinput pull down
input_pull_upinput pull up
output_highoutput high
output_lowoutput low

Default

default

Get example

> get gp s 0
input_pull_up

Set example

> set gp s 0 output_low
Set OK

gpio.usage

Abbreviationgp u
Accessget

Description

Returns information about which GPIOs have been registered for functions, and which have standard I/O options set. GPIOs may be de-registered by setting the GPIO to -1 using the appropriate variable. e.g. set ioconn.status_gpio -1. See Peripherals.

Arguments

-

Default

<platform dependent>

Get example

> get  gp u
!  # Description
#  0 GPIO input_highz
#  1 system.indicator.wlan
#  2 system.indicator.network
#  5 system.indicator.softap
# 11 setup.control_gpio
# 13 UART1 RX
# 14 UART1 TX
# 17 SPI0 CLK
# 18 SPI0 MOSI
# 19 SPI0 MISO
# 21 GPIO output
# 22 GPIO output

HTTP Server

http.server.api_enabled

Abbreviation ht s a
Accessget/set

Description

Enable the HTTP Server RESTful API. See Networking and Security, HTTP Server RESTful API.

The API is enabled by default, so enabling the HTTP server with http.server.enabled also allows access to the API. To disable HTTP RESTful API calls when the HTTP server is running, set http.server.api_enabled to 0.

Arguments

<0/1>

Default

1

Get example

> get http.server.api_enabled
1

Set example

> set ht s a 0
Set OK

http.server.cors_origin

Abbreviation ht s c
Accessget/set

Description

Specifies origins for which the web browser same-origin policy is relaxed.

If <origin> is set to an empty string, then CORS is completely disabled.

For requests without credentials, a value of * acts as a wildcard, allowing any origin to access the resource.

See HTTP Server RESTful API, CORS.

Arguments

<origin>

Default

"" (empty string). To set the http.server.cors_origin variable to the empty string, supply an argument with two double quotes: ""

Get example

get http.server.cors_origin

Set example

set ht s c *
Set OK

http.server.denied_filename

Abbreviation ht s d
Accessget/set

Description

Specify the file name of the page to be displayed in the event that the HTTP server denies authentication.

Arguments

<filename>

Default

''

Get example

get http.server.denied_filename

Set example

set ht s d access_denied.html
Set OK

http.server.enabled

Abbreviation ht s e
Accessget/set

Description

Enable the HTTP server. See Networking and Security, HTTP Server RESTful API.

Arguments

<1/0>

Default

0

Get example

> get ht s e
0

Set example

> set ht s e 1
Set OK

http.server.interface

Abbreviation ht s i
Accessget/set

Description

Specifies the network interface used by the HTTP server. See Networking and Security, HTTP Server RESTful API.

Arguments

<default/softap/wlan>

Default

default

Get example

> get http.server.interface
default

Set example

> set ht s i wlan
Set OK

http.server.max_clients

Abbreviation ht s m
Accessget/set

Description

Specifies the maximum number of clients the HTTP server allows to connect.

Restricting connected clients may be necessary to limit memory usage. See Memory.

Arguments

<clients>

Range: 1 - 8

Default

3

Get example

> get http.server.max_clients
3

Set example

> set ht s m 1
Set OK

http.server.notfound_filename

Abbreviation ht s n
Accessget/set

Description

Specifies the filename of the web page to be displayed in the event that the HTTP server reports a 404 - not found error. <filename>

Default

''

Get example

get http.server.notfound_filename

Set example

set ht s n notfound.html
Set OK

http.server.password

Abbreviation ht s w
Accessget/set

Description

Set the password of the http server. The username MUST be set as well for the http server to start.

See HTTP Server Security and Authorization.

Arguments

<password>

Default

null

Get example

> get ht s w
secretpassword

Set example

> set ht s w secretpassword
Set OK

http.server.port

Abbreviation ht s p
Accessget/set

Description

Set the port on which the HTTP server listens. See Networking and Security, HTTP Server RESTful API.

Arguments

<listening port>

Default

80

Get example

get ht s p
80

Set example

set http.server.port 8080
Set OK

http.server.root_filename

Abbreviation ht s r
Accessget/set

Description

This sets or gets the root file of the HTTP server. If a plain request to http:// is issued, with no url specified, this file is returned.

See Networking and Security, HTTP Server RESTful API.

Arguments

<filename>

Default

/setup/index.html

Get example

> get ht s r
/setup/index.html

Set example

> set http.server.root_filename /setup/home.html
Set OK

http.server.tls_cert

Abbreviation ht s l
Accessget/set

Description

The server TLS CA certificate filename.

Arguments

<filename>

Default

null

Get example

> get ht s c
mycert.pem

Set example

> set ht s c mycert.pem 
Set OK

http.server.tls_client_log

Abbreviationht s g
Accessget

Description

Return list of recently connected clients. Up to 8 clients are logged. When the log contains 8 clients and a new client is added, the oldest client is removed. Requires http.server.tls_log_clients to be enabled.

Arguments

-

Default

null

Get example

> get http.server.tls_client_log
! # Timestamp     Common Name
# 0 1422233232123 name@email.com
# 1 1422233232123 name2@email.com

Note: The timestamp shows the last time the client issued an HTTP request to the server, as system UTC time in milliseconds.

http.server.tls_enabled

Abbreviation ht s t
Accessget/set

Description

Enable server Transport Level Security (TLS).

Arguments

<1/0>

Default

0

Get example

> get ht s t
0

Set example

> set ht s t 1
Set OK

http.server.tls_key

Abbreviation ht s k
Accessget/set

The server TLS certificate key filename.

Arguments

<filename>

Default

null

Get example

> get ht s k
mycert.key

Set example

> set ht s k mycert.key
Set OK

http.server.tls_log_clients

Abbreviationht s o
Accessget/set

Description

Enable/disable TLS client logging. http.server.tls_verify_peer must be enabled for this feature.

See http.server.tls_client_log

Arguments

<0|false/1|true>

Default

false

Get example

> get http.server.tls_log_clients
0

Get example

> set http.server.tls_log_clients 1
Set OK

http.server.tls_verify_peer

Abbreviation ht s v
Accessget/set

Description

When this variable is set, a connecting client must provide a valid TLS certificate that the server validates. The client is disconnected if the provided certifcate is invalid. Note: The http.server.tls_cert variable must be set if using this feature.

Arguments

<0/1>

Default

0

Get example

> get ht s v
0

Set example

> set ht s v 1
Set OK

http.server.username

Abbreviation ht s u
Accessget/set

Description

Set the username of the http server. The password MUST be set as well for the http server to start.

See HTTP Server Security and Authorization.

Arguments

<username>

Default

null

Get example

> get http.server.username
cyrano

Set example

> set ht s u cyrano
Set OK

http.server.ws_connected_gpio

Abbreviation ht s x
Accessget/set

Description

The GPIO used to indicate whether a websocket stream is connected. It is asserted when one or more websocket streams are open.

Note: Set to -1 to disable feature and free assigned GPIO.

See also system.oob.gpio.

Arguments

<gpio #>

Default

-1

Get example

> get http.server.ws_connected_gpio
-1

Set example

> set http.server.ws_connected_gpio 9
Set OK
> get gp u
!  # Description
...
#  9 http.server.ws_connected_gpio
...

http.server.ws_data_gpio

Abbreviation ht s y
Accessget/set

Description

The GPIO used to indicate whether a websocket stream has data available to read. It is asserted when one or more websocket streams have data to be read.

See also system.oob.gpio.

Note: Set to -1 to disable feature and free assigned GPIO.

Arguments

<gpio #>

Default

-1

Get example

> get http.server.ws_data_gpio
-1

Set example

> set http.server.ws_data_gpio 9
Set OK
> get gp u
!  # Description
...
#  9 http.server.ws_data_gpio
...

IO Connection

ioconn.control_gpio

Abbreviationio c
Accessget/set

Description

The GPIO used for control of the GPIO controlled network connection (stream). See the GPIO-Controlled Network Connection application note.

Arguments

<GPIO#>

Default

-1

Get example

> get io c
R000004
-1

Set example

> set io c 6
R000008
Set OK

ioconn.enabled

Abbreviationio e
Accessget/set

Description

Enable/disable the GPIO controlled network connection feature.

Arguments

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

Default

0

Get example

> get io e
R000003
0

Set example

> set io e true
R000008
Set OK

ioconn.local_port

Abbreviationio l
Accessget/set

Description

The local port associated with the GPIO controlled network connection, If 0, a random port is assigned.

Arguments

<port>

Default

0

Get example

> get io l
R000003
0

Set example

> set io l 30001
R000008
Set OK

ioconn.protocol

Abbreviationio p
Accessget/set

Description

The network protocol associated with the GPIO controlled network connection.

Arguments

<udp/tcp/tls/web>

Default

tcp

Get example

> get io p
R000005
tcp

Set example

> set io p udp
R000008
Set OK

ioconn.remote_host

Abbreviationio h
Accessget/set

Description

The remote host associated with the GPIO controlled network connection. An IP address or hostname may be specified.

Arguments

<IP address/hostname>

Default

-

Get example

> get > get io h
R000013
10.11.176.12

Set example

> set io h example.com
R000008
Set OK

ioconn.remote_port

Abbreviationio r
Accessget/set

Description

The remote port associated with the GPIO controlled network connection.

Arguments

<port>

Default

0

Get example

> get io r
R000003
0

Set example

> set io r 55000
R000008
Set OK

ioconn.status_gpio

Abbreviationio s
Accessget/set

Description

The GPIO used to indicate connection status when the GPIO controlled network connection feature is enabled.

See also system.oob.gpio.

Arguments

<GPIO#>

Default

-1

Get example

> get io s
R000004
-1

Set example

> set io s 13
R000008
Set OK

mDNS

mdns.enabled

Abbreviationmd e
Accessget/set

Description

Enable the mDNS daemon (i.e. background process). The process is started when the configured interface is brought up (see mdns.interface). If the network interface is already up when mDNS is enabled, bring the network interface down and up again to start mDNS (see network_down, network_up). See Networking and Security, Network Discovery.

Note: When mDNS is enabled, .local domains are first attempted to be resolved using mDNS. If the attempt fails, standard DNS is then attempted.

Arguments

<0/1>

Default

0

Set example

> set mdns.enabled 1
Set OK

Get example

> get md e
1

mdns.interface

Abbreviationmd i
Accessget/set

Description

The network interface on which the mDNS daemon runs. See Networking and Security, Network Discovery.

Arguments

<default/softap/wlan>

Default

default

Set example

> set mdns.interface wlan
Set OK

Get example

> get md i
wlan

mdns.name

Abbreviationmd n
Accessget/set

Description

The mDNS domain name of the module.

Note:

Arguments

<name>

Default

wiconnect-#

Set example

> set mdns.name MyDomain_#
Set OK

Get example

> get md n
MyDomain_#

mdns.service

Abbreviationmd s
Accessget/set

Description

Advertise a module server via mDNS. See Networking and Security, Network Discovery.

The corresponding server must be enabled and configured to auto-start before the service is advertised via mDNS.

Arguments

set syntax

<server name> [<name> [<txt> [<service type>] ] ] where:

<server name> - the name of a wiconnect server. The following servers are available:

<name> - optional, an additional name/description of the service. For example: Sensor HTTP Server

NOTE: To disable advertising of an mDNS service, set the <name> argument to -1

<txt> - optional, additional configuration settings for the service. This is a Bonjour style TXT Record, consisting of a string of = pairs, separated by an ASCII . character (code 0x2E). e.g. set mdns.service http "Test Server" "record1=on.record2=off.another=21"

<service type> - optional, the service registration type. (Note: .local is appended to the end) By default, the following server/service type is used:

get syntax

<server name> where:
<server name> is one of:

The response lists the attributes as follows: "<name>" "<txt>" <type> e.g.

>get md s http
"Test Server" "record1=on.record2=off.another=21" _http._tcp.local

If all is specified to list status of all servers, the response lists the servers and attributes as follows:

<server name> - <name>.type <txt>
...

e.g.

>get md s all
http - Test Server._http._tcp.local record1=on.record2=off.another=21
tcp - my_tcp_server._wiconnect._tcp.local
udp - Disabled
remote_terminal - Disabled

Default

-

Set example

Advertise tcp service as my_tcp_server

> set md s tcp my_tcp_server
Set OK
> get md s all
http - Disabled
tcp - my_tcp_server._wiconnect._tcp.local
udp - Disabled
remote_terminal - Disabled

Disable advertising of tcp service

> set md s tcp -1
Set OK
> set md s tcp -1
Set OK
> get md s all
http - Disabled
tcp - Disabled
udp - Disabled
remote_terminal - Disabled

Get example

> get md s tcp
"my_tcp_server" "" _wiconnect._tcp.local

mdns.ttl

Abbreviationmd t
Accessget/set

Description

Sets the timeout of the module's mDNS response in seconds: the "Time-to-Live" of a mDNS response from the module. This is essentially a timeout of the validity of a mDNS record. Once expired, a remote client will reprobe the module for an updated response. See Networking and Security, Network Discovery.

Arguments

<seconds> where <seconds> is in the range 1 - 65535.

Default

300

Set example

> set mdns.ttl 1000

Get example

> get mdns.ttl
1000

Network

network.buffer.rxtx_ratio

Abbreviationne b r
Accessget/set

Description

The percentage of the network buffer allocated to Rx.
Rx buffer pool size = network.buffer.size x (network.buffer.rxtx_ratio / 100)
Tx buffer pool size = network.buffer.size x ((100 - network.buffer.rxtx_ratio) / 100)
Value limits (%): Min: 10 Max: 90

Arguments

<percent_rx>

Default

50

Set example

> set ne b r 20
R000008
Set OK

Get example

> get ne b r
R000004
20

network.buffer.size

Abbreviationne b s
Accessget/set

Description

The total size of the network buffers, in bytes.
This is important for applications that have asymmetric data throughput requirements. If your app is heavily Tx (or Rx) centric, you can adjust the Tx and Rx buffer sizes accordingly to achieve maximum throughput.

This buffer is divided between the rx/tx buffers based on the network.buffer.rxtx_ratio variable.

This value is the amount of memory allocated from the dynamic memory section. The larger this value, the less memory available for other features.

This is an advanced feature. Take care when adjusting this value. The system may become unstable with certain values in certain applications.

Value limits and defaults (KB = 1024 bytes):

ModuleMinMaxDefault
Wallaby AMW0042048020KB7168070KB2048020KB
Numbat AMW1062048020KB7168070KB2048020KB
Numbat AMW0061024010KB4096040KB2048020KB

Arguments

<bytes>

Default

Set example

> set ne b s 22528
R000008
Set OK

Get example

> get ne b s
R000007
22528

network.buffer.usage

Abbreviationne b u
Accessget

Description

The approximate usage of the network TX & RX buffers as an integer percentage.

Arguments

-

Default

-

Get example

> get ne b u
R000013
RX:13,TX:78

network.ca_cert

Abbreviationne c
Accessget/set

Description

The default CA TLS certificate used with TLS network streams.
Note: PEM file format requires Unix format line termination: LF (\n), not Windows format: CR-LF (\r\n). Some terminal applications may append unwanted end-of-line characters. Incorrect line termination may result in TLS connection failure.

Arguments

<CA TLS cert filename>

Default

geotrust_ca.pem

Get example

> get ne c
R000017
geotrust_ca.pem

Set example

> set ne c globalsign_ca.pem
R000008
Set OK

network.default_interface

Abbreviationne f
Accessget/set

Description

The default network interface used by various network commands and variables.
Commands include: http_upload, http_download, network_up, network_down, ping, tcp_server start, udp_server start, tls_server start.
Variables include: broadcast.udp.interface, remote_terminal.interface, tcp.server.auto_interface, udp.server.auto_interface

Arguments

<wlan/softap>

Default

wlan

Get example

> get ne f
R000006
wlan

Set example

> set ne f softap
R000008
Set OK

network.dhcp

Description

Renamed to network.dhcp.enabled in WiConnect V2.0.0

network.dhcp.enabled

Abbreviationne 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 in WiConnect v1.2 and earlier.

Arguments

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

Default

1

Get example

> get ne d e
R000003
1

Set example

> set ne d e off
R000008
Set OK

network.dhcp.hostname

Abbreviationne d h
Accessget/set

Description

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

Arguments

<hostname>

Default

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

Get example

> get ne d h
R000009
ACKme-#

Set example

> set ne d h my_dhcp_client
R000008
Set OK

network.dhcp.timeout

Abbreviationne d t
Accessget/set

Description

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

Arguments

<timeout_seconds> Range: 1-255 seconds

Default

15

Get example

> get ne d t
R000004
15

Set example

> set ne d t 25
R000008
Set OK

network.dns

Abbreviationne 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 static.dns variable.

Arguments

-

Default

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

Get example

> get ne d
10.5.6.1

network.gateway

Abbreviationne g
Accessget

Description

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

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

Arguments

-

Default

0.0.0.0

Get example

> get ne g
R000013
192.168.0.1

network.ip

Abbreviationne i
Accessget

Description

Returns the wlan interface IPv4 IP address resolved by DHCP.

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

Arguments

-

Default

0.0.0.0

Get example

> get ne i
R000014
192.168.0.79

network.netmask

Abbreviationne n
Accessget

Description

Returns the wlan interface IPv4 netmask resolved by DHCP.

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

Arguments

-

Default

0.0.0.0

Get example

> get ne n
R000015
255.255.255.0

network.status

Abbreviationne 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

Get example

> get ne s
R000003
2

network.status_gpio

Abbreviationne 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

Get example

> get ne o
R000004
-1

Set example

> set ne o 4
R000008
Set OK

ntp.enabled

Abbreviationnt e
Accessget/set

Description

Enable/disable synchronization of local time with network time.

Arguments

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

Default

1

Get example

> get nt e
R000003
1

Set example

> set nt e off
R000008
Set OK

ntp.interval

Abbreviationnt i
Accessget/set

Description

The synchronization interval used when updating local time with network time.

Arguments

<seconds>

Default

3600

Get example

> get nt i
R000006
3600

Set example

> set nt i 14400
R000008
Set OK

ntp.server

Abbreviationnt s
Accessget/set

Description

The IP address or host name of the NTP server used to obtain network time.

Arguments

<IP address / host name>

Default

pool.ntp.org

Get example

> get nt s
R000014
pool.ntp.org

Set example

> set nt s 203.26.72.7
R000008
Set OK

OTA Upgrade

ota.port

Abbreviationot p
Accessget/set

Description

DEPRECATED - This variable has no effect and will be removed in the next release.

Network port of the remote OTA upgrade server

ota.host

Abbreviationot h
Accessget/set

Description

DEPRECATED - This variable has no effect and will be removed in the next release.

IP address or host name to use for the OTA server


Remote Terminal

remote_terminal.enabled

Abbreviationre e
Accessget/set

Description

Enable/disable remote terminal at bootup.

Arguments

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

Default

0

Get example

> get re e
R000003
0

Set example

> set re e true
R000008
Set OK

remote_terminal.interface

Abbreviationre i
Accessget/set

Description

Network interface the remote terminal will listen on.
If set to default, uses the interface specified in network.default_interface

Arguments

<wlan/softap/default>

Default

default

Get example

> get re i
R000009
default

Set example

> set re i wlan
R000008
Set OK

remote_terminal.password

Abbreviationre w
Accessget/set

Description

Client login password for the remote terminal. Note! The terminal emulator must be configured for passive password negotiation.

Arguments

<password>

Default

""

Get example

> get re w
R000000

Set example

> set re w mypassword
R000008
Set OK

remote_terminal.port

Abbreviationre p
Accessget/set

Description

The remote terminal listens on this port.

Arguments

<port>

Default

2000

Get example

> get re p
R000006
2000

Set example

> set re p 55000
R000008
Set OK

remote_terminal.timeout

Abbreviationre t
Accessget/set

Description

Remote terminal client idle timeout in seconds.

Arguments

<# seconds>

Default

60

Get example

> get re t
R000004
60

Set example

> set re t 120
R000008
Set OK

Setup

setup.auto.cmd

Abbreviationse a c
Accessget/set

Description

The WiConnect command specified by setup.auto.cmd is run after boot up if:

This corresponds to the 'out-of-the-box' default state of a module. You can set setup.auto.cmd to setup cmd to run a setup script file. See Setup Configuration Script.

Arguments

<command>

Default

-

Get example

> get se a c
R000005
wps

Set example

> set se a c "setup web"
R000008
Set OK

setup.gpio.cmd

Abbreviationse g c
Accessget/set

Description

The specified command is executed in response to a reboot, or a specified GPIO being asserted, depending on the setting of the setup.gpio.control_gpio and the setup.gpio.mode.

Arguments

<command>

Default

setup web

Get example

> get se g c
R000011
setup web

Set example

> set se g c "setup web"
R000008
Set OK

setup.gpio.control_gpio

Abbreviationse g g
Accessget/set

Description

Asserting the GPIO specified by setup.gpio.control_gpio for 3 seconds during and immediately after reset causes the WiConnect command specified by setup.gpio.cmd to run. A value of -1 disables this feature.

Arguments

<GPIO#>

Default

The default GPIO is platform dependent and is typically mapped 
to button 2 on evaluation boards (the wake button)

Get example

> get se g g
R000003
3

Set example

> set se g g 12
R000008
Set OK

setup.gpio.level

Abbreviationse g l
Accessget/set

Description

The active logic level used when setup.gpio.control_gpio is asserted.

Arguments

<GPIO#>

Default

1

Get example

> get se g l
R000003
1

Set example

> set se g l 0
R000008
Set OK

setup.gpio.mode

Abbreviationse g m
Accessget/set

Description

The mode setting determines what events result in running the command string specified by setup.gpio.cmd.

If the setup.gpio.cmd is set, the command is run as follows:

ModeEvent Causing Command to RunNote
bootThe command is run on PoR (Power on Reset, or reboot)The operation ignores the control GPIO.
gpioIf setup.gpio.control_gpio is set, the command runs when the GPIO is asserted for 3 seconds through a PoR.This corresponds to the legacy behavior of running setup web using Button 2 on evaluation boards.
Control GPIO is not registered so may be used as another function.
anyIf setup.gpio.control_gpio is set, the command runs any time the GPIO is asserted.Control GPIO is registered so cannot be used as another function.

Otherwise the command does not run.

Arguments

<boot/gpio/any>

Default

-

Get example

> get se g m
gpio

Set example

> set se g m boot
R000008
Set OK

setup.web.client_list

Abbreviationse w c
Accessget

Description

List MAC address, IP address and OS of connected websetup clients.

Note: 'Invalid' means the client has not yet connected to the webpage (but is connected to the softap).

The additional info comes from the browser's 'User-Agent' field in its HTTP request header.

A list of possible 'User-Agent' values is found here: http://www.useragentstring.com/pages/useragentstring.php.

The following is a list of supported OSs:

Arguments

-

Default

-

Get example

> get setup.web.client_list
R000143
! Connected: 2
! # MAC               IP Address   OS
# 1 90:18:7C:34:CB:97 10.10.10.2   Android
# 2 F8:16:54:35:0F:8E 0.0.0.0      Windows

setup.web.idle_timeout

Abbreviationse w i
Accessget/set

Description

If no client connects to the web setup webpage after setup.web.idle_timeout seconds, web setup times out and is terminated. Upon timeout, if a wlan.ssid has previously been set, WiConnect attempts to re-join the WLAN network.

Arguments

<seconds> Note: Setting this variable to 0 disables web setup idle timeout.

Default

300 (5 minutes)

Get example

> get setup.web.idle_timeout
R000005
300

Set example

> set se w i 0
R000008
Set OK

setup.web.passkey

Abbreviationse w p
Accessget/set

Description

The softAP WPA2-AES passphrase used for web setup, must be between 8-32 characters in length.

Arguments

<passphrase>

Default

password

Get example

> get we p
R000010
password

Set example

> set we p my-new-password
R000008
Set OK

setup.web.root_filename

Abbreviationse w r
Accessget/set

Description

The root filename of the web setup: in response to a request for http://wiconnect.com, the web server returns http://wiconnect.com/.

Note: The file must be a supported type for it to appear correctly in the browser. The type is determined by the file extension. The following types are supported:

ExtensionMIME
.csstext/css
.jsapplication/javascript
.html/.htmtext/html
.pngimage/png
.icoimage/x-icon
.gifimage/gif
.jpg/.jpegimage/jpeg
.txttext/plain

Arguments

<root_filename>

Default

/setup/index.html

Get example

> get se w r
/setup/index.html

Set example

> set se w r home.htm
R000008
Set OK

setup.web.ssid

Abbreviationse w s
Accessget/set

Description

The softAP SSID used for web setup. If the SSID ends in a # character, the last 6 digits of the wlan MAC address are automatically appended to the SSID.

Arguments

<ssid>

Default

WiConnect Web Setup #

Get example

> get we s
R000021
WiConnect Web Setup #

Set example

> set we s "This is my softAP!"
R000012
Set OK

setup.web.url

Abbreviationse w u
Accessget/set

Description

A comma separated list of host names the webserver responds to in web setup mode.

Arguments

<url list>

Default

wiconnect.com,www.wiconnect.com,setup.com,www.setup.com

Get example

> get we u
R000057
wiconnect.com,www.wiconnect.com,setup.com,www.setup.com

Set example

> set we u setup,start,lets.go,hello
R000008
Set OK

SoftAP Interface

softap.auto_start

Abbreviationso a
Accessget/set

Description

Auto start softap at boot up.

See Wi-Fi Interface, SoftAP Interface.

Arguments

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

Default

0

Get example

> get so a
R000003
0

Set example

> set so a off
R000008
Set OK

softap.channel

Abbreviationso c
Accessget/set

Description

The SoftAP channel.

If a WLAN interface is already active, the value of softap.channel is ignored, since the WLAN interface has channel set priority.

If WLAN interface is not active, and softap.channel is 0, SoftAP starts on the least busy of channels 1, 6 and 11.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<channel>

Default

0

Get example

> get so c
R000003
0

Set example

> set so c 6
R000008
Set OK

softap.client_list

Abbreviationso l
Accessget

Description

Return list of connected softap clients.

Note: The SoftAP is limited to a maximum of 4 WLAN clients for WiConnect on the AMW004 (Wallaby) and AMWx06 (Numbat) modules.

See Wi-Fi Interface, SoftAP Interface.

Arguments

-

Default

-

Get example

 get so l
! Connected: 2
! # MAC               IP Address
# 1 F8:16:54:35:0F:8E 10.10.10.2
# 2 11:22:33:44:55:66 10.10.10.17

softap.dhcp_server

Abbreviationso d
Accessget/set

Description

Enable DHCP server on the softap interface.

See Wi-Fi Interface, SoftAP Interface.

Arguments

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

Default

1

Get example

> get so d
R000003
1

Set example

> set so d true
R000008
Set OK

softap.dns_server

Abbreviationso n
Accessget/set

Description

Enable DNS redirect server on the softap interface.

See Wi-Fi Interface, SoftAP Interface.

Arguments

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

Default

1

Get example

> get so n
R000003
1

Set example

> set so n 0
R000008
Set OK

softap.gateway

Abbreviationso g
Accessget/set

Description

Determines the SoftAP interface's gateway advertised during a DHCP response. This allows the SoftAP gateway to be set independently of the softap.ip. If softap.gateway is set to 0.0.0.0, then use the softap.ip setting as the gateway.

This setting is only used if softap.dhcp_server = true. This setting is used in the DHCP response Router option (and optionally in the DNS Server option).

Use Cases

softap.gatewaysoftap.dns_serverRouter
DHCP response option
DNS Server
DHCP response option
0.0.0.0truesoftap.ipsoftap.ip
valid and not 0.0.0.0truesoftap.gatewaysoftap.gateway, softap.ip
valid and not 0.0.0.0falsesoftap.gatewaysoftap.gateway
255.255.255.255true or falseNot advertisedNot advertised

See also:

Arguments

<gateway>

Default

0.0.0.0

Get example

> get so g
R000012
10.10.10.1

Set example

> set so g 0.0.0.0
R000008
Set OK

softap.hide_ssid

Abbreviationso h
Accessget/set

Description

When enabled, this variable disables broadcast of the softap's SSID, for security purposes.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<0/1>

Default

0

Get example

> get so h
0

Set example

> set so h 1
Set OK

softap.idle_timeout

Abbreviationso t
Accessget/set

Description

Maximum client idle time before the client is automatically disassociated.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<# seconds>

Default

7

Get example

> get so t
R000003
7

Set example

> set so t 20
R000008
Set OK

softap.info

Abbreviationso o
Accessget

Description

Soft AP connection status parameters: state, SSID, channel and clients.

See Wi-Fi Interface, SoftAP Interface.

Arguments

-

Default

<varies>

Get example

> get softap.info
state: up
SSID: WiConnect-#
channel: 0
clients: 1

softap.ip

Abbreviationso i
Accessget/set

Description

The IP address used for the softap network interface. The netmask is 255.255.255.0.

The softAP gateway depends on the softap.gateway setting. If softap.gateway is 0.0.0.0, the gateway is set to softap.ip.

Note: The softap.ip settings are also used for web setup.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<IP address>

Default

10.10.10.1

Get example

> get so i
R000013
10.10.10.1

Set example

> set so i 192.168.10.1
R000008
Set OK

softap.netmask

Abbreviationso m
Accessget/set

Description

Determines the range of IP addresses offered by the Soft AP.

For example, a netmask of 255.255.255.0 gives a range of 254 IP addresses.

Some platforms, such as Windows 8, send ARP (Address Resolution Protocol) packets to all available IP addresses, which can overload the module WL chip.

The work-around is to set a default network mask pf 255.255.255.240, so valid IPs are limited to the range x.x.x.1-7. Consequently only 8 ARP packets are sent.

Arguments

<netmask address>

Default

255.255.255.240

Get example

> get so m
R000017
255.255.255.240

Set example

> set so m 255.255.255.0
R000008
Set OK

softap.passkey

Abbreviationso p
Accessget/set

Description

The WPA2-AES passphrase for the softap interface, or none to disable security.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<passphrase>

Default

""

Get example

> get so p
R000000

Set example

> set so p "My softAP password"
R000008
Set OK

softap.rate.protocol

Abbreviationso r p
Accessget/set

Description

SoftAP data rate protocol selection. Use 11b to restrict 802.11 PHY data rates to 802.11b, 11g for 802.11g data rates, and auto to automatically select the best rate from all 802.11b/g/n rates.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<11b/11g/auto>

Default

auto

Get example

> get so r p
auto

Set example

> set softap.rate.protocol 11b
Set OK

softap.rate.transmit

Abbreviationso r t
Accessget/set

Description

Force the softAP interface to transmit at a fixed data rate. The transmit rate is chosen from the subset specified by softap.rate.protocol.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<rate> where:

valueTransmit Rate
-1auto 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

Get example

> get so r x
5.5

Set example

> set softap.rate.transmit mcs3
Set OK

softap.ssid

Abbreviationso s
Accessget/set

Description

The SSID of the softAP. If the SSID ends with #, the last 6 digits of the WLAN MAC address are appended to the SSID

See Wi-Fi Interface, SoftAP Interface.

Arguments

<ssid>

Default

WiConnect-#

Get example

> get

Set example

> set

softap.url

Abbreviationso u
Accessget/set

Description

Comma separated list of domains to resolve. Maximum of 63 characters.

See Wi-Fi Interface, SoftAP Interface.

Arguments

<comma separated list>

Default

wiconnect,wiconnect.com,www.wiconnect.com

Get example

> get so u
R000043
wiconnect,wiconnect.com,www.wiconnect.com

Set example

> set so u mydevice,mydevice.com
R000008
Set OK

SPI Settings

spi.master.active_gpio

Abbreviationsp m g
Accessget/set

Description

Specify the GPIO that is asserted when the module's SPI master bus is being accessed. At this time, any non-SPI peripheral signals connected to the SPI GPIOs should be set to high impedance.

Arguments

<gpio #>

Note: Set to -1 to disable this feature, and free a GPIO assigned to this function.

Default

-1

Get example

> get sp m g
-1

Set example

> set sp m g 9
Set OK 
get gp u
!  # Description
...
#  9 spi.master.active_gpio
...

spi.master.active_level

Abbreviationsp m l
Accessget/set

Description

Specify the asserted level for spi.master.active_gpio

Arguments

<0/1>

Default

1

Get example

> get sp m l
1

Set example

> set sp m l 0
Set OK

Static Network Settings

static.dns

Abbreviationst d
Accessget/set

Description

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

Arguments

<[IP address]/[host name]>

Default

8.8.8.8

Get example

> get st d
R000009
8.8.8.8

Set example

> set st d 8.8.4.4
R000008
Set OK

static.gateway

Abbreviationst g
Accessget/set

Description

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

Arguments

<IP address>

Default

0.0.0.0

Get example

> get st g
R000009
0.0.0.0

Set example

> set st g 192.168.0.1
R000008
Set OK

static.ip

Abbreviationst 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

Get example

> get st i
R000009
0.0.0.0

Set example

> set st i 192.168.0.2
R000008
Set OK

static.netmask

Abbreviationst n
Accessget/set

Description

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

Arguments

<network mask>

Default

0.0.0.0

Get example

> get st n
R000009
0.0.0.0

Set example

> set st n 255.255.255.0
R000008
Set OK

Stream Settings

stream.auto_close

Abbreviationst a
Accessget/set

Description

This setting is intended for all network related streams:

When FALSE, a stream handle is not reused until it is manually closed. In this case, the stream_poll command returns 2 for a stream when the associated client has disconnected.

When TRUE, a stream handle is automatically reused when closed.

Arguments

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

Default

true

Get example

> get st a
1
>

Set example

> set st a false
Set OK

System

system.adc.vref

Abbreviationsy a v
Accessget/set

Description

Specify the ADC reference voltage, in millivolts, used by the adc_take_sample command.

Arguments

<mv>

Default

3300

Get example

> get system.adc.vref
3300

Set example

> set sy a v 3200
Set OK

system.activity.gpio

Abbreviationsy a g
Accessget/set

Description

Map GPIO to activity type. When activity is detected, the corresponding GPIO is momentarily set to the level specified by system.activity.gpio_level.

Arguments

''<GPIO#> <type> where:

Default

none - no GPIOs are mapped to activity types

Get example

> get system.activity.gpio 1
none

Set example

> set system.activity.gpio 7 softap_rx,softap_tx,wlan_tx
Set OK
> get system.activity.gpio 7
softap_rx,softap_tx,wlan_tx
>
Ready
> set system.activity.gpio -1 softap_rx
Set OK
> get system.activity.gpio 7
softap_tx,wlan_tx

system.activity.gpio_level

Abbreviationsy a l
Accessget/set

Description

Specify the GPIO level corresponding to activity. See system.activity.gpio.

Arguments

<1/0>

Default

1

Get example

> get system.activity.gpio_level 1
1

Set example

> set system.activity.gpio_level 0

system.bflash.cs_gpio

Abbreviationsy f g
Accessget/set

Description

Specify the bulk flash's chip select gpio. Set to -1 to disable the bulk flash feature.

See File System, Internal, Extended and Bulk Flash.

Arguments

<GPIO #>

Default

-1

Get example

> get system.bflash.cs_gpio
-1

Set example

> set sy f g 4
Set OK

system.boot_app

Abbreviationsy b
Accessget/set

Description

Default boot application. The <filename> must be a valid boot application available on the filesystem.

Arguments

<filename>

Default

wiconnect

Get example

> get sy b
R000016
wiconnect.exe

Set example

> set sy b wiconnect.exe
R000008
Set OK

system.cmd.buffered

Abbreviationsy c b
Accessget/set

Description

Flag to enable/disable buffering of certain command responses. This is intended for use when reading command output by machine.

If enabled, a command's response is buffered and a stream handle along with the response size in bytes is returned.

The host must use the 'read' command to retrieve the command's response data.

Note that if headers are enabled, the header is returned along with the stream handle and response size.

The following commands are buffered if the system.cmd.buffered flag is set:

Arguments

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

Default

0

Get example

> get sy c b
0

Set example

> set sy c b on
Set OK

system.cmd.echo

Abbreviationsy c e
Accessget/set

Description

Enable/disable character echo. Only applies to command mode.

Arguments

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

Default

1

Get example

> get sy c e
R000003
1

Set example

> set sy c e on
R000008
Set OK

system.cmd.header_enabled

Abbreviationsy c h
Accessget/set

Description

Enable/disable a response header for commands. Only applies to command mode. Response headers make it easy to parse responses with a host MCU.

Arguments

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

Default

0

Get example

> get sy c h
R000003
1

Set example

> set sy c h on
R000008
Set OK

system.cmd.mode

Abbreviationsy c m
Accessset

Description

Puts the WiConnect command interface into human or machine mode, further details are provided in Serial Interface, Command Mode. Note!: This variable is NOT readable.

Arguments

<human | machine>

Default

human

Set example

> set sy c m human
R000008
Set OK

system.cmd.prompt_enabled

Abbreviationsy c p
Accessget/set

Description

Enable/disable terminal command prompt. Only applies to command mode. A prompt makes it easy for humans to interact with WiConnect.

Arguments

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

Default

1

Get example

> get sy c p
R000003
1

Set example

> set sy c p on
R000008
Set OK

system.cmd.timestamp

Abbreviationsy c t
Accessget/set

Description

When set to value other than none, adds a millisecond resolution timestamp to each WiConnect response. The timestamp appears before other output, and is followed by a colon and a space, e.g.
rtc output:

> get network.ip
1409819199621: 10.5.6.71

utc output:

> get network.ip
2014-09-04 | 08:27:45: 10.5.6.71

Arguments

<none/rtc/utc> where:

none

Get example

> get sy c t
2014-09-04 | 08:32:11: utc

Set example

> set sy c t rtc

system.gotosleep.timeout

Abbreviationsy s t
Accessget/set

Description

The module automatically goes to sleep after a timeout period of . The timeout countdown restarts when a wake event occurs and is held off if data is available on open network connections, the minimum timeout is 10 seconds. 0 disables gotosleep. A save and reboot is required before the sleep timeout is enabled.

Arguments

<seconds>

Default

0

Get example

> get sy s t
R000003
0

Set example

> set sy s t 12
R000008
Set OK

system.indicator.gpio

Abbreviationsy i g
Accessget/set

Description

The GPIO used for a particular system indicator. System indicators drive LEDs to indicate the state of the wlan, network and softap interfaces. -1 to disable.

Arguments

<wlan/network/softap> <GPIO#>

Default

<varies>

Get example

> get sy i g network
R000004
11

Set example

> set gpio.alias 11 netstat_gpio   <- Alias GPIO 11 for simplicity
R000008
Set OK
> set sy i g network netstat_gpio
R000008
Set OK

system.indicator.state

Abbreviationsy i s
Accessget/set

Description

System indicator option for each state as described in the following tables.

WLAN Indicator

Wi-Fi Client status, by default GREEN LED on eval boards

State #State DescriptionDefault Behavior
state 1Wi-Fi offstatic_off
state 2Errorfast_blink
state 3Connecting to APmedium_blink
state 4Joined to APslow_blink

Network Indicator

Network status, by default YELLOW LED on eval boards

State #State DescriptionDefault Behavior
state 1No IP addressfast_blink
state 2DHCP in-progressmedium_blink
state 3DHCP successfulslow_blink

SoftAP Indicator

SoftAP status, by default RED LED on eval boards

State #State DescriptionDefault Behavior
state 1SoftAP offstatic_off
state 2SoftAP errorfast_blink
state 3SoftAP activemedium_blink
state 4Client connectedslow_blink

For blink rates, see Configuration and Setup, System Indicator State Options

Arguments

<wlan/network/softap> <csv list>

Default

<see above>

Get example

> get sy i s wlan
R000047
static_off|fast_blink|medium_blink|slow_blink

Set example

> set sy i s network static_off|medium_blink|static_on
R000008
Set OK

system.memory_usage

Abbreviationsy o
Accessget

Description

Returns the heap memory currently in use, as a percentage of total heap memory. See Memory.

Arguments

-

Default

-

Get example

> get sy o
58

system.msg

Abbreviationsy m
Accessget/set

Description

Customize system messages for various events: initialized, sleep, wlan_joining, wlan_joined, wlan_leave, wlan_failed, softap_joined, softap_leave, network_opening, network_opened, network_closed, network_failed. Tags may be included to provide dynamic information as shown below.

TagDescriptionTag is available for ...
@tTimestampAll messages
@sSSIDAll wlan messages
@cStream handlenetwork_opened, network_closed
@hConnection host/portnetwork_opening, network_failed
@mClient MAC Addresssoftap_joined, softap_leave

Arguments

<message name> <message value>

Default

<see get example below>

Get example

> get system.msg all
R000397
initialized - [@tReady]
network_closed - [@tDisconnected: @c]
network_failed - [@tConnect failed]
network_opened - [@tConnected: @c]
network_opening - [@tConnecting: @h]
sleep - [@tSleep]
wlan_failed - [@tJoin failed]
wlan_joined - [@tAssociated]
wlan_joining - [@tAssociating to @s]
wlan_leave - [@tDisassociated]
softap_joined - [@t@m associated]
softap_leave - [@t@m disassociated]

Set example

> set sy m wlan_leave "[@t: Bye for now]"
R000008
Set OK

system.oob.event_mask

Abbreviationsy o e
Accessget/set

Description

The mask of events which assert the OOB GPIO. See system.oob.gpio.

For event/mask mapping, see the system.oob.gpio event mask table.

Arguments

<hex mask> Mask is specified in the form 0xHH where H is a hexadecimal digit 0-F.

Default

0x0

Get example

> get sy o e
0x1F

Set example

> set sy o e 0x11
Set OK

system.oob.gpio

Abbreviationsy o g
Accessget/set

Description

The system.oob variables allow creation of an out-of-band interrupt (OOB) GPIO. This GPIO is asserted whenever one or more of the configured OOB events occurs. It is de-asserted when reading the OOB status register.

Note: OOB events are in most cases related to a corresponding special function GPIO variable. However, the OOB event can be configured without setting the corresponding special function GPIO. For example, The network.status_gpio OOB event can be triggered without setting the network.status_gpio variable.

Specify the OOB GPIO with the system.oob.gpio variable.

Specify the active level of the OOB GPIO with system.oob.gpio_level.

Specify the events that cause the OOB GPIO to be asserted with system.oob.event_mask.

Specify events that trigger the OOB GPIO only on the rising edge (i.e. when the event is asserted) with system.oob.rising_edge_mask.

Read the events that triggered an OOB interrupt from the system.oob.status variable.

Only one GPIO can be specified as the OOB GPIO. Determine the OOB GPIO by reading the gpio.usage variable or the system.oob.gpio variable.

Events are mapped to the event mask, rising edge mask and status mask as shown in the following table:

OOB Event NameMask Value
ioconn.status_gpio0x001
network.status_gpio0x002
tcp.server.connected_gpio0x004
tcp.server.data_gpio0x008
udp.server.data_gpio0x010
tcp.client.data_gpio (see tcp_client -g)0x020
udp.client.data_gpio (see udp_client -g)0x040
http.server.ws_connected_gpio0x080
http.server.ws_data_gpio0x100
websocket.client.data_gpio (see websocket_client)0x200

See Handling Multiple Clients with OOB Interrupts for details of use.

Arguments

<GPIO #> The number of the OOB GPIO.

Default

No GPIO assigned to OOB

Get example

> get sy o g
22

Set example

> set system.oob.gpio 22
Set OK

system.oob.gpio_level

Abbreviationsy o l
Accessget/set

Description

The active level of the OOB GPIO. See system.oob.gpio.

Arguments

<0/1>

Default

1

Get example

> get sy o l
1

Set example

> set sy o l 0
Set OK

system.oob.rising_edge_mask

Abbreviationsy o r
Accessget/set

Description

The mask of events which should trigger the OOB GPIO only on the rising edge (i.e. when an event is asserted). See system.oob.gpio.

If the mask is cleared, then the OOB GPIO is asserted on both rising and falling edges.

For instance, when the module connects, the network status event event is considered asserted. When the module disconnects, the event is considered de-asserted.

For event/mask mapping, see the system.oob.gpio event mask table.

Arguments

<hex mask> Mask is specified in the form 0xHH where H is a hexadecimal digit 0-F.

Default

0x0

Get example

> get sy o r
0x1F

Set example

> set sy o r 0x11
Set OK

system.oob.status

Abbreviationsy o s
Accessget

Description

The mask of triggered events. When an event is triggered, the OOB GPIO is asserted and the status mask is updated with the triggering event. Reading this variable returns a mask of events that caused the OOB gpio to be asserted.

Reading this variable de-asserts the OOB GPIO and clears the status mask.

For event/mask mapping, see the system.oob.gpio event mask table.

Arguments

-

Default

0x0

Get example

get sy o e
0x0

system.powersave.mode

Abbreviationsy p m
Accessget/set

Description

Set the system powersave mode where 0 = no powersave, 1 = core powered down on idle with <5 cycles power up latency. Additional powersave modes will be added in an upcoming release. Until then, use [system.gotosleep.timeout](variables#system_gotosleep_timeout) to put the module into deep sleep.

Note! Wi-Fi powersave is independently configured using wlan.powersave.mode.

Arguments

<mode>

Default

1

Get example

> get sy p m
R000003
1

Set example

> set sy p m 0
R000008
Set OK

system.print_level

Abbreviationsy p
Accessget/set

Description

Print levels:

Each print level includes lower levels.

Set system.print_level to 0 to disable all system and log messages.

Arguments

<[0-4]/[all]>

Default

all

Get example

> get sy p
R000005
all

Set example

> set sy p 0
R000008
Set OK

system.safemode

Abbreviationsy s
Accessget

Description

Returns a flag to indicate whether the system is in safe mode. The module switches to safe mode after eight exceptions occur with the boot application.

Arguments

-

Default

0

Get example

> get sy s
R000003
0

system.safemode_disabled

Abbreviationsy d
Accessget/set

Description

Disables safe mode feature when set to true. When safe mode is disabled and 8 or more faults occur, WiConnect automatically resets the fault counter and runs the boot application configured with system.boot_app. It is strongly recommended to leave this setting false as it may not be possible to recover from a fatal error.

Note: A factory reset returns this setting to the default state of false.

Arguments

<true/1/0/false>

Default

0

Get example

> get sy d
R000003
0

Set example

> set sy d 1
R000009
Success

system.uuid

Abbreviationsy u
Accessget

Description

Returns the hardware UUID of the module.

Arguments

Default

Get example

> get sy u
R000042
05B3203FA03133434E39423330363031B2303533

system.version

Abbreviationsy v
Accessget

Description

Returns the WiConnect firmware bundle version.

Arguments

-

Default

<varies>

Get example

> get sy v
R000069
wiconnect.exe v1.0.0, Built:Apr 03 2014 for AMW004.3-E03.1

system.wakeup.events

Abbreviationsy w e
Accessget/set

Description

Control which events wake the module from sleep. Multiple options are separated by the '%%%%' character. \0 disables wake events.
Some UART interfaces do not have wake capability. See Peripherals, GPIO Functions and Pins for tables showing GPIOs with wake capability.

Note: On ACKme evaluation boards the Button 2 GPIO (GPIO11 Wallaby, GPIO22 Numbat) is by default set as one of the system.wakeup.events and also associated with the setup.gpio.control_gpio function. When using Button 2 as a wakeup event, either disable the setup.gpio.control_gpio function, or ensure the GPIO is asserted for less than 3 seconds, otherwise the module will enter web setup mode after waking.|

Arguments

<[<uartX>|<gpioX>] / [\0]>

Default

uart0

Get example

> get sy w e
R000007
uart0

Set example

> set sy w e gpio5|uart0
R000008
Set OK

system.wakeup.timeout

Abbreviationsy w t
Accessget/set

Description

The module automatically wakes from sleep after timeout . Wake events are configured with system.wakeup.events. 0 disables auto-wakeup.

Arguments

<seconds>

Default

0

Get example

> get sy w t
R000003
0

Set example

> set sy w t 60
R000008
Set OK

TCP Client

tcp.client.auto_interface

Abbreviationtc c i
Accessget/set

Description

Interface to auto-start TCP client connection.

Arguments

default

Default

<default/wlan/softap>

Get example

> get tcp.client.auto_interface
default

Set example

> set tc c i wlan
Set OK

tcp.client.auto_retries

Abbreviationtc c e
Accessget/set

Description

Determines number of attempts to reconnect after remote server disconnects client.

To control how the client connects to the server, use tcp.client.retries, tcp.client.connect_timeout and tcp.client.retry_period .

Arguments

<0-255>

Default

0

Get example

> get tcp.client.auto_retries
0

Set example

set tc c e 20
Set OK

tcp.client.auto_start

Abbreviationtc c a
Accessget/set

Description

Enable/disable TCP client auto-start feature. If enabled, TCP client automatically connects to remote server when interface is brought up.

Arguments

<0/1>

Default

0

Get example

> get tcp.client.auto_start
0

Set example

> set tc c a 1
Set OK

tcp.client.connect_timeout

Abbreviationtc c t
Accessget/set

Description

TCP client connect timeout in milliseconds.

This variable controls timeout for the following commands:

Arguments

<milliseconds>

Default

5000

Get example

> get tc c t
R000006
5000

Set example

> set tc c t 6500
R000008
Set OK

tcp.client.local_port

Abbreviationtc c p
Accessget/set

Description

TCP client local port. 0 = automatic.

If you set this value, the first connection is made using the specified local port.

Subsequent additional TCP client connections determine the port by incrementing the last port used. If the specified port is X, the first subsequent connection uses port X+1. The next TCP client connection uses port X+2, and so on.

To reset the local port back to X, reboot the client.

Arguments

<port>

Default

0

Get example

> get tc c p
R000003
0

Set example

> set tc c p 30009
R000008
Set OK

tcp.client.remote_host

Abbreviationtc c h
Accessget/set

Description

Domain or IP address of remote tcp server to auto connect.

Arguments

<domain/ip address>

Default

null

Get example

> get tcp.client.remote_host
mydomain.com

Set example

> set tc c h mydomain.com
Set OK

tcp.client.remote_port

Abbreviationtc c o
Accessget/set

Description

Port of remote tcp server to auto connect.

Arguments

<port>

Default

3000

Get example

> get tcp.client.remote_port

Set example

> set tc c o 5000
Set OK

tcp.client.retries

Abbreviationtc c r
Accessget/set

Description

TCP client connection retry attempts

Arguments

<max #retries>

Default

3

Get example

> get tc c r
R000003
3

Set example

> set tc c r 5
R000008
Set OK

tcp.client.retry_period

Abbreviationtc c w
Accessget/set

Description

TCP client wait time between connection retry attempts

Arguments

<milliseconds>

Default

1000

Get example

> get tc c w
R000006
1000

Set example

> set tc c w 2000
R000008
Set OK

TCP Keepalive

tcp.keepalive.enabled

Abbreviationtc k e
Accessget/set

Description

Enable/disable TCP keepalive feature of network stack.

Note: These settings apply to ALL TCP connections (TCP client, TLS, TCP server)

Keepalive is a system for determining whether a connected peer is still connected. If the peer reboots or otherwise drops out without notice, keepalive detects the problem. It works by sending an empty message at a specified interval and receiving an ACK in reply from the peer. If the ACK is not received with an initial expiration period, the keepalive exchange is periodically retried at a specified retry period until the retry count is exceeded.

To determine the initial expiration period, see tcp.keepalive.initial_timeout.

To determine the retry period, see tcp.keepalive.retry_timeout.

To determine the maximum retry count, see tcp.keepalive.retry_count.

Arguments

<true/false>

Default

false

Get example

> get tc k e
0

Set example

> set tc k e 1
Set OK

tcp.keepalive.initial_timeout

Abbreviationtc k i
Accessget/set

Description

Number of seconds for initial keepalive expiration.

See tcp.keepalive.enabled.

Arguments

<seconds> Range: 1 - 65535

Default

60

Get example

> get tc k i
60

Set example

> set tc k i 20
Set OK

tcp.keepalive.retry_count

Abbreviationtc k c
Accessget/set

Description

Maximum number of times to retry keepalive. Once all retries are expired, close connection.

See tcp.keepalive.enabled.

Arguments

<seconds>Range: 1 - 255

Default

5

Get example

> get tc k c
5

Set example

> set tc k c 10
Set OK

tcp.keepalive.retry_timeout

Abbreviationtc k r
Accessget/set

Description

After initial expiration, period of retries in seconds.

See tcp.keepalive.enabled.

Arguments

<seconds> Range: 1 - 255

Default

5

Get example

> get tc k r
5

Set example

> set tc k r 10
Set OK

TCP Server

tcp.server.auto_interface

Abbreviationtc s i
Accessget/set

Description

Wireless interface used for the TCP server if auto-start is enabled.
If set to default, uses the interface specified in network.default_interface

Arguments

<wlan/softap/default>

Default

default

Get example

> get tc s i
R000009
default

Set example

> set tc s i softap
R000008
Set OK

tcp.server.auto_start

Abbreviationtc s a
Accessget/set

Description

Enable/disable TCP server auto-start on bootup.

Arguments

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

Default

0

Get example

> get tc s a
R000003
0

Set example

> set tc s a true
R000008
Set OK

tcp.server.connected_gpio

Abbreviationtc s c
Accessget/set

Description

The GPIO used to indicate whether a client is connected to the TCP server.

See also system.oob.gpio.

Arguments

<[GPIO#]/[-1]>

Default

-1

Get example

> get tc s c
R000004
-1

Set example

> set tc s c 12
R000008
Set OK

tcp.server.data_gpio

Abbreviationtc s d
Accessget/set

Description

The GPIO used to indicate whether a connected client has data available to read.
Note: Disable by setting to -1.

See also system.oob.gpio.

Arguments

<GPIO#>

Default

-1

Get example

> get tc s d
R000004
-1

Set example

> set tc s d 13
R000008
Set OK

tcp.server.idle_timeout

Abbreviationtc s t
Accessget/set

Description

Maximum client idle time in seconds before the client is automatically disconnected.

Arguments

<seconds>

Default

60

Get example

> get tc s t
R000004
60

Set example

> set tc s t 30
R000008
Set OK

tcp.server.max_clients

Abbreviationtc s m
Accessget/set

Description

Specify maximum number of clients that may be simultaneously connected to the tcp server.

Arguments

<max #> - maximum number of TCP server clients, valid range: 0-8.

Default

0

Get example

> > get tc s m
0

Set example

> set tc s m 5
Set OK

tcp.server.port

Abbreviationtc s p
Accessget/set

Description

TCP server port to listen on

Arguments

<port>

Default

3000

Get example

> get tc s p
R000006
3000

Set example

> set tc s p 3001
R000008
Set OK

tcp.server.tls_cert

Abbreviationtc s n
Accessget/set

Description

The server TLS CA certificate filename.

Arguments

<filename>

Default

null

Get example

> get tc s n
R000012
mycert.pem

Set example

> set tc s n mycert.pem 
R000008
Set OK

tcp.server.tls_enabled

Abbreviationtc s u
Accessget/set

Description

Enable server TLS certificate (used with auto_start option)

Arguments

<true/false>

Default

false

Get example

> get tc s u
R000003
0

Set example

> set tc s u false
R000008
Set OK

tcp.server.tls_key

Abbreviationtc s k
Accessget/set

Description

The server TLS certificate key filename.

Arguments

<filename>

Default

null

Get example

> get tc s k
R000012
mycert.key

Set example

> set tc s k mycert.key
R000008
Set OK

tcp.server.tls_verify_peer

Abbreviation tc s v
Accessget/set

Description

When this variable is set, a connecting client must provide a valid TLS certificate that the server validates. The client is disconnected if the provided certifcate is invalid. Note: The tcp.server.tls_cert variable must be set if using this feature.

Arguments

<0/1>

Default

0

Get example

> get tc s v
0

Set example

> set tc s v 1
Set OK

Time

time.last_set

Abbreviationti l
Accessget

Description

Return the number of seconds (or milliseconds) since the time was set (either manually or via NTP), or -1 if the time has never been set.

Get arguments

[ms]

Default

-

Get example

> get ti l
R000005
239

time.rtc

Abbreviationti r
Accessget/set

Description

The local time. Read returns epoch seconds by default, or (optionally) epoch milliseconds or UTC. Write takes an argument.

Get arguments

[ms/utc]

Set arguments

<epoch seconds>

Default

-

Get example

> get ti r utc
R000029
2014-03-23T08:13:07.010248Z

Set example

> set ti r 1395562166
R000008
Set OK

time.uptime

Abbreviationti u
Accessget

Description

Returns the number of seconds (or milliseconds) since reset, guaranteed not to roll over in your lifetime!

Arguments

[ms]

Default

<varies>

Get example

> get ti u ms
R000006
3578576

time.zone

Abbreviationti z
Accessget/set

Description

Timezone offset from GMT in hours.

Arguments

[+/-]H[:M] where H is an integer between 0 and 12, and M (if present) = 30
Offset ranges from -12:30 to 12:30.

Default

0

Get example

> get ti z
R000007
-4:30

Set example

> set ti z -4:30
R000008
Set OK

UART

uart.baud

Abbreviationua b
Accessget/set

Description

Sets the UART baud rate. Valid baud rates are must be one of the following standard rates:

110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200, 128000, 153600, 230400, 256000, 460800, 921600.

If the optional parameter is given, then the rate may be any value.

After changing uart.baud, save and reboot to effect the change.

Get arguments

<uart#>

Set arguments

<uart#> <baud rate> [raw]

Default

115200

Get example

Get baud rate for UART 0:

> get uart.baud 0
R000008
115200

Set example

Set UART 0 baud rate to 460800:

> set uart.baud 0 460800
R000008
Set OK

uart.data

Abbreviationua d
Accessget/set

Description

The number of UART data bits to use.

Arguments

<uart#> <# data bits>

Default

8

Get example

Get data bits setting for UART 0:

> get uart.data 0
R000003
8

Set example

Set UART 0 to use 8 data bits:

> set uart.data 0 8
R000008
Set OK

uart.flow

Abbreviationua f
Accessget/set

Description

Turn on/off UART hardware flow control.

Note: to guarantee that no characters are dropped, uart.flow must be turned on. This applies to any baud rate.

Arguments

<uart#> <off/on>

Default

off

Get example

Get flow control setting for UART 1:

> get uart.flow 1
R000005
off

Set example

Turn off flow control for UART 1:

> set uart.flow 1 off
R000008
Set OK

uart.parity

Abbreviationua p
Accessget/set

Description

Configure UART parity selection.

Arguments

<uart#> <none/even/odd>

Default

none

Get example

Get parity setting for UART 1:

> get uart.parity 1
R000006
none

Set example

Set parity to odd for UART 1:

> set uart.parity 1 odd
R000008
Set OK

uart.stop

Abbreviationua s
Accessget/set

Description

The number of UART stop bits to use.

Arguments

<uart#> <# stop bits>

Default

1

Get example

Get stop bits setting for UART 0:

> get uart.stop 0
R000003
1

Set example

Set stop bits to 1 for UART 0:

> set uart.stop 0 1
R000008
Set OK

UDP Client

udp.client.auto_interface

Abbreviationud c i
Accessget/set

Description

Interface to auto-start UDP client connection.

Arguments

default

Default

<default/wlan/softap>

Get example

> get udp.client.auto_interface
default

Set example

> set ud c i wlan
Set OK

udp.client.auto_start

Abbreviationud c a
Accessget/set

Description

Enable/disable UDP client auto-start feature. If enabled, UDP client automatically connects to remote server when interface is brought up.

Arguments

<0/1>

Default

0

Get example

> get udp.client.auto_start
0

Set example

> set ud c a 1
Set OK

udp.client.remote_host

Abbreviationud c h
Accessget/set

Description

Domain or IP address of remote udp server to auto connect.

Arguments

<domain/ip address>

Default

null

Get example

> get udp.client.remote_host
mydomain.com

Set example

> set ud c h mydomain.com
Set OK

udp.client.remote_port

Abbreviationud c p
Accessget/set

Description

Port of remote UDP server to auto connect.

Arguments

<port>

Default

3000

Get example

> get udp.client.remote_port

Set example

> set ud c p 5000
Set OK

UDP Server

udp.server.auto_interface

Abbreviationud s i
Accessget/set

Description

If 'auto-start' is enabled, this is the interface used when the server is set to auto-start.
If set to default, uses the interface specified in network.default_interface

Arguments

<wlan/softap/default>

Default

default

Get example

> get ud s i
R000009
default

Set example

> set ud s i softap
R000008
Set OK

udp.server.auto_start

Abbreviationud s a
Accessget/set

Description

Start server on power-up

Arguments

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

Default

0

Get example

> get ud s a
R000003
0

Set example

> set ud s a true
R000008
Set OK

udp.server.data_gpio

Abbreviationud s d
Accessget/set

Description

Specify a GPIO to be asserted HIGH when client data is available to be read.
Note: Disable by setting to -1.

See also system.oob.gpio.

Arguments

<GPIO#>

Default

-1

Get example

> get ud s d
R000004
-1

Set example

> set ud s d 3
R000008
Set OK

udp.server.lock_client

Abbreviationud s l
Accessget/set

Description

If this flag is set, the UDP server is locked to the first client from which it receives a packet. It can send data to, or receive data from, only that client.

If this flag is not set, the udp server receives data from all clients and sends to the last client from which it received a packet.

This flag is useful in stream mode when streaming to only one udp client whose IP is unknown.

Note: The variables udp.server.remote_host and udp.server.remote_port may be used to override this flag. If these variables are set then the udp server replies only to the specified host:port.

Arguments

<0/1>

Default

0

Get example

> get ud s l
0

Set example

> set ud s l 1
Set OK

udp.server.port

Abbreviationud s p
Accessget/set

Description

Default port for UDP server to bind.

Arguments

<port>

Default

3000

Get example

> get ud s p
R000006
3000

Set example

> set ud s p 5000
R000008
Set OK

udp.server.remote_host

Abbreviationud s h
Accessget/set

Description

Domain or IP address of remote udp client to auto connect. This is used in stream mode when the udp server is configured to auto-start. The stream sends data only to the configured remote host:port. See also udp.server.remote_port.

To disable, set null, i.e. set udp.server.remote_host ""

Note : If the remote_host is not configured, then the UDP server writes to the last client from which it read data (unless the destination address is specified using the udp_server write command).

Arguments

<domain/ip address>

Default

null

Get example

> get udp.server.remote_host
mydomain.com

Set example

> set ud c s mydomain.com
Set OK

udp.server.remote_port

Abbreviationud s r
Accessget/set

Description

Port of remote UDP client to auto connect. This is used in stream mode when the udp server is configured to auto-start. The stream sends data only to the configured remote host:port. See also udp.server.remote_host.

Note: If the port is 0 then use the UDP server's listening port. See udp.server.port.

Arguments

<port>

Default

3000

Get example

> get udp.server.remote_port

Set example

> set ud s r 5000
Set OK

WLAN Interface

wlan.antenna

Abbreviationwl a
Accessget/set

This variable is deprecated and will be removed in the next release of WiConnect. Instead use wlan.antenna.select.

wlan.antenna.select

Abbreviationwl a s
Accessget/set

Description

The default antenna used by the Wi-Fi radio.

NOTE: An external antenna must be connected if external or auto mode are selected.

Arguments

<1|int/2|ext/auto>

Default

1

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.

Arguments

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

Default

0

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.

Arguments

<0-255>

Default

3

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.

Arguments

<0-255>

Default

10

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, WiConnect 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:

WiConnect 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.

Arguments

<bssid>

Default

00:00:00:00:00:00 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.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!

Arguments

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

Default

0

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>

Get example

> get wlan.info
state: up
SSID: ackme
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

Arguments

-

Default

<varies>

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). 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

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.

Arguments

<timeout in ms>

Default

7000 ms

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

Get example

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

wlan.passkey

Abbreviationwl p
Accessget/set

Description

The WPA passphrase, WPA PSK or WEP key used when connecting to an AP.

The WEP key is replicated across each of the four possible keys.

Note! wlan.security must be manually set to WEP to use WEP security. ACKme STRONGLY discourages the use of WEP - it is NOT secure!

Arguments

<[<passphrase>/<WEP key>] / [\0]>

Default

""

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

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

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

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

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

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.

USEUJPROW (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

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

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

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

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

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

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

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

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

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

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 following options: Open, WEP, WPA-AES, WPA-TKIP, WPA2-AES, WPA2-Mixed, WPA2-TKIP.

Note! WEP security MUST be set to use WEP. We recommend against WEP, as it is not secure.

Arguments

<security type>

Default

Auto

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.

Arguments

<ssid>

Default

""

Get example

> get wl s
R000012
My Home AP

Set example

> set wl s "Obi-wan Kenobi"
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 WiConnect.

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

Get example

> get wl t
R000006
auto

Set example

> set wl t 15
R000008
Set OK