Hi, Does anyone know how or if it's possible to add a RTC to the UDOO? I've noticed https sites really don't like it when your PC date is Jan 1 1970 . Of course, running "date MMddhhmmyyyy" works well [where MM is the month, dd is the day, hh is the hour, mm is the minutes, and yyyy is the year] and survives restarts but as soon as the UDOO loses power or is unplugged and plugged back in the date is reset, implying no real time clock (RTC). Is it possible to add one to it? Maybe add a RTC to the Arduino and have it send the information to the UDOO via its embedded port? I just feel this is something that can help the UDOO board become a full-featured PC and also add nice functionality to an Arduino if the information can be transferred between them Related, but another way to attack this, maybe we can simply have the UDOO find system the time at startup using NTP and an NTP server, to avoid the need for an RTC at all? If so, does anyone know the way to do this via command line so it can be added at startup? Maybe something like this can be added to the official release, using NTP to find the current time? Thanks, Josh
i havent actually set it up that far yet, but personally i would do the later, NTP on startup. This is how my PCDuino and Raspberry Pi get their time. i run Wifi on both so. Its not perfect, but easier than adding more hardware for a RTC
Sounds great, I'll look into the command line to do so - it's been a while since I've played with NTP in Linux but I remember it wasn't too bad to setup, just need to research really quick. Thanks DracoLlasa!
Yes, you can run this command to get current time through NTP protocol: Code: sudo ntpdate-debian If you want, you can also set UDOO to do it on startup. Also, for your info, there's a white battery power connector, near the reset button, labeled "extbat". This is an "hardware" solution to add RTC functionalities to UDOO, you'll need a 3V button battery wired to a JST male connector. Andrea
Andrea, Thank you very much - that was excellent information! So would the battery function like it does on a PC motherboard then, where (I suspect) it would recharge when plugged back into power. I suspect this is how motherboards do it at least, as the battery virtually never needs replacing In the interim I'll setup the ntpdate-debian to run in linux.rc for startup and will consider a battery as a full RTC functionality as well -Josh
This is great, makes it VERY easy to add... So basically the UDOO has a RTC, you just need to connect the batter in the extbat JST port and you are good to go.
I'm not sure where to put it so it can work at startup, but a quick search of the man pages turned up ntpdate. From the command line you can type "sudu ntpdate us.pool.ntp.org" to set the time and date. Take a look at http://www.pool.ntp.org/en/use.html for more info about setting up ntp (and picking a region that is close to you). p.s. If you're like me and know just enough unix to be dangerous, "man -k WORD" can be useful for finding all of the man pages that contain WORD (such as looking for ntp commands).
if you are trying to just setup NTP on boot, its real easy, just go into: Applications -> system tools -> system settings Under system open 'Date and Time' in the upper right corner, click 'unlock' and enter the root password (default: ubuntu) Then you will be enable to enable 'network Time' just under where the unlock button was. Set that up and as long as you are booting to a known wifi network, the system will sync time automatically on boot. If you are not booting to a preconfigured WiFi network then obviously you will need to use one of the other RTC type solutions, but this is the most straightforward setup
I forgot to update this - a CMOP battery wired to the port at the bottom of the board, by the Reset button, does indeed work well. Up until now I'd had ntpdate running each startup in /etc/local/rc.local (within Debian). The CMOP battery does maintain time well - confirmed by shutting it off and unplugging it for several minutes then plugging it back in and confirming time with ntpdate disabled
I do beleive any type of 3v button battery would work just fine. the RTC is in the UDOO so it just needs the power.
In that case I'll just serial two AA or AAA batteries together and hook them to that port. (Provided 3V is the correct voltage.) Thanks, EBrown
Correct! You can also use a 3V button battery but I would go for a couple of AA/AAA, like the official UDOO's Battery Holder for RTC does.
Option 1 = Official Battery holder + 2xAA Option 2 = Unofficial Holder + CR 2032 3V (This is what I'm going to do) Option 3 = Super Unofficial Battery idea - rechargeable LiPo (need to drop from 3.7v to 3v, & add charger, fuel gauge, + code to recharge from main board when the charge has dropped below certain level). A bit over the top, but if you are bored, why not.