Skip to content

Commit

Permalink
Fixed minors in text
Browse files Browse the repository at this point in the history
  • Loading branch information
rogergranada committed Apr 6, 2018
1 parent 9c661fc commit 81a4a20
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
15 changes: 10 additions & 5 deletions docs/source/jetson/peripheral/network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ Below in this file you should add the address of the network to which you want t
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
restrict 192.168.2.1
where ``192.168.2.1`` is the IP address of the client machine. In order to allow computers from the network to request the time and broadcast the current time, add the following lines:

Expand All @@ -155,6 +154,13 @@ where ``192.168.2.1`` is the IP address of the client machine. In order to allow
# (Again, the address is an example only.)
broadcast 192.168.2.255
Finally, to broadcast time on the local network you should de-comment the last two lines:

.. code-block:: bash
disable auth
broadcastclient
An example of the ``ntp.conf`` file in the server can be seen in the `Github page <https://raw.githubusercontent.com/lsa-pucrs/platypus_doc/master/docs/source/jetson/scripts/ntp.server.conf>`_.
Having configurated the server properly, you have to start the daemon by running:

Expand Down Expand Up @@ -205,16 +211,15 @@ Next step we have to configure the daemon in order to receive the correct time f
server 192.168.2.100
# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com
# server ntp.ubuntu.com
server 127.127.1.0
fudge 127.127.1.0 stratum 10
Finally, to listen to time broadcasts on the local network you should de-comment the last two lines:
In the end of the file, disable auth as you trust everybody on the network.

.. code-block:: bash
disable auth
broadcastclient
An example of the configuration used in ``ntp.conf`` in the client machine, access the `Github page <https://raw.githubusercontent.com/lsa-pucrs/platypus_doc/master/docs/source/jetson/scripts/ntp.client.conf>`_. Having configurated the client, you have to restart the NTP daemon and wait few seconds to update the clock. Restart the daemon by running:

Expand Down Expand Up @@ -249,7 +254,7 @@ In case the date is not automatically updated, you can force the update by stopp
.. code-block:: bash
$ sudo service ntp stop
$ sudo ntpd -s 192.168.2.100
$ sudo ntpdate -t 3 -s 192.168.2.100
$ sudo service ntp start
A script to perform the manual update can be found in the `Github page <https://raw.githubusercontent.com/lsa-pucrs/platypus_doc/master/docs/source/jetson/scripts/update_clock.sh>`_. Finally, check if the date is updated:
Expand Down
3 changes: 3 additions & 0 deletions docs/source/jetson/scripts/interfaces.server
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ iface wlan0 inet static
dns-nameservers 192.168.2.1 8.8.8.8
wpa-ssid Tegra-WLAN
wpa-psk edcae6b3d85a41abbc9a3a67e26bc5943ce6faf1c4146db9bdad462b40cab1af

# wpa-psk is generated from Tegra wifi password to HEX using the site
# http://jorisvr.nl/wpapsk.html
13 changes: 6 additions & 7 deletions docs/source/jetson/scripts/ntp.client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

Expand All @@ -16,14 +15,14 @@ filegen clockstats file clockstats type day enable
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.br.pool.ntp.org
server 1.br.pool.ntp.org
server 2.br.pool.ntp.org
server 3.br.pool.ntp.org
#server 0.br.pool.ntp.org
#server 1.br.pool.ntp.org
#server 2.br.pool.ntp.org
#server 3.br.pool.ntp.org
server 192.168.2.100

# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com
#server ntp.ubuntu.com
server 127.127.1.0
fudge 127.127.1.0 stratum 10

Expand Down Expand Up @@ -54,4 +53,4 @@ restrict ::1
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
disable auth
broadcastclient
#broadcastclient
7 changes: 2 additions & 5 deletions docs/source/jetson/scripts/ntp.server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

Expand Down Expand Up @@ -41,20 +40,18 @@ restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
restrict 192.168.2.1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust

restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
broadcast 192.168.2.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
disable auth
broadcastclient
2 changes: 1 addition & 1 deletion docs/source/jetson/scripts/update_clock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ $# -ne 1 ]]; then
echo "./update_clock.sh 192.168.2.100"
elif [[ $1 =~ ^[0-9]+\.[0-9]+\.+[0-9]+\.[0-9]+$ ]]; then
sudo service ntp stop
sudo ntpd -s $1
sudo ntpdate -t 3 -s $1
sudo service ntp start
else
echo "ERROR: $1 is not a valid IP address"
Expand Down

0 comments on commit 81a4a20

Please sign in to comment.