Subject: setting up serial port for GPS NTP source
To: None <netbsd-help@netbsd.org>
From: Danny Thomas <D.Thomas@imb.uq.edu.au>
List: netbsd-help
Date: 08/23/2000 21:20:46
I'm finally trying to hook up my GPS receiver. I've tested it by booting my
PC from a DOS floppy and using a simple terminal. The serial stream reports
the GPS consistently receiving 6-9 satellites at adequate strength, and I
can also use the terminal to reconfigure the Garmin GPS25LVS module.
So at least the antenna, cable, GPS and connector cables are working, but
before hooking up the PPS signal and using the generic NMEA driver in ntp4,
I want to make sure the serial port is properly working. This may not be
strictly necessary since the NMEA driver does it's own serial setup, but
I'm also considering using a separate perl script to talk to the GPS.
Unfortunately my cluelessness intrudes.
1) the MSDOS terminal works using COM2 so that meant /dev/tty01 ?
2) I tried changing the speed of the com port without success
www2# stty -f /dev/tty01 speed 4800
9600 <= should it echo this?
www2# stty -f /dev/tty01
ispeed 0 baud; ospeed 9600 baud; <= still 9600
lflags: echoe echoke echoctl
oflags: onocr onlret
cflags: cs8 -parenb
is that the right way? but why isn't the change at least being reported
or coming into effect? I've tried changing other parameters too.
NB I've tried this single user, and tried relaxing permissions
www2# ls -l /dev/tty0*
crw------- 1 uucp wheel 8, 0 May 20 12:50 /dev/tty00
crwxrwxrwx 1 uucp wheel 8, 1 May 20 12:50 /dev/tty01
3) apart from the speed, are there other changes I should make to
serial port ?
I'm expecting "cat /dev/ty01" to produce a serial stream like I saw
with the MSDOS terminal
4) I believe I hook-up the PPS signal to DCD (FWIW I'm using 9pin port)
do I really need a TTL/RS232 level converter ?
if so, I'll use one of the 5V powered single chip ones
I assume they preserve signal polarity
is there an easy way to test the PPS is working (outside of ntp) ?
any clues gratefully accepted
Danny Thomas
NB NetBSD-1.4Y/i386 using the bundled ntpd 4.0.99i