| Garmin | Cable | RS232 | 9P | 25P | USB | Cable |
|---|---|---|---|---|---|---|
| +5V | Red | 1 | Red | |||
| GND | Black | GND | 5 | 7 | 4 | Black |
| GND | Black | GND | 5 | 7 | 4 | |
| TXD | White | RXD | 2 | 3 | ||
| RXD | Green | TXD | 3 | 2 | ||
| PPS | Yellow | DCD | 1 | 8 |
Garmin 9P 25P USB
Red --------- Red
Black ----*---- Black
|
Black ----*---- 5 7
White --------- 2 3
Green --------- 3 2
Yellow --------- 1 8
Inside the cable there is a 3rd black wire and a shield. They seem to be
connected to the other black wires. I did not connect the 3rd black wire,
but I did connect the shield to the RS232 shield via a 47 nF capacitor. The
USB shield is directly connected to the RS232 shield.
I used a 25 pins connector connected to a RS232 tester.
Garmin Minicom
Male Female
9P 25P
RXD-----RXD 2 3
TXD-----TXD 3 2
GND-----GND 5 7
+-DCD 1 8
|
*-DTR 4 20
|
+-DSR 6 6
+-CTS 7 5
|
+-RTS 8 4
SH------SH
Start Minicom with '-o' to avoid sending an init string.
Exit Minicom with 'Ctrl-A,Z,Q' instead of 'X' to avoid a reset.
According to the
Garmin documentation
these sentences are enabled by default;
| Sentence | Output by Default? | Maximum Characters |
|---|---|---|
| GPRMC | Y | 74 |
| GPGGA | Y | 82 |
| GPGSA | Y | 66 |
| GPGSV | Y (PC and LVC only) | 70 |
| PGRME | Y (PC and LVC only) | 35 |
| GPGLL | N | 44 |
| GPVTG | Y (18-5Hz only) | 42 |
| PGRMV | N | 32 |
| PGRMF | N | 82 |
| PGRMB | Y (PC and LVC only) | 40 |
| PGRMT | N Once per minute | 50 |
$PGRMO,,4In order to avoid typos I send this string as a file (Ctrl-A,Z,Y).
More information about NMEA 0183 output sentences can be found here.
server 127.127.Type.Unit_Number
| Type | Description | Ident |
|---|---|---|
| 20 | Generic NMEA GPS Receiver | GPS_NMEA |
| 22 | PPS Clock Discipline | PPS |
| 28 | Shared Memory Driver | SHM |
server 127.127.20.0 fudge 127.127.20.0 time1 0.185 server 127.127.28.0 minpoll 4 prefer fudge 127.127.28.0 refid PPSThe GPS_NMEA driver wants a symlink in /dev/ telling it which is the source of the time. EG ttyS1;
gps0 -> ttyS1I created a file '77-local.rules' in '/etc/udev/rules.d/' for this purpose. It contains the following line;
KERNEL=="ttyS1" SYMLINK+="gps0"Replace 'ttyS1' with the tty you use.
A remote source, such as a remote GPSD, can also be used;
gps0 -> 192.168.1.5:2947David J. Schwartz's SHM driver reads data from ttyS0 and feeds it to the NTPD's shared memory. There is also a version modified by Steven Bjork which supports parallel ports. And a newer version by Philip M. White. You need to start this driver when the clock within 25 ms accurate.
START_DAEMON="true" DAEMON_OPTS="-b -n" DEVICES="/dev/ttyS0" USBAUTO="false"The following lines in ntp.conf tell NTPD to use GPSD as a time source;
server 127.127.28.0 minpoll 4 fudge 127.127.28.0 time1 0.178 refid GPSa server 127.127.28.1 minpoll 4 prefer fudge 127.127.28.1 refid PPSa
setserial /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test low_latency