@@ -15,6 +15,8 @@ The ntpc example:
1515
1616- Connects to NTP servers (default: pool.ntp.org)
1717
18+ - Supports NTP server configuration learned from DHCP option 42
19+
1820- Starts the NTP client in the background for continuous synchronization
1921
2022- Provides commands to check status and stop the NTP client
@@ -38,12 +40,16 @@ This example requires the following NuttX configuration options:
3840
3941Additional configuration options:
4042- CONFIG_NETUTILS_NTPCLIENT_SERVER: NTP server hostname (default: "pool.ntp.org")
43+ - CONFIG_NETUTILS_DHCPC: Enable DHCP client support when NTP servers should be
44+ learned dynamically from DHCP option 42
4145
4246Usage
4347-----
4448
45491. Configure your NuttX build with networking support
46502. Ensure network connectivity is established (e.g., via NSH network commands)
51+ If DHCP provides NTP servers through option 42, ``ntpc `` can use that
52+ server list automatically.
47533. Build and flash the image to your target board
48544. Run the commands:
4955 - ``ntpcstart ``, ``ntpcstop ``, ``ntpcstatus ``
@@ -95,6 +101,15 @@ give the proper time and date.
95101 nsh> date
96102 Fri, Sep 05 18:49:37 2025
97103
104+ DHCP-provided NTP servers
105+ -------------------------
106+
107+ When ``CONFIG_NETUTILS_DHCPC `` is enabled, the DHCP client can pass NTP
108+ server IPv4 addresses learned from DHCP option 42 to ``ntpc ``.
109+
110+ This allows ``ntpc `` to run without a fixed server hostname in the
111+ configuration and to follow NTP server updates delivered by DHCP.
112+
98113Notes
99114-----
100115
0 commit comments