Automatic date and time set from host PC

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

Hi,

How about running NTP server on you PC and NTP client on bone? cheers, -roger

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

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

Hi Alan,

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

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