×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

How to make USB GPS receiver work for me

  • Posts: 22
  • Thank you received: 1
Alright, finally got my setup inside and all hooked up. According to gpsmon, I have LAT/LONG and time. When connecting to GPSD in INDI, it appears the data stream from the receiver is not making it into EKOS/KSTARS: The status down at the bottom just says "GPS fix is in progress..." The fields for TIME and UTC offset are only populated because I have the RPi3 on my home network.
Last edit: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20332
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1
OK so I apparently answered my own question. In order to get data to GPSD, I had to edit /etc/default/gpsd and set DEVICES="/dev/GPS" and reboot. After that, I got GPS and TIME data in the appropriate fields in EKOS. "GPS" is the name I gave my receiver in the serial port manager, its hardware address is ttyUSB2. The DEVICES field was originally blank, hence GPSD did not know where to look for a data stream.

Is there a way to automate this for future Stellarmate users, so they don't have to bang their heads on a keyboard for hours on end? I would imagine a lot of imagers who don't have an observatory to call home would like to use a GPS receiver to sync up to and have it be not so freakin' difficult. I had to leave this forum to find an answer that made it finally click for me, there is no guide on how to do this here. A novice wouldn't even realize they can't just go into the gpsd file outright and edit it. It ain't like Windows where any file can be edited anywhere. I had to gksudo Pluma to make the file writable. Luckily I know enough about Linux to get myself into trouble, which is both a good and bad thing ;)
Last edit: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20333

Please Log in or Create an account to join the conversation.

Good you're finding your way around in Linux!
I used U-Plux AG which I got from HardKernel and I never had to edit any files to get it working with StellarMate.

@Kaczorek, is there any editing necessary? or does it depends on the GPS device?
6 years 5 months ago #20336

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
Editing is necessary. It does not depend on a gps device as far as it is serial USB device.

GPSD driver relies on gpsd service running in the operating system you connect your gps receiver to. It was designed this way to use standard interface existing in linux system which enables sharing gps signal among various applications (not locking serial gps device by just INDI driver). This means that before using GPSD driver you need to have gpsd device configured correctly. It does work out of box in many cases, but not always.

gpsd service needs to know what serial device to use as a source for gps signal. So you must configure it in /etc/default/gpsd file by setting DEVICES="/dev/YOUR_GPS_SERIAL_DEV". The problem is that in our setups we use many serial devices over USB (mount, focuser, gps, other...) and each of them is represented by a device node i.e. /dev/ttyUSBx. Connecting these devices in different order may result in gps device is assigned different device node. To fix this you can assign unique name to your device in serial port manager (GUI) or in udev rules (terminal).

Now, how can we improve user experience? By removing driver's dependence on gpsd service and rewriting the driver to read gps data stream directly from a device. We could use connections plugin framework instead to search for gps device. However this approach is not the best practice for accessing gps device in linux systems and locks gps device for any other application that needs to use it (e.g. ntp server for syncing operating system time based on gps NMEA and PPS). So I would recommend to leave it as it is.

Just remember to set DEVICES="/dev/YOUR_GPS_SERIAL_DEV" in /etc/default/gpsd file and restart gpsd service before using INDI GPSD device driver
The following user(s) said Thank You: Chad Andrist
Last edit: 6 years 5 months ago by Radek Kaczorek.
6 years 5 months ago #20340

Please Log in or Create an account to join the conversation.

Serial Port Assistant Tool in StellarMate now works with the GPS too:

The following user(s) said Thank You: Radek Kaczorek, Chad Andrist
Last edit: 6 years 5 months ago by Jasem Mutlaq.
6 years 5 months ago #20346

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1
I understand if automating such a thing is not an easy thing to do. I guess consider this thread a lesson on what to do if one has a USB GPS receiver and wants to have it reliably pass data into INDI/EKOS. The Stellarmate Serial Assistant was helpful in making the connection repeatable after reboot.
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20351

Please Log in or Create an account to join the conversation.

  • Posts: 535
  • Thank you received: 109
How does the Stellarmate serial port mapper handle having two devices that have the same USB to serial controller such as the Prolific. In this situation, the IDs end up being the same. This is the case I still have some trouble with because gpsd wants to assign the device automatically itself with udev, and it ends up trying to map to my mount causing eqmod to go offline. It is actually gpsd that does not handle this well I think. It assumes that everything that matches a set of IDs is a gps and builds the device links for it and hangs on to the port.
6 years 5 months ago #20352

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 28
Hi Kaczorek and Jasem, I have just updated kstars to the latest version as of yesterday (9 April 2018). I assume GPSD now automatically populates time and date as well as location.

No need to set DEVICES="/dev/YOUR_GPS_SERIAL_DEV" in /etc/default/gpsd file and restart gpsd service before using INDI GPSD device driver??

regards
6 years 1 week ago #24938

Please Log in or Create an account to join the conversation.


It uses serial ID as well.. if they're same, then you're out of luck. I suppose you can go further and map their physical locations on the USB ports but I didn't take it this far.
6 years 1 week ago #24941

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 28
Im still having issues connecting my ublock 7 USB GPS adapter.

I followed the install on the indi-GPS page. The device connects ok, when i run gpsmon in a terminal it produces the correct time, but when i run it in kstars with the Device Manager or in ekos, it doesnt populate the correct time. Coordinates are fine, just the UTC is incorrect. It is still using the time from when the tinkerboard was last updated using an Internet connection. See images below.

I have made sure that time and location are updated by GPS and mount on the INDI configuration page. See image.

Any suggestions???
6 years 1 week ago #24950
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 424
  • Thank you received: 66

Sooooo..... If I have a GPS unit from Skywatcher that is compatible with my HEQ5 mount. I should be able to plug it into stellarmate and Kstars will automatically have the GPS time and location?

What about the need to have the local Kstars update devices rather than the other way around? I went through this before and it seems updates from the mount to stellarmate to Kstars is not working, so I question whether updates from GPS to stellamate to local Kstars is working too!

I believe local kstars to stellarmate to devices has become a very typical configuration so can you guys confirm that this is working with GPS at stellarmate?
Last edit: 6 years 1 week ago by Greg.
6 years 1 week ago #24951

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375

GPSD driver uses gpsd service, which in turn reads gps data from your gps receiver. You need to have gpsd service properly configured to have GPSD driver working. This means that you have to set correct gps serial device in /etc/default/gpsd. Otherwise gpsd service will not work (no valid source of gps data). To keep it simple - if gpsmon or cgps don't give you fix and valid gps time/location, don't expect GPSD driver working.
The following user(s) said Thank You: Jasem Mutlaq, Greg, Petar Milevski
6 years 1 week ago #24975

Please Log in or Create an account to join the conversation.

Time to create page: 0.520 seconds