×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Still weird issue with GPS time

  • Posts: 22
  • Thank you received: 1

Ohhhh, well then this pieces it together for me. I guess I'll be purging timesyncd and reinstalling NTP! Without your sage knowledge I would've never known. I will try to see if I can get proper time to set after satellite lock. I have modified my ntp.conf file to use GPSD as a means to set the local time via NTP, once I get NTP running hopefully this works

Thanks!
6 years 5 months ago #20447

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

  • Posts: 22
  • Thank you received: 1
Umm, it appears that timesyncd is NOT a part of MATE 16.04 Pi. rm /etc/systemd/system/systemd-timesyncd.service yields:

cannot remove '/etc/systemd/system/systemd-timesyncd.service' : No such file or directory

So now I'm still baffled what is killing NTP. This may all be for naught, I read something about NTP not being able to grab time from GPSD at boot because it takes too long to sync. Sigh. Not sure a Pi is ideal for a mobile setup. It's too much of a hassle having to reset time and location every time I power up. Back to the drawing board.

Also knro, I tried sudo dpkg-reconfigure tzdata and was in the right timezone.
6 years 5 months ago #20448

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

  • Posts: 298
  • Thank you received: 46
Hi SparkyHT,

I did some tests on Ubuntu on my laptop and came to this solution.. or maybe a oneliner solution..

sudo date +%Y-%m-%dT%H:%M:%S -s $(cut -d "=" -f 2 <<< $(indi_getprop GPSD.TIME_UTC.UTC))

While playing around with my GPS I found that the time is correct even before it gets a fix, not sure if all GPS works the same and I haven't tested this on my RPi but maybe you could do the testing :)

Br
/Markku
6 years 5 months ago #20457

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

  • Posts: 22
  • Thank you received: 1
I still don't have a fix for this. I removed timesyncd service and reinstalled NTP and I'm still getting the failed to start errors. It appears I'm screwed trying to use my RPI3 out in the field because it'll never have the right time. Making this work shouldn't have to be so difficult. I thought switching from Win10 to INDI meant freedom, flexibility, and reliability, it has been anything but. I have yet to get a successful clear night out with it. Driver issues from the start, and now foiled by trying to set something as basic and essential as a clock. I guess I didn't realize I had to be a Linux master to make INDI work for me.
6 years 5 months ago #20486

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

No need to use GPSD if it is not working for you, you can use your phone as the GPS source

EDIT: I will also update StellarMate OS image to utilize NTP/GPSD and make a new image available soon.
Last edit: 6 years 4 months ago by Jasem Mutlaq.
6 years 4 months ago #20490

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

Ok so I did a little bit more research and turns out using GPS for NTP is useless unless your GPS unit provides precise timing via PPS. The majority of GPS dongles don't support this. Check if your is supported here: www.catb.org/gpsd/hardware.html

I configured NTP to use GPS on StellarMate, and when I ran ntpq -p, I got this:
It's using online NTP servers even though I attached a GPS and it can "read" from it, but because it doesn't have PPS, it's useless. So I'd say just use GPS NMEA driver for time synchronization. The ones that provide PPA can be pretty expensive and not really worth it unless you're need nanosecond timings.
6 years 4 months ago #20505

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

  • Posts: 22
  • Thank you received: 1


Here's something interesting, on my Stellarmate, I can't even go into ntpq or any other ntp related register. I always get "Connection Refused". I freshly installed the image once again and tried getting into NTP, but still get the error code=5 message. Like I said before, I tried purging timesyncd and reinstalling NTP. It just doesn't want to run on the Pi. This version of MATE is just crippled and I don't have the knowledge to make it do what I want to do.

And judging by the GPS:Smartphone thread, it doesn't look like THAT is working well either. You simply CANNOT have the Pi3 online when testing GPSD or NMEA, the results are false readings. Disconnect power to the Pi3, unplug the network cable, wait for the residual memory to clear, then apply power. The time will reset to whatever and WILL NOT COME BACK unless it is given an internet connection, PERIOD. This is not SYSTEM TIME, this is the time setting on the MOUNT location tab and KSTARS. That is my experience.
6 years 4 months ago #20526

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

So I spent a few hours on this and finally go it working reliably. You'll receive a link to an updated StellarMateOS image by the end of the day. Do not edit any files, just use the StellarMate Serial Port Assistant tool to add the GPS and then restart your StellarMate afterwards and you should be set.
6 years 4 months ago #20536

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

  • Posts: 983
  • Thank you received: 375
Why would you say this? The only difference is that without PPS you will not get precision higher than 1s, while with PPS your time precision is around 1us. All the rest would work just fine.

@SparkyHT I read your thread on CHRONY... well done!
The following user(s) said Thank You: Chad Andrist
Last edit: 6 years 4 months ago by Radek Kaczorek.
6 years 4 months ago #20555

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

  • Posts: 22
  • Thank you received: 1

What are we up to in version? I still have the 1.2 image and saw on the SM website that it's up to 1.2.3
6 years 4 months ago #20556

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

  • Posts: 22
  • Thank you received: 1

Thanks. The version of NTP in MATE for RPI is just hosed, it refuses to run at all so I cannot use GPSD with it. Removing timesyncd didn't help either, so I started looking for other solutions and came across CHRONY. I purged all NTP files, installed CHRONY, and then modified my chrony.conf file to read the data stream coming off the USB GPS receiver. If it was a PPS capable receiver, I would've had better accuracy, but it appears to hold time just fine over the course of a night.
6 years 4 months ago #20557

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

  • Posts: 983
  • Thank you received: 375
I have just checked how I fixed NTP issue on Astroberry Server... The solution is to run the following:
sudo systemctl stop prefer-timesyncd.service
sudo systemctl disable prefer-timesyncd.service

The above disables preference of timesyncd over NTP.
6 years 4 months ago #20578

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

Time to create page: 0.320 seconds