0

I can't really figure out how GPSD works. If I start gpsmon nothing happens. But if I run sudo killall gpsd immediately position starts to appear on screen.

The same happens in my node app. I start receiving position as soon as I kill gpsd (after starting my program).

I'm using Garmin USB GPS 18x and a Jetson TX2 on Node v8.11.3. In my program I'm using node-gpsd to handle the GPS data.

1

The gpsd deamon reads out the GPS-data coming via the serial interface and provides them to other applications via a socket on a specific port (default: port 2947).

The client program gpsmon can be run in one of two modes.

  • as a client for gpsd using the socket provided by gpsd
  • in direct mode, reading out the data coming from the serial interface of the GPS device

Which of both modes you use is determined, with which arguments you start gpsmon. I don't know, how you start gpsmon, but judging by your description, I assume you start gpsmon in direct mode and therefore only see data, once you kill gpsd and have gpsmon access the serial interface, which was before used by gpsd.

In order to use gpsmon as client for gpsd, please refer to the official documentation of gpsmon.

Regarding your node app:
It's just a guess, but I assume this app is not using the socket provided by gpsd, but wants to listen on the serial interface directly. Thus the behaviour you observe.

  • Thanks for your answer. I've reproduced the following scenario: If I start Jetson and run gpsmon localhost:2947 i see the gps data. If I stop gpsmon and run gpsmon localhost:2947 i see a blank screen and if I press enter i see tcp://localhost:2947 Unknown device>. If I leave this screen and kill or restart gpsd, gpsmon automatically starts working again. I can't figure out how to reconnect to gpsd without killing or restarting it. I assume gpsmon localhost:2947 means running gpsmon as client for gpsd, right? – Vallo Aug 24 '18 at 12:08
  • Yes, gpsmon localhost:2947 will run it as client for gpsd. In the setups, where I have been using gpsd I never had an issue as you described. How do you stop gpsmon? – oh.dae.su Aug 24 '18 at 20:09
  • ctrl + C. is this a wrong way? – Vallo Aug 27 '18 at 11:17
  • no that's fine. In order to see, if the problem is on gpsmon side or gpsd side you could do the following test. After stopping gpsmon does gpsd still work with other applications such as cgps or xgps? – oh.dae.su Aug 27 '18 at 20:50
  • No other application related to GPSD works until I kill GPSD. I recorded a short video showing this: youtu.be/puA0Vq9ARrM – Vallo Aug 28 '18 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.