1vv0301515 Rev.1
Page 50 of 59
2018-07-18
Clock and Alarm Functions
The module provides Real Time Clock and Alarm features. The next chapters describe examples
showing AT commands used to:
•
set up the right time
•
check the actual time
•
set up an alarm time
•
delete an alarm time
2.12.1.
Clock
2.12.1.1.
Set Module Clock
Use the following AT command to update the module clock.
AT+CCLK=<time>
<time>
is a string type value. Its format is "yy/MM/dd,hh:mm:ss"
Set up the clock to 12 March 2018 at 10h 27m 30s
AT+CCLK="18/03/12,10:27:30"
OK
The time is successfully set. The updated time starts immediately after the time setting command.
2.12.1.2.
Read the Current Date and Time
Use the following AT command to display the current module time.
AT+CCLK?
Read the current time:
AT+CCLK?
+CCLK: "18/03/12,10:29:05"
Current date/time is: 12 March 2018 10h 29m 05s
OK
2.12.2.
Alarm
2.12.2.1.
Set Alarm
Use the following AT command to set up the alarm configuration:
AT+CALA=<time>[,<n>[,<type>[,<text>[<recur>]]]]
Example
Read the current time.
AT+CCLK?
+CCLK: "18/03/12,10:33:47"
OK
Set up the alarm configuration: <n>=0 is the alarm index, <type> and <text> are dummy values.
AT+CALA="18/03/12,10:44:30",0,1,"Dummy"
OK
AT+CCLK?