TCP Client
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
Properties
Supported Platforms
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
Properties
Supported Platforms
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
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
Get example
> get tc c t
R000006
5000
Set example
> set tc c t 6500
R000008
Set OK
tcp.client.connected_str
Abbreviation | tc c c |
Access | get/set |
Description
Set the value of a message displayed on the ZentriOS terminal (sent to the UART), when the device auto connects as a TCP client to a TCP server, in stream mode.
Arguments
<message>
Default
Empty string
Supported Platforms
Set example
> set tc c c *READY*
R000008
Set OK
Get example
> get tc c c
R000009
*READY*
tcp.client.disconnected_str
Abbreviation | tc c d |
Access | get/set |
Description
Set the value of a message displayed on the ZentriOS terminal (sent to the UART), when the device disconnects as a TCP client from a TCP server, in stream mode.
Arguments
<message>
Default
Empty string
Supported Platforms
Set example
> set tc c d *CLOSED*
R000008
Set OK
Get example
> get tc c d
R000010
*CLOSED*
tcp.client.local_port
Abbreviation | tc c p |
Access | get/set |
Description
TCP client local port. 0 = automatic.
If you set this value, the first connection is made using the specified local port.
Subsequent additional TCP client connections determine the port by incrementing the last port used. If the specified port is X, the first subsequent connection uses port X+1. The next TCP client connection uses port X+2, and so on.
To reset the local port back to X, reboot the client.
Arguments
<port>
Default
0
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
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
Properties
Supported Platforms
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
Properties
Supported Platforms
Get example
> get tcp.client.remote_port
Set example
> set tc c o 5000
Set OK
tcp.client.remote_send
Abbreviation | tc c s |
Access | get/set |
Description
Text string
Arguments
<message>
Default
Empty string
Supported Platforms
Set example
> set tc c s Hello
Set OK
Get example
> get tcp.client.remote_send
Hello
tcp.client.retries
Abbreviation | tc c r |
Access | get/set |
Description
Maximum TCP client connection retry attempts.
Arguments
<max #retries>
Default
3
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
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
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
Get example
> get tc c w
R000006
1000
Set example
> set tc c w 2000
R000008
Set OK