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 .
See TCP Client .
Arguments
<0-255>
Default
0
Properties
Supported Platforms
- AMW007
- AMW037
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 the specified tcp.client.remote_host when the network interface is brought up.
To enable TLS, see tcp.client.tls_enabled .
See TCP Client .
Note
: If
tcp.client.auto_start
is enabled, and you close the
tcp.client (TCPC) stream
after it connects, you cannot open it again using the
tcp_client
command. To trigger
tcp.client.auto_start
again, restart the device network:
network_restart
. The TCP client then automatically reconnects.
Arguments
<0/1>
Default
0
Properties
Supported Platforms
- AMW007
- AMW037
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:
See TCP Client .
Arguments
<milliseconds>
Default
5000
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
- AMW007
- AMW037
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 Gecko OS terminal (sent to the UART), when the device auto connects as a TCP client to a TCP server, in stream mode.
Note : This message is displayed only when the device is in STREAM mode .
See TCP Client .
Arguments
<message>
Default
Empty string
Supported Platforms
- AMW007
- AMW037
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 Gecko OS terminal (sent to the UART), when the device disconnects as a TCP client from a TCP server, in stream mode.
Note : This message is displayed only when the device is in STREAM mode .
See TCP Client .
Arguments
<message>
Default
Empty string
Supported Platforms
- AMW007
- AMW037
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.
See TCP Client .
Arguments
<port>
Default
0
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
- AMW007
- AMW037
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.
See TCP Client .
Arguments
<domain/ip address>
Default
null
Properties
Supported Platforms
- AMW007
- AMW037
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.
See TCP Client .
Arguments
<port>
Default
3000
Properties
Supported Platforms
- AMW007
- AMW037
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
Maximum TCP client connection retry attempts.
See TCP Client .
Arguments
<max #retries>
Default
3
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
- AMW007
- AMW037
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.
See TCP Client .
Arguments
<milliseconds>
Default
1000
Properties
- available in Safe Mode
- preserved by NVM Backup
Supported Platforms
- AMW007
- AMW037
Get example
> get tc c w
R000006
1000
Set example
> set tc c w 2000
R000008
Set OK
tcp.client.tls_enabled
Abbreviation
tc c s
Access
get/set
Description
Enables TLS for the tcp.client.auto_start feature.
The TLS certs are configured with the following variables:
See TLS Client .
Arguments
<0/1>
where
-
0
: TLS disabled -
1
: TLS enabled
Default
0
Properties
Supported Platforms
- AMW007
- AMW037
Get example
> get tc c s
0
Set example
> set tc c s 1
Set OK