Network

network.arp.lock_enabled

Abbreviationne a l
Accessget/set

Description

Lock destination ARP entry to avoid streaming delays due to address resolution.

Before an IP packet can be transmitted/received the network stack needs to resolve the IP address into a MAC address. This is done with Address Resolution Protocol (ARP).

When the IP is resolved it is cached in the ARP table. Due to RAM limitations, the ARP table can store only a limited number of entries. Old entries are replaced by new ones.

This can cause intermittent delays when streaming data via TCP/UDP. During TCP/UDP transmission, if the socket's destination MAC is replaced in the ARP cache, ARP needs to resolve the destination MAC address before the next TCP/UDP packet can go out. ARP can take 100s of ms.

To avoid these intermittent delays, you can lock the destination ARP entry when streaming by setting network.arp.lock_enabled to true.

If network.arp.lock_enabled is true, after a TCP client/server, UDP client/server, or websocket client/server stream is opened, the remote side's ARP entry is stored in a static part of the ARP cache.

When the stream is closed, the static entry is removed.

The socket then streams without ARPs.

Note: It is recommended to increase the value of network.arp.table_size when using this feature.

Arguments

0|true/1|false

Default

0

Properties

Supported Platforms

Set example

> set ne a l true
R000008
Set OK

Get example

> get ne a l
R000003
0

network.arp.table_size

Abbreviationne a t
Accessget/set

Description

Configures the maximum number of entries to cache in the ARP table. See network.arp.lock_enabled.

Arguments

<max_entries>

where <max_entries> is an integer from 3 to 16.

Default

3

Properties

Supported Platforms

Set example

> set ne a t 5
R000008
Set OK

Get example

> get ne a t
R000003
3

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

Properties

Supported Platforms

Set example

> set ne b r 20
R000008
Set OK

Get example

> get ne b r
R000004
20

network.buffer.control_size

Abbreviationne b c
Accessget/set

Description

Configure the size of the network buffer used for control packets. This buffer is typically used for I/O control packets to the Wi-Fi chip, TCP fragment buffers, and TCP ACK/NAK packets. If data writes are sufficiently large (of the order of hundreds of bytes), 4K (the default 4096 bytes) is sufficient for the control buffer.

The control buffer may become depleted if data writes are small (of the order of several bytes).

Note: network.buffer.rxtx_ratio has no effect on this buffer.

Arguments

<bytes>

where <bytes> is in the range 2048 to 32768

Default

4096

Properties

Supported Platforms

Set example

> set ne b c 22528
R000008
Set OK

Get example

> get ne b c
R000006
4096

network.buffer.size

Abbreviationne b s
Accessget/set

Description

The total size of the network buffers, in bytes.

his 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):

ModuleMin (bytes)(KB)Max (bytes)(KB)Default (bytes)(KB)
Wallaby AMW0042048020KB7168070KB2048020KB
Numbat AMW1062048020KB7168070KB2048020KB
Numbat AMW0061024010KB4096040KB2048020KB

Arguments

<bytes>

Default

Properties

Supported Platforms

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

-

Supported Platforms

Get example

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

network.default_interface

Abbreviationne f
Accessget/set

Description

The default network interface used by various network commands and variables.

Commands:

Variables:

Arguments

<wlan/softap>

Default

wlan

Properties

Supported Platforms

Get example

> get ne f
R000006
wlan

Set example

> set ne f softap
R000008
Set OK

network.dns.timeout

Abbreviation ne d t
Access get

Description

This variable controls the amount of time the device will wait while it attempts to resolve a hostname via DNS.

Note: This timeout is applied to all hostname resolutions, i.e. it is applied to TCP/UDP/HTTP and so on.

See Networking and Security, DNS Client.

Arguments

<timeout ms>

where:

Default

6000

Supported Platforms

Get example

> get ne d t
R000006
6000

Set example

> set ne d t 8000
R000008
Set OK

network.tcp.delivery_type

Abbreviationne c d
Accessget/set

Description

Choose optimization strategy for TCP timers.

This variable configures the internal TCP timers for the required application.

In applications other than real-time streaming applications, the strategy is set to normal, to balance reliability, low latency, and throughput. For example, for cloud/internet applications the normal delivery type optimization is appropriate.

For real-time streaming applications, it may be preferable to optimize for low latency, with some sacrifice in reliability. For example, streaming TCP data via a softAP connection may require the realtime delivery type optimization.

Note: This configures the delivery type for all TCP connections that are opened after this value is set.

Arguments

<normal / realtime>

where:

Default

normal

Properties

Supported Platforms

Get example

> get ne c d
R000008
normal

Set example

> set ne c d realtime
R000008
Set OK

network.tls.ca_cert

Abbreviationne t a
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

Properties

Supported Platforms

Get example

> get ne t a
R000017
geotrust_ca.pem

Set example

> set ne t a globalsign_ca.pem
R000008
Set OK

network.tls.client_cert

Abbreviationne t c
Accessget/set

Description

The filename of the TLS client cert.

Arguments

<TLS cert filename>

Default

null

Properties

Supported Platforms

Get example

> get ne t c

Set example

> set ne t c client_cert.pem
R000008
Set OK

network.tls.client_key

Abbreviationne t k
Accessget/set

Description

The filename of the TLS client cert key.

Arguments

<TLS cert key filename>

Default

null

Properties

Supported Platforms

Get example

> get ne t k

Set example

> set ne t k client_cert_key_filename
R000008
Set OK

network.tls.version

Abbreviationne t v
Accessget/set

Description

Specifies the maximum TLS version used. By default the client/server negotiates which TLS version/cipher to use but sometimes it is necessary to force a maximum version.

Arguments

<10/12>

where:

Default

12

Properties

Supported Platforms

Get example

> get ne t v
12

Set example

> set ne t v 10
R000008
Set OK