使用Adafruit Ultimate GPS帽子和PPS使用最新的Jessie Lite Raspbian 2017年1月的RPI2,使用来自digitalbarbedwire.com的帖子中的信息。易于安装和PPS以及所有gps命令在本地非常有效。通过网络访问GPSD端口2947
我想让gpsd通过端口2947上的网络接受传入请求以导出位置信息(OpenCPN)。我编辑/ etc/default/gpsd来添加-G选项GPSD_OPTIONS =“ - n -G”,但外部请求不被允许。如果我停止gpsd(sudo服务停止gpsd),并在前台调用gps(/ usr/sbin/gpsd -N -n -G/dev/ttyAMA0/dev/pps0,所有工作正常!所以我猜测有一个权限问题开始GPSD作为守护,但我还没有想通出来呢Drivings我坚果
任何建议
相关文件:!?
$ cat /lib/systemd/system/gpsd.socket
[Unit]
Description=GPS (Global Positioning System) Daemon Sockets
[Socket]
ListenStream=/var/run/gpsd.sock
ListenStream=[::1]:2947
ListenStream=0.0.0.1:2947
SocketMode=0600
[Install]
WantedBy=socket
$ cat /etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyAMA0 /dev/pps0"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n"
$ cat /lib/systemd/system/gpsd.service
[Unit]
Description=GPS (Global Positioning System) Daemon
Requires=gpsd.socket
# Needed with chrony SOCK refclock
After=chronyd.service
[Service]
EnvironmentFile=-/etc/default/gpsd
ExecStart=/usr/sbin/gpsd -N -G $GPSD_OPTIONS $DEVICES
[Install]
Also=gpsd.socket
任何想法