WiSnap User Manual 4.41 05282015-ML
Page 37
mode
3 = Ad hoc mode
1 = Connected
3 = No IP
4 = Connecting
5 = Challenge
for password
10.9 Using the Real Time Clock Function
The module’s real-time clock keeps track of the number of seconds since the module was powered on and the actual time
when the module synchronized with the sNTP time server. By default, the module keeps track of up time but does not
synchronize with the time server because this synchronization requires the module to be associated with a network that can
access the sNTP server. The real-time clock reads the time in seconds since 1970, which corresponds to the UNIX time.
In firmware version 2.23 and higher, you can set the RTC value in seconds using the
set time rtc
<
value
> command.
The default sNTP server is:
ADDR=129.6.15.28:123
ZONE=7 (GMT -7)
Use the
show time
command to see the current time and uptime as shown below:
<2.23> show t
Time=08:43:10
UpTime= 10 s
To set the time, use the
time
command:
<2.23> show t
Time NOT SET
UpTime= 8 s
<2.23> time
<2.23> show t
Time=08:51:31
UpTime= 15 s
NOTE:
The module must be associated with a network for the module to contact the sNTP server.
The module can also be configured to get the time whenever it powers up using the
set time enable 1
command. If you set
the time enable to a value greater than 1, the module pulls the time continuously every <
value
> minutes.
For example, to configure the module to get time upon power up, see the following example:
<2.23> set time enable 1
AOK
<2.23> get time
ENA=1
ADDR=129.6.15.28:123
ZONE=7
To view a complete listing of the time variable, use the following command:
<2.23> show t t
Time=09:02:10
UpTime=653 s
RTC=1293567548
Restarts=1