User manual

WiFly GSX/EZX
www.rovingnetworks.com WiFly-RN-UM 11/9/2011
809 University Avenue Los Gatos, CA 95032 Tel (408) 395-6539 info@RovingNetworks.com
~ 37 ~
The above diagram shows the transitions between the Sleep state and Awake state based on the sleep and
wake timers.
10.1.1. UDP sleep and Connection timers
In UDP Only protocol mode (set ip proto 1), the autoconn timer is used as an auto-sleep timer. Upon the
start of transmission of the first UDP data packet this timer will count down, after which the module will go
to sleep.
set sys autosleep <value> // UDP Only mode: sets the auto-sleep timer. Setting value=0 disables
autosleep timer
The UDP auto-sleep timer is set using two variables. The timer interval is a product of the autosleep value
and the comm flush timer (in milli seconds). The timer is decremented every “product” milliseconds.
For example, if you need a UDP sleep timer of 40 milli seconds, you need to set the following variables:
set sys autosleep 4 // Sets the autosleep value to 4
set comm timer 10 // Sets the comm timer to 10 ms (default value)
The resulting UDP sleep timer will be 4*10 ms = 40 ms. You can also use a combination of autosleep = 2
and comm timer = 20 ms to achieve the same effect.
Using a minimum value of 2 (when the default flushtime=10 ms) is recommended to ensure that the UDP
packet gets transmitted. For larger packets the value should be increased.
10.1.2. TCP Connection Timers
Opening a TCP Connection:
In TCP-Client mode, the auto-conn timer controls the establishment of a socket connection. When set, the
device automatically periodically attempts to establish a connection when the timer expires.
set sys autoconn <secs>
This command causes the module periodically connect to the host. The timer <secs> determines how often
to connect to the stored remote host. If set to 1, the module will only make one attempt to auto connect upon
power up. If set to 2 or greater auto connect will re-open the connection after the connection is closed.
Default=0 disables.
For auto connect timer to work, the remote host’s IP address and port number needs to be configured in the
WiFly GSX module.