How to set time automatically at power up?

53 views
Skip to first unread message

Chris Green

unread,
Dec 15, 2016, 11:16:27 AM12/15/16
to beagl...@googlegroups.com
I run a headless BBB on my boat. I need it to have the right time so
that information it sends is correctly time stamped.

How can I get it to power up with the right time and date? I have
installed ntp/ntpd to keep the time correct once up and running but it
doesn't initialise the time and date. What's the way to do this?

--
Chris Green
·

Robert Nelson

unread,
Dec 15, 2016, 11:20:29 AM12/15/16
to Beagle Board, Chris Green
Debian Wheezy or Jessie?

In wheezy, setup a job to run at startup, check for connection and
just run "ntpdate pool.ntp.org"

In Jessie, there's a systemd

sudo systemctl enable systemd-timesyncd.service || true

both cases rely on a active internet connection...

Regards,

--
Robert Nelson
https://rcn-ee.com/

Chris Green

unread,
Dec 15, 2016, 12:03:31 PM12/15/16
to beagl...@googlegroups.com
Robert Nelson <robert...@gmail.com> wrote:
> On Thu, Dec 15, 2016 at 10:14 AM, Chris Green <c...@isbd.net> wrote:
> > I run a headless BBB on my boat. I need it to have the right time so
> > that information it sends is correctly time stamped.
> >
> > How can I get it to power up with the right time and date? I have
> > installed ntp/ntpd to keep the time correct once up and running but it
> > doesn't initialise the time and date. What's the way to do this?
>
> Debian Wheezy or Jessie?
>
It's Wheezy.


> In wheezy, setup a job to run at startup, check for connection and
> just run "ntpdate pool.ntp.org"
>
OK, thanks, that seems straightforward.


> In Jessie, there's a systemd
>
> sudo systemctl enable systemd-timesyncd.service || true
>
> both cases rely on a active internet connection...
>
Of course, yes. If the internet isn't reliable is it worth running
'ntpdate' at intervals using cron so that if there isn't a connection
at startup it will get set when the internet does appear?

--
Chris Green
·

Robert Nelson

unread,
Dec 15, 2016, 12:16:02 PM12/15/16
to Beagle Board
In that case, something like this would just work better:

https://www.sparkfun.com/products/12708

You can find them cheaper elsewhere..

William Hermans

unread,
Dec 15, 2016, 3:28:33 PM12/15/16
to beagl...@googlegroups.com
There's also a software package known as fake hwclock. It's not a real time clock, and perhaps it'll even lose time over long periods. But it seems to do a reasonable job of keeping time on a system close.

We actually use  DS3232 on those devices that *need* to keep accurate time.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgeFJMvE6EZkMVCx%2Bw8ZrZ9G1%3DOimRJnuw-Qcy5YE8DYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Chris Green

unread,
Dec 16, 2016, 4:33:33 AM12/16/16
to beagl...@googlegroups.com
OK, thanks again, that might be my next add-on for the BBB.

--
Chris Green
·

Reply all
Reply to author
Forward
0 new messages