Automatic date and time set from host PC

65 views
Skip to first unread message

Alan Thomason

unread,
Nov 5, 2018, 8:47:20 AM11/5/18
to BeagleBoard
Hi There...

I want to reset the time and date on my BeagleBone black from the host PC, ideally as an automatic task when the system boots up.  I only hook up to the wider internet when I need updates, usually I just hook up to the PC an communicate with PC as 192.168.7.1 and the BBB as 192.168.7.2 (as delivered).

Does anyone have any suggestions on how to do this?  A shell script would be ideal, via PHP or Javascript are also possible avenues that I could use.

Thanks so much,

Alan Thomason

Roger Quadros

unread,
Nov 5, 2018, 9:14:53 AM11/5/18
to beagl...@googlegroups.com, pmi.in...@gmail.com
Hi,
How about running NTP server on you PC and NTP client on bone?
https://www.thegeekstuff.com/2014/06/linux-ntp-server-client/


Thanks so much,

Alan Thomason
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/e658c912-77ce-40e6-8829-a71d0a4e0b6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cheers,
-roger
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Alan Thomason

unread,
Nov 5, 2018, 11:47:23 PM11/5/18
to BeagleBoard
Hi Roger..

Thanks for the quick reply.  I'll give that a try, but I should have mentioned the host PC that the Beaglebone will normally interface with this project will be Windows based.  Unless I am misunderstanding, this solution is for a Linux based PC.

Best Regards,
Alan

Gerhard Hoffmann

unread,
Nov 6, 2018, 1:01:59 AM11/6/18
to beagl...@googlegroups.com
Hi, all,

I have given up on the SPI interface to read out my LTC2500-32 ADC.

I really could not make the PRU produce any SPI output. I lost quite some

time over it, but the best I would have gotten is only 48 Mbps, and I need

100 Mbps when I run the ADC at full speed. I had some leftover space in the

CPLD that creates the sample rate, so I built a 100 MHz 32bit SPI receiver.

Since the PRU1 can read just a 8 bit field over the fast interface, I read

each sample in 4 bytes and shift/paste it together to an int32.

That works, and I could even read 3 ADCs in real time.

BUT:

Sometimes my BBB does not boot any more. I traced it to the connection

of PRU1.__r31.0. This is also used for boot medium select.

I have obeyed the rule to drive my buffers only when SYS_RESET_n is high.

Probing with the scope showed that SYS_RESET_n  is really a ramp that takes

14 msec to rise. If you use that as an input to a digital gate, all
sorts of

miraculous things can happen. In particular, it is undefined when the

AM335x, the LAN4710A or the external logic consider reset de-asserted

relatively to each other.


We have a classical race condition here. The board designers have changed

the timing capacitor from 1u to 2.2u  in revision A6 since there seemed
to be

an issue. Tomorrow, I'll spend an additional timer to delay further the

activation of my circuit.


Executive summary:   Qualifying the driving of some IO-Pins with SYS_RESET_n

is not enough, esp. because the CPU just STARTS execution on SYS_RESET_n
passive.

It could start later than a cape.


Also, the grounding scheme is an EMC nightmare, with just two GND pins
on P8,

lumped together at one end with a lot of high speed pins on the other
end of P8.

Using the screws in the 4 corners can really help signal quality.


regards, Gerhard



Roger Quadros

unread,
Nov 6, 2018, 3:47:53 AM11/6/18
to beagl...@googlegroups.com, pmi.in...@gmail.com
Hi Alan,

On 06/11/18 06:47, Alan Thomason wrote:
> Hi Roger..
>
> Thanks for the quick reply. I'll give that a try, but I should have mentioned the host PC that the Beaglebone will normally interface with this project will be Windows based. Unless I am misunderstanding, this solution is for a Linux based PC.

Windows should also have some kind of NTP server implementation that should work with Bone running NTP client.

cheers,
-roger
>
> Best Regards,
> Alan
>
> On Monday, November 5, 2018 at 8:47:20 AM UTC-5, Alan Thomason wrote:
>
> Hi There...
>
> I want to reset the time and date on my BeagleBone black from the host PC, ideally as an automatic task when the system boots up. I only hook up to the wider internet when I need updates, usually I just hook up to the PC an communicate with PC as 192.168.7.1 and the BBB as 192.168.7.2 (as delivered).
>
> Does anyone have any suggestions on how to do this? A shell script would be ideal, via PHP or Javascript are also possible avenues that I could use.
>
> Thanks so much,
>
> Alan Thomason
>
> --
> 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...@googlegroups.com <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a958c39b-a847-4321-ae9f-8e9ef3d10965%40googlegroups.com <https://groups.google.com/d/msgid/beagleboard/a958c39b-a847-4321-ae9f-8e9ef3d10965%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Mark A. Yoder

unread,
Nov 7, 2018, 8:33:33 AM11/7/18
to BeagleBoard
Alan:
  Here is a simple script I run on my Linux host to set the date on the Bone:

#!/bin/bash
# Copy host's date to bone
BONE=${1:-192.168.7.2}
DATE=`date`
ssh root@$BONE "date -s \"$DATE\""

It just gets the date on the host and then ssh's to the bone and sets the date.  I bet it could be converted to run from Windows.

--Mark


On Monday, November 5, 2018 at 8:47:20 AM UTC-5, Alan Thomason wrote:
Reply all
Reply to author
Forward
0 new messages