gpsd-users
[Top][All Lists]
Advanced

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

[gpsd-users] [SOLVED (sorta)] Error when using remote gpsd as a source f


From: B.W. Guffey
Subject: [gpsd-users] [SOLVED (sorta)] Error when using remote gpsd as a source for local gpsd instance
Date: Sat, 05 Nov 2016 20:28:17 -0400

On Sun, 2016-10-16 at 09:18 -0400, B.W. Guffey 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.....

Thought I'd update you guys since you tried to help. I never could get the laptop and the RPI's gpsd's to cooperate directly. I managed to kludge a solution by gpspipe-ing the RPI's remote feed to a local virtual serial port, then using that serial port as an additional gpsd source (/dev/gpsRMT0).

This dispatcher script for NetworkManager on the laptop starts and stops it upon connection to the Raspberry....

$ cat /etc/NetworkManager/dispatcher.d/20-RemoteGPS

#!/bin/sh
ESSID="Raspberrys_Wifi_SSID"
interface=$1 status=$2
case $status in
  up)
    if iwgetid | grep -qs ":\"$ESSID\""; then
      sudo socat exec:"'gpspipe -RP RPI_IP_ADDY:2947'"PTY,link=/dev/gpsRMT0,raw &
      sleep 5
      sudo chown root:uucp /dev/gpsRMT0
      sudo chmod 0777 /dev/gpsRMT0
    fi
    ;;
  down)
    sudo killall gpspipe
    ;;
esac

FWIW my startup script for gpsd runs this line

/usr/sbin/gpsd -N -n -b -P 2947 /dev/gpsRMT0 /dev/gps0 tcp://PHONE_IP_ADDY:6000

All programs now work configured for just gpsd://localhost:2947, and I can use whichever gps I want by simply powering them up or down. 

reply via email to

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