question

sam-carleton avatar image
sam-carleton asked

NTP Time server on BeagleBone Black

With the amazing shortage of Raspberry Pi's, I finally broke down and purchased a BeagleBone Black to run Venos OS. The time is way off and when I went looking to set up the NTP server, it looks like the ntp client is not installed. When I go look at the different packages (opkg list | grep ntp) it comes up with nothing!

How does one go about configuring and setting up the NTP client to set the time on the BeagleBone?

The results of doing a opkg update:
root@beaglebone:~# opkg update
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/all/Packages.gz.
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/cortexa8hf-neon/Packages.gz.
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/beaglebone/Packages.gz.
Collected errors:
 * opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/all/Packages.gz, wget returned 5.
 * opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/cortexa8hf-neon/Packages.gz, wget returned 5.
 * opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/beaglebone/Packages.gz, wget returned 5.
root@beaglebone:~#
Venus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

If I recall correctly, time sync is taken care of by Connman.

Or conman.

But: thats a nightmare to deal with :-).


The code that includes it into Venus OS, plus long series of patches, is here:


https://github.com/victronenergy/meta-victronenergy/tree/master/meta-alternatives/recipes-connectivity/connman



7 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

smallsolar avatar image smallsolar commented ·
That link is broken for me anyone else?

I am also having a time sync issue with Venus OS on a RPI, so i am strying to figure out how connman is configured because the time is not properly syncing on my device.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ smallsolar commented ·
I fixed the link
1 Like 1 ·
sam-carleton avatar image sam-carleton commented ·

Thank you for enlightening me to connman, I see that is installed on my Venos OS, I found the /etc/connman/main.conf file and the first FallbackTimeservers is pool.ntp.org, but the time is still 1970. I double-checked and it can ping things on the Internet, so I am not sure what exactly I need to do to get the ntp client to set the time correctly. Any thoughts?

0 Likes 0 ·
smallsolar avatar image smallsolar sam-carleton commented ·
I'm in a very similar boat. I have poked around in connman, using the connmanctl command to add a custom timeserver, and view the clock settings in connman, but can't seem to get connman to actually synchronize the time. It says it is turned on auto, but until I manually set the time using the Remote Console for Venus OS mine was out by 2 weeks which caused VRM data to log incorrectly. Once I set it, it logs properly now, but it is only a matter of time until it drifts again because the auto sync isn't working.


As a temporary solution you can try setting the local time manually in the Remote Console settings like I did as that changed my RPI system time as well.


0 Likes 0 ·
Show more comments
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ sam-carleton commented ·
I wouldnt know. Check dmesg, check the other message log in /data/logs.


Check if there is a connman log somewhere.



Note that I moved this thread to Modifications space.

0 Likes 0 ·
smallsolar avatar image
smallsolar answered ·

In case anyone else is struggling with time sync issues on RPIs, here is my update, as I had to basically figure this out again after a Venus update. I tried and tried to get connman to do its job and sync the time, and it was not working for whatever reason. I used connmanctl to set a timeserver manually (I can see the timeserver in the ethernet adapter settings file) but despite multiple reboots, connman is not successfully syncing time. There are no logs in /data/logs/messages regarding connman doing time sync at all. I came across this post:

https://community.victronenergy.com/questions/175739/sync-time-rpivenusos-after-boot.html

This was linked in a couple other posts about NTP on the forum here, but people said setting up a second time sync service wasn't a good idea as they may conflict. So I went back to trying to figure out connman again, but couldn't get anywhere. I then decided if connman wasn't working, there couldn't be a conflict between time servers right? ;) So I just followed the steps in the above post and now my system is successfully syncing time with ntp servers using "ntpdate".

I then also installed ntp (ntpd) as ntpdate is usually only meant for system start. Admittedly, I probably could have just skipped the ntpdate step, but I like backups.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources