Pages: [1]   Go Down
Author Topic: RTC sync time with linux device  (Read 424 times)
0 Members and 1 Guest are viewing this topic.
Lab
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I've built myself a copy of the ChronoDot RTC device (DS3231 based) and attached it to the Arduino.
My arduino is attached through the USB port to an OpenWRT embedded device that has no RTC.

I'd like the OpenWRT device to sync the time and date, when booting (using a script executed at the boot time, as a backup in case the internet connection is not available), from the RTC attached to the Arduino.

I'd apreciate any idea about how to do this


Logged


Germany
Offline Offline
Faraday Member
**
Karma: 59
Posts: 3089
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know OpenWRT, but if it communicates with Arduino via USB / Serial then just have it
Send a command to the Arduino, which triggers a reply of the current time.

Depending on what else the two are doing together, it could be more elaborate or simply a single letter command like "T".
Your OpenWRT startup script needs to have that Serial port open, send the command, read the reply and set its systemtime.

Don't ask here how to do that !


Logged

Pages: [1]   Go Up
Jump to: