RTC sync time with linux device


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

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 !

routers don't have a bult-in rtc. give time from ntp via 3g connection is not good idea.

Anyone solve the problem with how to get time from arduino?