Wiren Board 6: WBE2R-R-GPS GPS/GLONASS Extension Module:NTPD PPS Setup/en: различия между версиями

Материал из Wiren Board
(Новая страница: «The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).»)
(Новая страница: «=== Ntpd setting === In ntpd server settings we need to specify two new sources of exact time: NMEA and PPS.»)
 
(не показано 11 промежуточных версий этого же участника)
Строка 26: Строка 26:
The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).
The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).


=== Проверяем наличие данных в формате NMEA ===
=== Check for data in NMEA format ===
Чтобы убедиться в том, что система может получать данные от GPS-модуля в формате NMEA, выполните команду  
To verify that the system can receive data from the GPS module in NMEA format, run the following command  
<pre>cat /dev/ttyMOD3</pre>
<pre>cat /dev/ttyMOD3</pre>


[[File:NMEA_ok.png|600px|thumb|right|Проверка поступления NMEA-данных]]
[[File:NMEA_ok.png|600px|thumb|right|Check for NMEA data]]


На рисунке красным выделены фрагменты NMEA-сообщений, показывающие, что GPS-модуль достоверно зафиксировал свою позицию и получает верные данные. Подробно смотрите описание [https://wikipedia.org/wiki/NMEA_0183 NMEA]-сообщений.
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 ==
В качестве прикладного ПО используется служба ntpd. По умолчанию сервер ntpd настроен на получение времени от других серверов в интернете по протоколу ntp. Для использования сигналов времени от GPS/GLONASS-модуля необходимо выполнить ряд шагов по настройке (см. далее).
Ntpd service is used as application SOFTWARE. By default, the ntpd server is configured to receive time from other servers on the Internet using ntp. To use the time signals from the GPS/GLONASS module, a number of configuration steps are required (see below).


=== Текущие источники точного времени для NPTD ===  
=== Current accurate time sources for NPTD ===  


[[File:Ntpqp_inint.png|700px|thumb|right|]]
[[File:Ntpqp_inint.png|700px|thumb|right|]]


Источники точного времени помечены специальными символами:
The exact time sources are marked with special characters:


{| class="wikitable"
{| class="wikitable"
! Символ  !! Значение
! Symbol !! Value
|-
|-
| * || используемый в настоящее время источник
| * || current source used
|-
|-
| # || источник выбран, но слишком удален
| # || source selected but too remote
|-
|-
| o || источник выбран, используется сигнал PPS
| o || source selected, PPS signal used
|-
|-
| + || источник выбран, готов к использованию
| + || source selected, ready to use
|-
|-
| x || источник забракован
| x || source rejected
|-
|-
| . || источник выбран последним из списка кандидатов
| . || source selected last from the list of candidates
|-
|-
| - || источник забракован алгоритмом выбора
| - || source rejected by selection algorithm
|-
|-
| пробел || источник забракован
| space || source rejected
|}
|}




Обратите внимание на то, что драйвер ntpd 28 (shared memory driver), смотрите далее, который позволяет использовать функции gpsd, не отмечается символом ''''o'''', даже если используется PPS. При правильной работе он будет отмечен символом ''''*''''.
Note that the ntpd 28 driver (shared memory driver), see below, which allows the use of gpsd functions, is not marked with an "o", even if PPS is used. If it works correctly, it will be marked with "*".


== GPSD ==
== GPSD ==
Демон gpsd представляет собой унифицированный протокол взаимодействия с приемниками спутниковых сигналов GPS/GLONASS. В нашем случае мы будем использовать его как промежуточный слой между модулем и сервером ntpd (драйвер с кодом 28).
Daemon gpsd is a unified Protocol of interaction with the receivers of the satellite signals of GPS/GLONASS. In our case, we will use it as an intermediate layer between the module and the ntpd server (driver with code 28).
Демон устанавливается командой
The daemon is installed by the command
<pre>apt-get install gpsd</pre>
<pre>apt-get install gpsd</pre>


== Настройка ==
=== Settings ===


=== Настройка gpsd ===
=== gpsd settings ===


=== Настройка ntpd ===
=== Ntpd setting ===
В настройках сервера ntpd нам необходимо указать два новых источника точного времени: NMEА и PPS.
In ntpd server settings we need to specify two new sources of exact time: NMEA and PPS.

Текущая версия на 18:13, 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.

Check for a pps signal

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
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 NMEA messages.

NTPD

Ntpd service is used as application SOFTWARE. By default, the ntpd server is configured to receive time from other servers on the Internet using ntp. To use the time signals from the GPS/GLONASS module, a number of configuration steps are required (see below).

Current accurate time sources for NPTD

Ntpqp inint.png

The exact time sources are marked with special characters:

Symbol Value
* current source used
# source selected but too remote
o source selected, PPS signal used
+ source selected, ready to use
x source rejected
. source selected last from the list of candidates
- source rejected by selection algorithm
space source rejected


Note that the ntpd 28 driver (shared memory driver), see below, which allows the use of gpsd functions, is not marked with an "o", even if PPS is used. If it works correctly, it will be marked with "*".

GPSD

Daemon gpsd is a unified Protocol of interaction with the receivers of the satellite signals of GPS/GLONASS. In our case, we will use it as an intermediate layer between the module and the ntpd server (driver with code 28). The daemon is installed by the command

apt-get install gpsd

Settings

gpsd settings

Ntpd setting

In ntpd server settings we need to specify two new sources of exact time: NMEA and PPS.