Giacomo Succi replied to the topic 'Ekos SER with GPS.' in the forum. 2 years ago

Just because I wished to understand a bit more how the GPSD driver works, I've done a quick dig inside the code and I've noticed the setSystemTime function that should handle all the time update processes:

bool GPSD::setSystemTime(time_t &raw_time)
{
#ifdef __linux__
#if defined(__GNU_LIBRARY__)
#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ > 30)
    timespec sTime = {};
    sTime.tv_sec = raw_time;
    clock_settime(CLOCK_REALTIME, &sTime);
#else
    stime(&raw_time);
#endif
#else
    stime(&raw_time);
#endif
#endif
    return true;
}

But, according to the man page linux.die.net/man/2/stime it only works as superuser.
So to let it work properly, the INDI server must be executed as root?

I'm struggling a bit with my memories of POSIX programming here unsure.png.
Something that I have to refresh sad.png.

Thanks a lot again!

Read More...