7. LW3 Programmers’ Reference
RAP-B511 series
– User's Manual
72
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
7.6.2.
Enable Getting NTP from DHCP server
When the DHCP server assigns an IP address to the device, there is an option to request an NTP time
information. When the RAP-B511 connected to the internet, the NTP time is updated repeatedly.
Command and Response
ç
SET·/SYS/MB/NTP.NtpServerFromDhcp=
<enable_ntp_dhcp>
æ
pw·/SYS/MB/NTP.NtpServerFromDhcp=
<enable_ntp_dhcp>
Parameters
<enable_ntp_dhcp>
true:
Enable getting NTP from DHCP server
false:
Disable getting NTP from DHCP server
Example
ç
SET /SYS/MB/NTP.NtpServerFromDhcp=true
æ
pw /SYS/MB/NTP.NtpServerFromDhcp=true
7.6.3. Query the Active NTP Server
Command and Response
ç
GET·/SYS/MB/NTP.ActiveNtpServer
æ
pr·/SYS/MB/NTP.ActiveNtpServer=
<server_address>
Parameters
<server_address>
NTP server address (IP address or URL)
Example
ç
GET /SYS/MB/NTP.ActiveNtpServer
æ
pr /SYS/MB/NTP.ActiveNtpServer=pool.ntp.org
7.6.4.
Set NTP server
Command and Response
ç
SET·/SYS/MB/NTP.NtpServer=
<server_address>
æ
pw·/SYS/MB/NTP.NtpServer=
<server_address>
Parameters
<server_address>
NTP server address (IP address or URL)
Example
ç
SET /SYS/MB/NTP.NtpServer=pool.ntp.org
æ
pw /SYS/MB/NTP.NtpServer=pool.ntp.org
7.6.5.
Synchronize with the NTP server
Command and Response
ç
CALL·/SYS/MB/NTP:updateTime()
æ
mO·/SYS/MB/NTP:updateTime
Example
ç
CALL /SYS/MB/NTP:updateTime()
æ
mO /SYS/MB/NTP:updateTime
7.6.6. Query the Last Synchronization
Command and Response
ç
GET·/SYS/MB/RTC.LastUpdate
æ
pr·/SYS/MB/RTC.LastUpdate=
<last_sync>
Parameters
<last_sync>
Displays the last synchronization time.
Example
ç
GET /SYS/MB/RTC.LastUpdate
æ
pr /SYS/MB/RTC.LastUpdate=2019-04-30T16:36:41
7.6.7. Query the Universal Time Coordinated Time (UTC)
Command and Response
ç
GET·/SYS/MB/RTC.UtcTime
æ
pr·/SYS/MB/RTC.UtcTime=
<utcTime>
Parameters
<utcTime>
Displays the date and the UTC time.
Example
ç
GET /SYS/MB/RTC.UtcTime
æ
pr /SYS/MB/RTC.UtcTime=2019-05-16T10:41:38