NTP Network Time Protocol

From edgertronic high speed video camera
Jump to navigation Jump to search

Camera time

Normally the camera gets its time set via the web user interface. The host computer's current date and time is passed to the camera's battery powered hardware real time clock. After that, each time the camera powers on, the hardware real time clock is read to set the Linux operating system time.

The camera time can also be set automatically, over the network, using NTP - Network Time Protocol. The NTP daemon, when configured, will regularly update the Linux wall clock. If the NTP server is located on the same local area network (subLAN), and several cameras are used, the difference in time of the Linux wall clocks in the cameras should be maximum of a few milliseconds.

NTP configuration

WebUI based NTP configuration

As of release v3.5.3 you can set the NTP server address via the web user interface. Go into settings by clicking on the wrench. You need to first select pro mode, then the network tab will be visible. In the network tab you can set the NTP DNS name or IP address. In the example, I am using a TimeMachine TM1000A which is configured on my local area network at address 10.111.0.169.

Manual configuration

You have full control over the NTP configuration when you provide provide the file ntp.conf by saving the file in the root directory on either the SD card or a USB storage device. Power cycle the camera and the ntp.conf file will be stored in the camera's internal read-write file system (/mnt/rw/etc/ntp.conf). Power cycle the camera again and NTP will be enabled and using the configuration from the ntp.conf file. If you have several cameras to configure, create a keep-files file in the root directory of the SD card. Be sure to later delete the keep-files file if you use the SD card for storing videos.

Example ntp.conf file

Change the server value to the NTP server of your choice. In the example below it is set to pool.ntp.org.

driftfile /mnt/rw/etc/ntp.drift
statsdir /var/log/ntp_statistics

# Specify one or more NTP servers.
server pool.ntp.org

Testing NTP configuration

You can telnet into the camera and run

date 010100002001.30 ; hwclock -w

which will set the battery powered hardware real time clock to Mon Jan 1 00:00:30 UTC 2001. Power cycle the camera. Check the camera's date via the web interface or telnet into the camera and run

date

The current time and date should be shown. If not, check /var/log/messages or via the web interface

http://10.11.12.13/static/log/messages 

replacing 10.11.12.13 with your camera's IP address as necessary.

Power cycle the camera. When it reboots, verify the camera time is set correctly.

DNS configuration

If you use a computer name, such as pool.ntp.org when specifying the server in the ntp.conf file, then you need to make sure the camera's DNS server configuration will work in your network environment.