将 xubuntu 18.04 升级到 20.04 后 ----->没有 gpsd?没有 xgps!

将 xubuntu 18.04 升级到 20.04 后 ----->没有 gpsd?没有 xgps!

我花了好几天的时间尝试让我的 GPSD 与非常灵敏的 Handy-GPS 一起工作。

通过 rfcomm0 从我的手持 GPS 获取 NMEA 数据没有问题。

gpsmon /dev/rfcomm0 works perfect

但是自从我从 18.04 升级到 20.04 后就没有机会处理 XGPS了。

 systemctl status gpsd.service

● gpsd.service - GPS (Global Positioning System) Daemon

 Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor preset: enabled)

 Active: activating (start) since Sat 2021-03-06 10:15:47 CET; 1min 10s ago

 TriggeredBy: ● gpsd.socket 

 Cntrl PID: 3417 (gpsd)

 Tasks: 1 (limit: 18994)
 Memory: 1.4M
 CGroup: /system.slice/gpsd.service
         └─3417 /usr/sbin/gpsd -n -N -D4


    OMEN-17cbxxxx gpsd[3417]: gpsd:PROG: shmat() for SHM export succeeded, segment 65558
    OMEN-17cbxxxx gpsd[3417]: gpsd:INFO: running with effective group ID 20
    OMEN-17cbxxxx gpsd[3417]: gpsd:INFO: running with effective user ID 121
    OMEN-17cbxxxx gpsd[3417]:   gpsd:INFO: startup at 2021-03-06T09:15:47.000Z (1615022147)
    OMEN-17cbxxxx gpsd[3417]: gpsd:CLIENT: => client(0):
    {"class":"VERSION","release":"3.20","rev":"3.20","proto_major":>
    OMEN-17cbxxxx gpsd[3417]: gpsd:PROG: checking client(0)
    OMEN-17cbxxxx gpsd[3417]: gpsd:CLIENT: <= client(0): ?WATCH=
     {"enable":true,"json":true,"scaled":true}\x0a
    OMEN-17cbxxxx gpsd[3417]: gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":           []}\x0d\x0a{"class":"WATCH","enabl>
    OMEN-17cbxxxx gpsd[3417]: gpsd:PROG: checking client(0)
    OMEN-17cbxxxx gpsd[3417]: gpsd:INFO: detaching 127.0.0.1 (sub 0, fd 8) in detach_client

netstat -ptaun 

我可以看到 GPSD 的标准端口 2947 被阻止了!?

不知道这句话是什么意思??

 tcp        0      0 127.0.0.1:2947          0.0.0.0:*               LISTEN      1/init 

启动我的 GPSD

sudo gpsd -n -N -G 2948 /dev/rfcomm0
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: command sockets creation failed, netlib errors -1, -1

我的问题:

1/init 代表什么?

我怎样才能绕过我的 GPSD 端口?

@heynnema

cat /etc/default/gpsd

# Devices gpsd should collect to at boot time.

# They need to be read/writeable, either by user gpsd or the group  
  dialout.
  DEVICES=""

# Other options you want to pass to gpsd
 GPSD_OPTIONS="-n -N -D4 "

答案1

您的 gpsd.service 已禁用。启用并启动它...

sudo systemctl enable gpsd.service

sudo systemctl start gpsd.service

sudo systemctl start gpsd.socket

sudo systemctl status gpsd*

更新#1:

通过清除并重新安装 gpsd 将 /etc/default/gpsd 恢复为默认文件。

更新 #2:

您可能需要编辑 /etc/default/gpsd 并更改以下行...

START_DAEMON="真"

设备=“/ dev / rfcomm0”

更新 #3:

确保防火墙中的端口 2947 已打开。然后 xgps 和 cgps 应该可以正常工作。

相关内容