Wiren Board 6: WBE2R-R-GPS GPS/GLONASS Extension Module:NTPD PPS Setup/en: различия между версиями
(Новая страница: «600px|thumb|right|Check for NMEA data») |
(Новая страница: «In the figure, the fragments of NMEA messages are highlighted in red, showing that the GPS module has reliably recorded its position and receives the correct data…») |
||
Строка 32: | Строка 32: | ||
[[File:NMEA_ok.png|600px|thumb|right|Check for NMEA data]] | [[File:NMEA_ok.png|600px|thumb|right|Check for NMEA data]] | ||
In the figure, the fragments of NMEA messages are highlighted in red, showing that the GPS module has reliably recorded its position and receives the correct data. Details see description [https://wikipedia.org/wiki/NMEA_0183 NMEA] messages. | |||
== NTPD == | == NTPD == |
Версия 18:12, 19 июля 2019
THE ARTICLE IS IN PROGRESS!
The WBE2R-R-GPS module allows you to autonomously synchronize the exact time of the controller by GLONASS/GPS signals and use the controller as a source of accurate NTP time on the network.
The module supports PPS signal output to the controller's GPIO processor. Kernel modules are supported by module pps_gpio.
It is further assumed that the module is installed into the controller that is configured and functioning correctly checked (see section Wiren_Board 6:_WBE2R-R-GPS_GPS/GLONASS_Extension_Module/en
NMEA and PPS
The controller module is represented by two devices - serial port /dev/ttyMOD3 and signal transmission device pps /dev/pps2 Port /dev/ttyMOD3 transmits data from the module via standard Protocol NMEA, including position, receiver speed, and time and date messages. Usually the information is updated once per second. The module is made on the chip SIM68, debugging UART-port is not available in the current hardware modification.
The pps pulse is precisely synchronized with the beginning of each second, which makes it possible to increase the accuracy of the time determination on the controller with microsecond accuracy.
Check for pps signal
At the command prompt, run ppstest /dev/pps2
.
The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file /sys/class/pps/pps2/assert
).
Check for data in NMEA format
To verify that the system can receive data from the GPS module in NMEA format, run the following command
cat /dev/ttyMOD3
In the figure, the fragments of NMEA messages are highlighted in red, showing that the GPS module has reliably recorded its position and receives the correct data. Details see description NMEA messages.
NTPD
В качестве прикладного ПО используется служба ntpd. По умолчанию сервер ntpd настроен на получение времени от других серверов в интернете по протоколу ntp. Для использования сигналов времени от GPS/GLONASS-модуля необходимо выполнить ряд шагов по настройке (см. далее).
Текущие источники точного времени для NPTD
Источники точного времени помечены специальными символами:
Символ | Значение |
---|---|
* | используемый в настоящее время источник |
# | источник выбран, но слишком удален |
o | источник выбран, используется сигнал PPS |
+ | источник выбран, готов к использованию |
x | источник забракован |
. | источник выбран последним из списка кандидатов |
- | источник забракован алгоритмом выбора |
пробел | источник забракован |
Обратите внимание на то, что драйвер ntpd 28 (shared memory driver), смотрите далее, который позволяет использовать функции gpsd, не отмечается символом 'o', даже если используется PPS. При правильной работе он будет отмечен символом '*'.
GPSD
Демон gpsd представляет собой унифицированный протокол взаимодействия с приемниками спутниковых сигналов GPS/GLONASS. В нашем случае мы будем использовать его как промежуточный слой между модулем и сервером ntpd (драйвер с кодом 28). Демон устанавливается командой
apt-get install gpsd
Настройка
Настройка gpsd
Настройка ntpd
В настройках сервера ntpd нам необходимо указать два новых источника точного времени: NMEА и PPS.