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 Name | Shortcut | |
---|---|---|
Template | first_word.second_word.third_word | fi s t |
Example 1 | time.uptime | ti u |
Example 2 | wlan.scan.retries | wl 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
Abbreviation | var |
Access | get/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
- ALL Variables
- Broadcast
- Bus
- goHACK.me
- GPIO
- HTTP Server
- http.server.api_enabled
- http.server.cors_origin
- http.server.denied_filename
- http.server.enabled
- http.server.interface
- http.server.max_clients
- http.server.notfound_filename
- http.server.password
- http.server.port
- http.server.root_filename
- http.server.tls_cert
- http.server.tls_enabled
- http.server.tls_key
- http.server.tls_verify_peer
- http.server.username
- IO Connection
- mDNS
- Network
- NTP
- OTA Upgrade
- Remote Terminal
- Setup
- SoftAP Interface
- Static Network Settings
- Stream Settings
- System
- system.adc.vref
- system.activity.gpio
- system.activity.gpio_level
- system.bflash.cs_gpio
- system.boot_app
- system.cmd.buffered
- system.cmd.echo
- system.cmd.header_enabled
- system.cmd.mode
- system.cmd.prompt_enabled
- system.cmd.timestamp
- system.gotosleep.timeout
- system.indicator.gpio
- system.indicator.state
- system.memory.usage
- system.msg
- system.oob.event_mask
- system.oob.gpio
- system.oob.gpio.level
- system.oob.rising_edge_mask
- system.oob.status
- system.powersave.mode
- system.print_level
- system.safemode
- system.uuid
- system.version
- system.wakeup.events
- system.wakeup.timeout
- TCP Client
- TCP Keepalive
- TCP Server
- Time
- UART
- UDP Client
- UDP Server
- WLAN Interface
- wlan.antenna
- wlan.auto_join.enabled
- wlan.auto_join.retries
- wlan.auto_join.retry_delay
- wlan.hide_passkey
- wlan.join.result
- wlan.join.retries
- wlan.join.timeout
- wlan.info
- wlan.mac
- wlan.passkey
- wlan.powersave.listen_interval
- wlan.powersave.mode
- wlan.powersave.sleep_delay
- wlan.rate.protocol
- wlan.rate.transmit
- wlan.roam_threshold
- wlan.rssi_average
- wlan.scan.active_dwell
- wlan.scan.channel_mask
- wlan.scan.home_dwell
- wlan.scan.num_probes
- wlan.scan.passive_dwell
- wlan.scan.retries
- wlan.scan.type
- wlan.security
- wlan.ssid
- wlan.tx_power
Variable Description
ALL
all
Abbreviation | all |
Access | get |
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
Abbreviation | br d |
Access | get/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 Item | Description |
---|---|
adcX | Current value of ADC X |
bssid | wlan interface -> BSSID of the AP |
channel | Wi-Fi radio channel |
gpioX | Current state of GPIO X |
ip | Current IP address |
mac | wlan MAC address |
rssi | wlan interface -> RSSI of the AP |
ssid | wlan interface -> SSID of the AP |
time | WiConnect local time |
uuid | Hardware ID |
version | Firmware version |
remote_terminal_port | inbound network port for the remote terminal |
Default
mac,bssid,channel,ip,ssid,rssi,remote_terminal_port,time,uuid,version
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
Abbreviation | br h h |
Access | get/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
Abbreviation | br i |
Access | get/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
Abbreviation | br t |
Access | get/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
Abbreviation | br u d |
Access | get/set |
This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.data.
broadcast.udp.interface
Abbreviation | br u i |
Access | get/set |
This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.interface.
broadcast.udp.interval
Abbreviation | br u t |
Access | get/set |
This variable is deprecated and will be removed in the next release of WiConnect. Instead use broadcast.interval.
broadcast.udp.ip
Abbreviation | br u a |
Access | get/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
Abbreviation | br u p |
Access | get/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.data_bus
Abbreviation | bu d |
Access | get/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
Abbreviation | bu l |
Access | get/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
Abbreviation | bu m |
Access | get/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
Abbreviation | bu s g |
Access | get/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
Abbreviation | bu s s |
Access | get/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
Abbreviation | bu s c |
Access | get/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:
- minimum value:
MAX(16, len(bus.stream.cmd_seq)*2)
i.e. the minimum value is the maximum of 16 and 2 x the length of the bus.stream.cmd_seq variable
For example, ifbus.stream.cmd_seq
is the default$$$
, its length is 3, so minimum value is the maximum of 16 and 2*3 = 16. - maximum value: 1460
Default
1460
Get example
> get bu s c
R000006
1460
Set example
> set bu s c 1450
R000008
Set OK
bus.stream.flush_time
Abbreviation | bu s t |
Access | get/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
Abbreviation | bu s r |
Access | get/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.name_address
Abbreviation | em n |
Access | get/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:
local-part@domain
display-name <local-part@domain>
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
Abbreviation | em s h |
Access | get/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
Abbreviation | em s w |
Access | get/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
Abbreviation | em s p |
Access | get/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
Abbreviation | em s u |
Access | get/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
Abbreviation | gh c |
Access | get |
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
Abbreviation | gh s |
Access | get/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
Abbreviation | gh o c |
Access | get/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
Abbreviation | gh o e |
Access | get/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
Abbreviation | gh o g |
Access | get/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:
<GPIO#>
: The GPIO number of an unassigned GPIO<slug/none>
The name of a slug in the capabilities file. If a stream and control have the same slug name, then the slug must be prefixed with stream or control
e.g.control.door_open, stream.door_open
Set tonone
to free the GPIO from a previous assignment.[<function>]
Specify a valid function for the GPIO (optional) Available functions are:
Function | Description |
---|---|
in | Input, high impedance (default for streams) |
inpu | Input, pull up |
inpd | Input, pull down |
out | Output (default for controls) |
out_od | Output, open drain |
out_od_pu | Output open drain, pull up |
adc | Analog-Digital Converter. The default value is specified in the capabilities file. |
dac | Digital-Analog Converter. The default duty cycle and (optional) default frequency are specified in the capabilities file. |
pwm | Pulse Width Modulator output. The default value is specified in the capabilities file. |
pulse | Pulsed GPIO output. The inactive level is specified in the capabilities file. |
[config]
: Optional configuration specific to GPIO functions. Available configurations include:
GPIO type | Configuration Specification | Description |
---|---|---|
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 table | adc [<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 Modulation | pwm [<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 GPIO | pulse [<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
Abbreviation | gh o s |
Access | get/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
Abbreviation | gh t |
Access | get |
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
Abbreviation | gp a |
Access | get/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
Abbreviation | gp c |
Access | get/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
Abbreviation | gp i |
Access | get/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
Abbreviation | gp s |
Access | get/set |
Description
Set the state of the specified GPIO when sleeping.
GPIOs are initialized is as follows:
- On startup, all unused pins (i.e. MCU pins not assigned a module GPIO) are set to the default state for the MCU (WALLABY= input-pullup, NUMBAT=Analog input)
- Then module GPIOs are set to either their gpio.init value if specified, else the MCU default state
On sleep, module GPIOs are set to their
gpio.sleep
value if specified, else the MCU default state.Sleep state can also be set using a GPIO configuration file. See Configuration and Setup, Using a GPIO Configuration File.
Arguments
<all> / <GPIO#> <state>
where state is one of the following:
State | Description |
---|---|
default | factory default state |
input_highz | input high impedance |
input_pull_down | input pull down |
input_pull_up | input pull up |
output_high | output high |
output_low | output low |
Default
default
Get example
> get gp s 0
input_pull_up
Set example
> set gp s 0 output_low
Set OK
gpio.usage
Abbreviation | gp u |
Access | get |
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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/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 |
Access | get/set |
Description
This sets or gets the root file of the HTTP server. If a plain request to
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 |
Access | get/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_enabled
Abbreviation | ht s t |
Access | get/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 |
Access | get/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_verify_peer
Abbreviation | ht s v |
Access | get/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 |
Access | get/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
IO Connection
ioconn.control_gpio
Abbreviation | io c |
Access | get/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
Abbreviation | io e |
Access | get/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
Abbreviation | io l |
Access | get/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
Abbreviation | io p |
Access | get/set |
Description
The network protocol associated with the GPIO controlled network connection.
Arguments
<udp/tcp/tls>
Default
tcp
Get example
> get io p
R000005
tcp
Set example
> set io p udp
R000008
Set OK
ioconn.remote_host
Abbreviation | io h |
Access | get/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
Abbreviation | io r |
Access | get/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
Abbreviation | io s |
Access | get/set |
Description
The GPIO used to indicate connection status when the GPIO controlled network connection feature is enabled.
Arguments
<GPIO#>
Default
-1
Get example
> get io s
R000004
-1
Set example
> set io s 13
R000008
Set OK
mDNS
mdns.enabled
Abbreviation | md e |
Access | get/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
Abbreviation | md i |
Access | get/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
Abbreviation | md n |
Access | get/set |
Description
The mDNS domain name of the module.
Note:
.local
is appended to the name. See Networking and Security, Network Discovery.- If the specified name conflicts with a pre-existing mDNS name, a number is automatically appended to the name, e.g.
mymodule-2.local
.
Arguments
<name>
- Only valid domain characters are supported: a-z, A-Z, 0-9, -, ..
- If the # character is the last character in the name, then it is replaced by the last 6 hex characters of the module's mac address, e.g.
wiconnect-1032d6
.
Default
wiconnect-#
Set example
> set mdns.name MyDomain_#
Set OK
Get example
> get md n
MyDomain_#
mdns.service
Abbreviation | md s |
Access | get/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:
- http - http server
- tcp - TCP/TLS server
- udp - UDP server
- remote_teminal - remote terminal server
<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 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:
- http server - _http._tcp.local
- tcp server - _wiconnect._tcp.local
- udp server - _wiconnect._udp.local
- remote_terminal - _telnet._tcp.local
get syntax
<server name>
where:<server name>
is one of:
- http
- tcp
- udp
- remote_terminal
- all - list all servers
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
Abbreviation | md t |
Access | get/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
Abbreviation | ne b r |
Access | get/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
Abbreviation | ne b s |
Access | get/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. Care should be given when adjusting this value. The system may become unstable with certain values in certain applications.
Value limits (KB = 1024 bytes):
Wallaby : Min: 10KB = 10240 Max: 70KB = 71680
Numbat: Min: 10KB = 10240 Max: 40KB = 40960
Arguments
<bytes>
Default
default: numbat: 14KB = 14336, wallaby: 20KB = 20480
Set example
> set ne b s 22528
R000008
Set OK
Get example
> get ne b s
R000007
22528
network.buffer.usage
Abbreviation | ne b u |
Access | get |
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
Abbreviation | ne c |
Access | get/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
Abbreviation | ne f |
Access | get/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
Abbreviation | ne d e |
Access | get/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.timeout
Abbreviation | ne d t |
Access | get/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
Abbreviation | ne d |
Access | get |
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
Abbreviation | ne g |
Access | get |
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
Abbreviation | ne i |
Access | get |
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
Abbreviation | ne n |
Access | get |
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
Abbreviation | ne s |
Access | get |
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
Abbreviation | ne o |
Access | get/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.
Arguments
<GPIO#>
Default
-1
Get example
> get ne o
R000004
-1
Set example
> set ne o 4
R000008
Set OK
ntp.enabled
Abbreviation | nt e |
Access | get/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
Abbreviation | nt i |
Access | get/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
Abbreviation | nt s |
Access | get/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
Abbreviation | ot p |
Access | get/set |
Description
Network port of the remote OTA upgrade server
Arguments
<port><port>
Default
443
Get example
> get ot p
R000005
443
Set example
> set ot p 443
R000008
Set OK
ota.host
Abbreviation | ot h |
Access | get/set |
Description
IP address or host name to use for the OTA server
Arguments
<[IP address]/[host name]>
Default
ota.ack.me
Get example
> get ot h
R000012
ota.ack.me
Set example
> set ot h ota2.ack.me
R000008
Set OK
Remote Terminal
remote_terminal.enabled
Abbreviation | re e |
Access | get/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
Abbreviation | re i |
Access | get/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
Abbreviation | re w |
Access | get/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
Abbreviation | re p |
Access | get/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
Abbreviation | re t |
Access | get/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
Abbreviation | se a c |
Access | get/set |
Description
The WiConnect command specified by setup.auto.cmd
is run after boot up if:
- setup.gpio.control_gpio is NOT asserted AND
- wlan.ssid is NOT configured.
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
Abbreviation | se g c |
Access | get/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
Abbreviation | se g g |
Access | get/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
Abbreviation | se g l |
Access | get/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
Abbreviation | se g m |
Access | get/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:
Mode | Event Causing Command to Run | Note |
---|---|---|
boot | The command is run on PoR (Power on Reset, or reboot) | The operation ignores the control GPIO. |
gpio | If 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. |
any | If 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
Abbreviation | se w c |
Access | get |
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:
Windows
Windows Mobile
Linux
Mac
Android
iPhone
iPod
iPad
Blackberry
Chrome
Symbian
Unknown
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.passkey
Abbreviation | se w p |
Access | get/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
Abbreviation | se w r |
Access | get/set |
Description
The root filename of the web setup: in response to a request for http://wiconnect.com, the web server returns
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:
Extension | MIME |
---|---|
.css | text/css |
.js | application/javascript |
.html/.htm | text/html |
.png | image/png |
.ico | image/x-icon |
.gif | image/gif |
.jpg/.jpeg | image/jpeg |
.txt | text/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
Abbreviation | se w s |
Access | get/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
Abbreviation | se w u |
Access | get/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
Abbreviation | so a |
Access | get/set |
Description
Auto start softap at boot up
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
Abbreviation | so c |
Access | get/set |
Description
The softap channel. If 0, use the default channel. If a wlan interface is already active, the channel variable is ignored since the wlan interface has channel set priority.
Arguments
<channel>
Default
0
Get example
> get so c
R000003
0
Set example
> set so c 6
R000008
Set OK
softap.client_list
Abbreviation | so l |
Access | get |
Description
Return list of connected softap clients
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
Abbreviation | so d |
Access | get/set |
Description
Enable DHCP server on the 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
Abbreviation | so n |
Access | get/set |
Description
Enable DNS redirect server on the 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.hide_ssid
Abbreviation | so h |
Access | get/set |
Description
When enabled, this variable disables broadcast of the softap's SSID, for security purposes.
Arguments
<0/1>
Default
0
Get example
> get so h
0
Set example
> set so h 1
Set OK
softap.idle_timeout
Abbreviation | so t |
Access | get/set |
Description
Maximum client idle time before the client is automatically disassociated.
Arguments
<# seconds>
Default
7
Get example
> get so t
R000003
7
Set example
> set so t 20
R000008
Set OK
softap.info
Abbreviation | so o |
Access | get |
Description
Soft AP connection status parameters: state, SSID, channel and clients.
Arguments
-
Default
<varies>
Get example
> get softap.info
state: up
SSID: WiConnect-#
channel: 0
clients: 1
softap.ip
Abbreviation | so i |
Access | get/set |
Description
The IP address used for the softap network interface. The gateway is set to the IP and the netmask is 255.255.255.0. Note! The softap.ip
settings are also used for web setup.
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.passkey
Abbreviation | so p |
Access | get/set |
Description
The WPA2-AES passphrase for the softap interface, or none to disable security.
Arguments
<passphrase>
Default
""
Get example
> get so p
R000000
Set example
> set so p "My softAP password"
R000008
Set OK
softap.rate.protocol
Abbreviation | so r p |
Access | get/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.
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
Abbreviation | so r t |
Access | get/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.
Arguments
<rate>
where:
Transmit Rate | |
---|---|
-1 | auto rate selection |
1, 2, 5.5, 11 | protocol = 802.11b |
6, 9, 12, 18, 24, 36, 48, 54 | protocol = 802.11g |
mcs0, mcs1, mcs2, ... , mcs7 | protocol = 802.11n 1x1 |
Default
auto
Get example
> get so r x
5.5
Set example
> set softap.rate.transmit mcs3
Set OK
softap.ssid
Abbreviation | so s |
Access | get/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
Arguments
<ssid>
Default
WiConnect-#
Get example
> get
Set example
> set
softap.url
Abbreviation | so u |
Access | get/set |
Description
Comma separated list of domains to resolve. Maximum of 63 characters.
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
Static Network Settings
static.dns
Abbreviation | st d |
Access | get/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
Abbreviation | st g |
Access | get/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
Abbreviation | st i |
Access | get/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
Abbreviation | st n |
Access | get/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
Abbreviation | st a |
Access | get/set |
Description
This setting is intended for remote TCP/TLS clients that may asynchronously close a connection.
When FALSE, a stream handle is not reused until it is manually closed.
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
Abbreviation | sy a v |
Access | get/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
Abbreviation | sy a g |
Access | get/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:
<GPIO#>
- the mapped GPIO. set to-1
to disable thefor all configured GPIOs. <type>
- a comma separated list of activity types. The following types are available:softap_rx
softap_tx
wlan_rx
wlan_tx
uartX_rx
- where X is the uart numberuartX_tx
- where X is the uart number
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
Abbreviation | sy a l |
Access | get/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
Abbreviation | sy f g |
Access | get/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
Abbreviation | sy b |
Access | get/set |
Description
Default boot application. The
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
Abbreviation | sy c b |
Access | get/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:
- scan
- ls
- help
- group getters
- stream_list
- get softap.client_list
- get setup.web.client_list
- all getters with
all
option
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
Abbreviation | sy c e |
Access | get/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
Abbreviation | sy c h |
Access | get/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
Abbreviation | sy c m |
Access | set |
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
Abbreviation | sy c p |
Access | get/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
Abbreviation | sy c t |
Access | get/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
- no timestamp appendedrtc
- numeric value of RTC with millisecond resolutionutc
- human-readable RTC value with millisecond resolution ``` Default
none
Get example
> get sy c t
2014-09-04 | 08:32:11: utc
Set example
> set sy c t rtc
system.gotosleep.timeout
Abbreviation | sy s t |
Access | get/set |
Description
The module automatically goes to sleep after a timeout period of
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
Abbreviation | sy i g |
Access | get/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
Abbreviation | sy i s |
Access | get/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 Description | Default Behavior |
---|---|---|
state 1 | Wi-Fi off | static_off |
state 2 | Error | fast_blink |
state 3 | Connecting to AP | medium_blink |
state 4 | Joined to AP | slow_blink |
Network Indicator
Network status, by default YELLOW LED on eval boards
State # | State Description | Default Behavior |
---|---|---|
state 1 | No IP address | fast_blink |
state 2 | DHCP in-progress | medium_blink |
state 3 | DHCP successful | slow_blink |
SoftAP Indicator
SoftAP status, by default RED LED on eval boards
State # | State Description | Default Behavior |
---|---|---|
state 1 | SoftAP off | static_off |
state 2 | SoftAP error | fast_blink |
state 3 | SoftAP active | medium_blink |
state 4 | Client connected | slow_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
Abbreviation | sy o |
Access | get |
Description
Returns the percentage of available heap memory currently in use. See Memory.
Arguments
-
Default
-
Get example
> get sy o
58
system.msg
Abbreviation | sy m |
Access | get/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.
Tag | Description | Tag is available for ... |
---|---|---|
@t | Timestamp | All messages |
@s | SSID | All wlan messages |
@c | Stream handle | network_opened, network_closed |
@h | Connection host/port | network_opening, network_failed |
@m | Client MAC Address | softap_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
Abbreviation | sy o e |
Access | get/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
Abbreviation | sy o g |
Access | get/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 events occurs. It is de-asserted when reading the status register.
Note: The OOB GPIO feature can be used by itself. The corresponding special function GPIO does not need to be enabled. i.e. The network.status OOB event can be triggered without setting the network.status_gpio variable.
Specify the 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 GPIO to be asserted with system.oob.event_mask.
Specify events that trigger the 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:
Event Name | Mask Value |
---|---|
ioconn.status_gpio | 0x01 |
network.status.gpio | 0x02 |
tcp.server.connected_gpio | 0x04 |
tcp.server.data_gpio | 0x08 |
udp.server.data_gpio | 0x10 |
tcp.client.data_gpio | 0x20 |
udp.client.data_gpio | 0x40 |
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
Abbreviation | sy o l |
Access | get/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
Abbreviation | sy o r |
Access | get/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
Abbreviation | sy o s |
Access | get |
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
Abbreviation | sy p m |
Access | get/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
Abbreviation | sy p |
Access | get/set |
Description
Print levels: 0=None, 1=Synchronous system msgs, 2=Synchronous logging msgs, 3=Asynchronous system msgs, 4/all=Asynchronous logging msgs.
Arguments
<[0-4]/[all]>
Default
all
Get example
> get sy p
R000005
all
Set example
> set sy p 0
R000008
Set OK
system.safemode
Abbreviation | sy s |
Access | get |
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.uuid
Abbreviation | sy u |
Access | get |
Description
Returns the hardware UUID of the module.
Arguments
Default
Get example
> get sy u
R000042
05B3203FA03133434E39423330363031B2303533
system.version
Abbreviation | sy v |
Access | get |
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
Abbreviation | sy w e |
Access | get/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
Abbreviation | sy w t |
Access | get/set |
Description
The module automatically wakes from sleep after timeout
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
Abbreviation | tc c i |
Access | get/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
Abbreviation | tc c e |
Access | get/set |
Description
Determines number of attempts to reconnect after remote server disconnects client.
- 0 - disables feature (i.e. don't reconnect after server disconnects)
- 255 - infinite retries (i.e. continuously try to reconnect after server disconnects)
- 1-254 - retry specified number of times then stop Note: This counter is reset when the interface is brought down.
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
Abbreviation | tc c a |
Access | get/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
Abbreviation | tc c t |
Access | get/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
Abbreviation | tc c p |
Access | get/set |
Description
TCP client local port. 0 = automatic.
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
Abbreviation | tc c h |
Access | get/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
Abbreviation | tc c o |
Access | get/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
Abbreviation | tc c r |
Access | get/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
Abbreviation | tc c w |
Access | get/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
Abbreviation | tc k e |
Access | get/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
Abbreviation | tc k i |
Access | get/set |
Description
Number of seconds for initial keepalive expiration.
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
Abbreviation | tc k c |
Access | get/set |
Description
Maximum number of times to retry keepalive. Once all retries are expired, close connection.
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
Abbreviation | tc k r |
Access | get/set |
Description
After initial expiration, period of retries in seconds.
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
Abbreviation | tc s i |
Access | get/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
Abbreviation | tc s a |
Access | get/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
Abbreviation | tc s c |
Access | get/set |
Description
The GPIO used to indicate whether a client is connected to the TCP server.
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
Abbreviation | tc s d |
Access | get/set |
Description
The GPIO used to indicate whether a connected client has data available to read.
Note: Disable by setting to -1.
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
Abbreviation | tc s t |
Access | get/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
Abbreviation | tc s m |
Access | get/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
Abbreviation | tc s p |
Access | get/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
Abbreviation | tc s n |
Access | get/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
Abbreviation | tc s u |
Access | get/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
Abbreviation | tc s k |
Access | get/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 |
Access | get/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
Abbreviation | ti l |
Access | get |
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
Abbreviation | ti r |
Access | get/set |
Description
The local time. Read returns epoch seconds by default, or (optionally) epoch milliseconds or UTC. Write takes an
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
Abbreviation | ti u |
Access | get |
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
Abbreviation | ti z |
Access | get/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
Abbreviation | ua b |
Access | get/set |
Description
Sets the UART baud rate. Valid baud rates are
110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200, 128000, 153600, 230400, 256000, 460800, 921600.
If the optional
Get arguments
<uart#>
Set arguments
<uart#> <baud rate> [raw]
Default
115200
Get example
> get ua b 0
R000008
115200
Set example
> set ua b 0 460800
R000008
Set OK
uart.data
Abbreviation | ua d |
Access | get/set |
Description
The number of UART data bits to use.
Arguments
<uart#> <# data bits>
Default
8
Get example
> get ua d 0
R000003
8
Set example
> set ua d 0 8
R000008
Set OK
uart.flow
Abbreviation | ua f |
Access | get/set |
Description
Turn on/off UART hardware flow control.
Arguments
<uart#> <uart#> <off/on>
Default
Get example
> get ua f 1
R000005
off
Set example
> set ua f 1 off
R000008
Set OK
uart.parity
Abbreviation | ua p |
Access | get/set |
Description
Configure UART parity selection.
Arguments
<uart#> <none/even/odd>
Default
none
Get example
> get ua p 1
R000006
none
Set example
> set ua p 1 odd
R000008
Set OK
uart.stop
Abbreviation | ua s |
Access | get/set |
Description
The number of UART stop bits to use.
Arguments
<uart#> <# stop bits>
Default
1
Get example
> get ua s 0
R000003
1
Set example
> set ua s 0 1
R000008
Set OK
UDP Client
udp.client.auto_interface
Abbreviation | ud c i |
Access | get/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
Abbreviation | ud c a |
Access | get/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
Abbreviation | ud c h |
Access | get/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
Abbreviation | ud c p |
Access | get/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
Abbreviation | ud s i |
Access | get/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
Abbreviation | ud s a |
Access | get/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
Abbreviation | ud s d |
Access | get/set |
Description
Specify a GPIO to be asserted HIGH when client data is available to be read.
Note: Disable by setting to -1.
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
Abbreviation | ud s l |
Access | get/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
Abbreviation | ud s p |
Access | get/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
Abbreviation | ud s h |
Access | get/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
Abbreviation | ud s r |
Access | get/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
Abbreviation | wl a |
Access | get/set |
Description
The default antenna used by the Wi-Fi radio. 1 or int:internal, 2 or ext:external, or auto. 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
R000003
1
Set example
> set wl a auto
R000008
Set OK
wlan.auto_join.enabled
Abbreviation | wl o e |
Access | get/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
Abbreviation | wl o r |
Access | get/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
Abbreviation | wl o d |
Access | get/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.hide_passkey
Abbreviation | wl h |
Access | get/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
Abbreviation | wl i |
Access | get |
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
Abbreviation | wl j s |
Access | get |
Description
Result of most recent join attempt. Returns a code:
Code | Description |
---|---|
0 | Haven't tried to join |
1 | Success - Joined network |
2 | Joining network |
3 | SSID not set |
4 | No password set and AP requires security |
5 | Specified security not supported by AP |
6 | Network not found |
7 | Failed to join network. All attempts to join have failed |
8 | Join aborted. network_down called while trying to join |
Arguments
-
Default
<varies>
Get example
> get wl j s
1
wlan.join.retries
Abbreviation | wl j r |
Access | get/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 '
Default
3
Get example
> get wl j r
R000003
5
Set example
> set wl j r 5
R000008
Set OK
wlan.join.timeout
Abbreviation | wl j t |
Access | get/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
Abbreviation | wl m |
Access | get |
Description
Returns the wlan MAC address.
Arguments
-
Default
varies
Get example
> get wl m
R000019
4C:55:CC:01:23:45
wlan.passkey
Abbreviation | wl p |
Access | get/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]>
- WPA passphrase - length: 8 - 63 characters
- WPA PSK - length: 64 characters
- WEP key - A 40-bit WEP key is specified as a 5-byte, for example:
1122334455
A 104-bit WEP key is specified as 13-byte hex string, for example:112233445566778899aabbccdd
\0
sets a NULL passphrase.
Default
""
Get example
> get wl p
R000000
Set example
> set wl p "Use the force!"
R000008
Set OK
wlan.powersave.listen_interval
Abbreviation | wl p l |
Access | get/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>
<sleep time>
is in the range 1-10. If<sleep time>
= 0, the WLAN subsystem wakes to listen to every DTIM.
Default
0
Get example
> get wl p l
R000003
0
Set example
> set wl p l 90
R000008
Set OK
wlan.powersave.mode
Abbreviation | wl p m |
Access | get/set |
Description
Wi-Fi powersave mode. For lowest poweruse mode = 1
.
Arguments
<mode>
Description | |
---|---|
0 | no powersave |
1 | powersave with PS-Poll. Lowest power mode |
2 | powersave 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
Abbreviation | wl p s |
Access | get/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.
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
Abbreviation | wl r p |
Access | get/set |
Description
WLAN client data rate protocol selection.
Arguments
<11b/11g/auto>
Value | Description |
---|---|
11b | Restrict 802.11 PHY data rates to 802.11b |
11g | Restrict 802.11 PHY data rates to 802.11g |
auto | Automatically 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
Abbreviation | wl r x |
Access | get/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:
Description | |
---|---|
auto | auto rate selection |
1, 2, 5.5, 11 | protocol = 802.11b |
6, 9, 12, 18, 24, 36, 48, 54 | protocol = 802.11g |
mcs0, mcs1, mcs2, ... , mcs7 | protocol = 802.11n 1x1 |
Default
auto
Get example
> get wl r x
5.5
Set example
> set wlan.rate.transmit mcs3
Set OK
wlan.roam.threshold
Abbreviation | wl r t |
Access | get/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
Abbreviation | wl r |
Access | get/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
Abbreviation | wl s a |
Access | get/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
Abbreviation | wl s m |
Access | get/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 : | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | channel_bitmask | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Channel 1 only | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0x001 | ||
Channels 11/6/1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0x421 | ||
All channels | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0x7FF |
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
Abbreviation | wl s h |
Access | get/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
Abbreviation | wl s n |
Access | get/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
Abbreviation | wl s p |
Access | get/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
Abbreviation | wl s r |
Access | get/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
Abbreviation | wl s t |
Access | get/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
Abbreviation | wl c |
Access | get/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
Abbreviation | wl s |
Access | get/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
Abbreviation | wl t |
Access | get/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 module. See Module Comparison.
Arguments
<dBm>
Default
31
Get example
> get wl t
R000004
31
Set example
> set wl t 15
R000008
Set OK