[ntp:questions] USB NMEA GPS: refclock_open: /dev/gps0: Permission denied

Mario Behn behn at mirsl.ecs.umass.edu
Sat Jul 9 15:24:58 UTC 2005


Hi,

I try to make the version of NTP in

Linux behn.mirsl.keb 2.6.11-1.35_FC3 #1 Mon Jun 13 00:52:08 EDT 2005 i686
i686 i386 GNU/Linux

work.

Any idea, it doesn't work?


Here is the kernel log from (dis)/connecting the USB GPS NMEA receiver
GM-R500 (http://www.emt.com.tw/webPage/product_view.php?product_type=1
&product_id=24&series_name=GPS%20Receiver%20Series&series_id=3&
PHPSESSID=e2c2cb9ff5426527354820330afc807d)

[root at behn mario]# dmesg -c
usb 1-1: USB disconnect, address 2
usb 1-1.4: USB disconnect, address 4
PL-2303 ttyUSB0: PL-2303 converter now disconnected from ttyUSB0 pl2303
1-1.4:1.0: device disconnected [root at behn mario]# dmesg -c
usb 1-1: new high speed USB device using ehci_hcd and address 5 hub
1-1:1.0: USB hub found
hub 1-1:1.0: 7 ports detected
usb 1-1.4: new full speed USB device using ehci_hcd and address 6 pl2303
1-1.4:1.0: PL-2303 converter detected usb 1-1.4: PL-2303 converter now
attached to ttyUSB0 [root at behn mario]#


Here is the system log:

Jul  9 10:17:52 behn ntpdate[3910]: step time server 62.4.94.211 offset
-0.521467 sec Jul  9 10:17:52 behn ntpd:  succeeded Jul  9 10:17:52 behn
ntpd[3924]: ntpd 4.2.0a at 1.1190-r Mon Oct 11 09:10:20 EDT 2004 (1) Jul  9
10:17:52 behn ntpd: ntpd startup succeeded Jul  9 10:17:52 behn
ntpd[3924]: precision = 3.000 usec Jul  9 10:17:52 behn ntpd[3924]:
Listening on interface wildcard, 0.0.0.0#123 Jul  9 10:17:52 behn
ntpd[3924]: Listening on interface wildcard, ::#123 Jul  9 10:17:52 behn
ntpd[3924]: Listening on interface lo, 127.0.0.1#123 Jul  9 10:17:52 behn
ntpd[3924]: Listening on interface eth0, 10.3.0.131#123 Jul  9 10:17:52
behn ntpd[3924]: kernel time sync status 0040 Jul  9 10:17:52 behn
ntpd[3924]: refclock_open: /dev/gps0: Permission denied

And I'have checked:

/etc/ntp.conf:

# NMEA GPS driver
server  127.127.20.0

And the permissions of /dev/gps0:

[root at behn dev]# ll -h gps*
lrwxrwxrwx  1 root root 12 Jul  9 10:17 gps0 -> /dev/ttyUSB0 lrwxrwxrwx  1
root root 12 Jul  9 10:17 gps1 -> /dev/ttyUSB0 [root at behn dev]#

and of the directory /etc/ntp

drwxr-xr-x   2 ntp  ntp     4096 May  2 19:47 ntp


and the serialport /dev/ttyUSB0 I checked as following:

[root at behn dev]# stty -a < /dev/ttyUSB0 speed 9600 baud; rows 0; columns
0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol =
<undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd
cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk
-inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke [root at behn dev]# stty ispeed 4800 -F /dev/ttyUSB0
stty: /dev/ttyUSB0: unable to perform all requested operations [root at behn
dev]# stty -a < /dev/ttyUSB0 speed 4800 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2
= <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl
-cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck
-istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke [root at behn dev]#




More information about the questions mailing list