gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Error when using remote gpsd as a source for local gpsd


From: Carl Sutton
Subject: Re: [gpsd-users] Error when using remote gpsd as a source for local gpsd instance
Date: Sun, 16 Oct 2016 15:56:48 +0100

On the laptop run: 

gpsmon 192.168.43.1:2947

You should not need to run gpsd on the laptop, only the pc with the GPS device needs to run that.

On 16 October 2016 at 14:18, B.W. Guffey <address@hidden> wrote:
Howdy all;

I'm trying to access the remote gpsd feed from a Raspberry PI3 on a laptop.  Both laptop and RPI are running Arch Linux, both have gpsd-3.16-3 installed (via pacman), and both operate properly with locally installed gps devices (USB ublox on the laptop, and serial ublox on the RPI).

>From the laptop, I can telnet to the RPI's gpsd feed and issue ?WATCH={"enable":true,"json":true}; command with expected result.  I can also configure Navit on the laptop to use the RPI's feed through a socket (socket:192.168.43.1:2947:?WATCH={"enable":true,"nmea":true};) and it navigates fine.  I cannot, however use the RPI's gpsd feed through the laptop's gpsd instance.  I recieve the following error running gpsmon or cgps on the laptop:

  {"class":"ERROR","message":"Unrecognized request ''"}

Then the client just sits there.  Starting gpsd on the command line, here's stdout from the Raspberry:

$ sudo gpsd -N -n -G -D 6 -P 2947 /dev/ttyAMA0
gpsd:INFO: launching (Version 3.16)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7
gpsd:PROG: successfully connected to the DBUS system bus
gpsd:PROG: shmget(0x47505344, 8928, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 262152
gpsd:INFO: stashing device /dev/ttyAMA0 at slot 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening GPS data source type 2 at '/dev/ttyAMA0'
gpsd:INFO: speed 9600, 8N1
gpsd:IO: => GPS: $PASHQ,RID*28\x0d\x0a
gpsd:IO: => GPS: @F0.3=1*67\x0d\x0a
gpsd:IO: => GPS: @F0.3=1*67\x0d\x0a
gpsd:IO: => GPS: @F2.2=1*64\x0d\x0a
gpsd:IO: => GPS: @F2.2=1*64\x0d\x0a
gpsd:PROG: writing oncore control type Cj
gpsd:IO: => GPS: @@Cj)\x0d\x0aRID*28\x0d\x0a
gpsd:INFO: gpsd_activate(2): activated GPS (fd 6)
gpsd:PROG: PPS:/dev/ttyAMA0 chrony socket /var/run/chrony.ttyAMA0.sock doesn't exist
gpsd:WARN: KPPS:/dev/ttyAMA0 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/ttyAMA0 thread launched
gpsd:INFO: PPS:/dev/ttyAMA0 ntpshm_link_activate: 1
gpsd:INFO: device /dev/ttyAMA0 activated
gpsd:INFO: running with effective group ID 14
gpsd:INFO: running with effective user ID 99
gpsd:INFO: startup at 2016-10-16T12:33:38.000Z (1476621218)
gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.16","rev":"3.16","proto_major":3,"proto_minor":11}\x0d\x0a

  ********** Here I started cgps on the laptop **********

gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?\x0a
gpsd:ERROR: ERROR response: {"class":"ERROR","message":"Unrecognized request ''"}\x0d\x0a
gpsd:CLIENT: => client(0): {"class":"ERROR","message":"Unrecognized request ''"}\x0d\x0a
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): WATCH={"enable":true,"json":true};\x0a
gpsd:CLIENT: => client(0): =



And on the laptop (without the usb GPS connected):

$ sudo gpsd -N -n -D 6 /dev/gps0 gpsd://192.168.43.1:2947
gpsd:INFO: launching (Version 3.16)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7
gpsd:PROG: successfully connected to the DBUS system bus
gpsd:PROG: shmget(0x47505344, 8936, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 262152
gpsd:INFO: stashing device /dev/gps0 at slot 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening read-only GPS data source type 0 and at '/dev/gps0'
gpsd:ERROR: device open of /dev/gps0 failed: No such file or directory - retrying read-only
gpsd:ERROR: read-only device open of /dev/gps0 failed: No such file or directory
gpsd:ERROR: initial GPS device /dev/gps0 open failed
gpsd:INFO: stashing device gpsd://192.168.43.1:2947 at slot 1
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening remote gpsd feed at 192.168.43.1, port 2947.
gpsd:INFO: gpsd_activate(2): activated GPS (fd 6)
gpsd:INFO: PPS:gpsd://192.168.43.1:2947 ntpshm_link_activate: 1
gpsd:INFO: device gpsd://192.168.43.1:2947 activated
gpsd:INFO: running with effective group ID 14
gpsd:INFO: running with effective user ID 99
gpsd:INFO: startup at 2016-10-16T12:33:42.000Z (1476621222)
gpsd:PROG: switching to match packet type 18: {"class":"VERSION","release":"3.16","rev":"3.16","proto_major":3,"proto_minor":11}
gpsd:PROG: switch_driver(JSON slave driver) called...
gpsd:PROG: selecting JSON slave driver driver...
gpsd:INFO: gpsd://192.168.43.1:2947 identified as type JSON slave driver, 0 sec @ 0bps
gpsd:IO: <= GPS: {"class":"VERSION","release":"3.16","rev":"3.16","proto_major":3,"proto_minor":11}
gpsd:PROG: JSON, passing through {"class":"VERSION","release":"3.16","rev":"3.16","proto_major":3,"proto_minor":11,"remote":"gpsd://192.168.43.1:2947"}
gpsd:DATA: packet type 18 from gpsd://192.168.43.1:2947 with {ONLINE|PACKET|DRIVER|PASSTHROUGH}
gpsd:INFO: reconnection attempt on device 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening read-only GPS data source type 0 and at '/dev/gps0'
gpsd:ERROR: device open of /dev/gps0 failed: No such file or directory - retrying read-only
gpsd:ERROR: read-only device open of /dev/gps0 failed: No such file or directory
gpsd:ERROR: /dev/gps0: device activation failed.
gpsd:ERROR: /dev/gps0: activation failed, freeing device

  ********** Here I started cgps on the laptop **********

gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.16","rev":"3.16","proto_major":3,"proto_minor":11}\x0d\x0a
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};\x0a
json: json_read_object() sees '{"enable":true,"json":true};
'
json: Target address for class (offset 0) is (nil)
json: Target address for enable (offset 0) is 0x555dd546a750
json: Target address for scaled (offset 0) is 0x555dd546a758
json: Target address for timing (offset 0) is 0x555dd546a759
json: Target address for split24 (offset 0) is 0x555dd546a75a
json: Target address for pps (offset 0) is 0x555dd546a75b
json: Target address for device (offset 0) is 0x555dd546a760
json: Target address for remote (offset 0) is 0x555dd546a7e0
json: Target address for pps (offset 0) is 0x7ffe0314769f
json: JSON parse of '{"enable":true,"json":true};
' begins.
json: Collected attribute name enable
json: Collected token value true.
json: Target address for enable (offset 0) is 0x555dd546a750
json: Collected attribute name json
json: Collected token value true.
json: Target address for json (offset 0) is 0x555dd546a751
json: JSON parse ends.
gpsd:PROG: device 1 (fd=6, path gpsd://192.168.43.1:2947) already active.
gpsd:IO: => GPS: ?
gpsd:IO: => GPS: WATCH={"enable":true,"json":true};\x0a
gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"gpsd://192.168.43.1:2947","driver":"JSON slave driver","activated":"2016-10-16T12:33:42.855Z"}]}\x0d\x0a{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}\x0d\x0a
gpsd:IO: <= GPS: {"class":"ERROR","message":"Unrecognized request ''"}
gpsd:PROG: JSON, passing through {"class":"ERROR","message":"Unrecognized request ''"}
gpsd:DATA: packet type 18 from gpsd://192.168.43.1:2947 with {ONLINE|PACKET|PASSTHROUGH}
gpsd:CLIENT: => client(0): {"class":"ERROR","message":"Unrecognized request ''"}\x0d\x0a


FWIW I attempted to compile it from source to see if maybe Arch's package was old or torqued but my compiling skills are truly crap so I'm stuck using their package.  Any pointers on getting it working?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]