Your Digital Media Has Never Looked So Good

 
wejones
Topic Author
Posts: 82
Joined: Sat Feb 05, 2005 3:16 pm
Location: Maine

How to set RTC on Roku?

Tue May 13, 2008 6:26 am

Perhaps a dumb question, and something that obviously isn't very important, based on the fact that I just noticed that my clock was off after a couple years. But I did notice today that some files that the ROKU was saving on my shares had the wrong date, actually the wrong year, ie 2004, so I decided to set the time/date on the ROKU.
The interesting thing, is that the last time I set the time on the ROKU, I used the setup program via the remote and TV, but when I went to do that today, I tried to select the YEAR, and it would only allow years between 2003 and 2006. Ie no 2007 or 2008. {Is there a file which contains the year options used by the setup program???}

So I decided to go in via telnet. I was able to set the time/date using the DATE command, however when I tried to set the real time clock, I couldn't find a command to do this. I tried 3 commands from other versions of Linux, but none of these were part of the ROKU version of Linux. So the question is, is there a set real time clock command that can be used on the ROKU???

I realize that most people have their ROKUs set up to use NTP servers, but I don't have my ROKU connected to the internet, and in the past have just not worried about the time, and figured that I could just set it manually, which I can do, but I'd like to set the RTC so it will hold if I reboot.


Thanks.
 
Burkhardi
Posts: 1943
Joined: Tue Jun 07, 2005 11:06 am
Location: Austin, Texas ...Y'all

Tue May 13, 2008 9:07 am

Try setting the right timezone in settings and hook it up to the internet for while so it can get the right date. Then the internal SuperCap should keep the clock running even after boot up and power off (as long as you don't try setting it up again w/o a net connection).

I'll try to tinker with this in the next couple days to make sure I am not giving you bad info.

The 2.X firmware uses a time server on the net to set the time as you pointed out.

Regards, Matt
Roku3 and Roku HD1000 [Rev B] on a Samsung HLP5674W DLP in the living room; a Roku2 and two Roku XS and a few SoundBridges.Win7; Kubuntu and XP via RT-N66U, E2000 and a switch or two. I own stock in Roku, it's just all in the form of hardware.Viva la Roku
 
wejones
Topic Author
Posts: 82
Joined: Sat Feb 05, 2005 3:16 pm
Location: Maine

Tue May 13, 2008 11:50 am

Burkhardi wrote:
Try setting the right timezone in settings and hook it up to the internet for while so it can get the right date. Then the internal SuperCap should keep the clock running even after boot up and power off (as long as you don't try setting it up again w/o a net connection).

I'll try to tinker with this in the next couple days to make sure I am not giving you bad info.

The 2.X firmware uses a time server on the net to set the time as you pointed out.

Regards, Matt


Thanks for the reply. I've gotten the right date in it via the date command. That wouldn't be any different from using the internet would it??? It's easier for me to do this manually than to connect it to the internet, partly due to a complicated route through my LAN, and partly due to the fact that I'm on a dialup, and don't give the computers automatic access. Although perhaps after I upgrade from my dialup, I might set up the NTP stuff.

Thanks.
 
lyrad
Posts: 2
Joined: Tue Jul 12, 2005 1:59 pm
Location: Portland, Oregon

Network time problems and fixes

Mon Jul 07, 2008 10:29 am

As many people have pointed out, you can't set the year past 2006 using the setup menu. While looking into this, I noticed that the Network Time Daemon (ntpd) was failing as well as the ntpdate executed on startup.

In my case, this is because my ISP blocks access to "priveledged" network ports - those below 1024. Ntpdate has an option to use an "un-priveledged" port but nptd does not. Also, the time server that is hard coded in (clock.redhat.com) does not seem to be responding.

Here is what I did to fix this. It requires telneting into the PhotoBridge as root and changing some system files so it is not for the faint-of-heart and could easily BREAK YOUR PHOTOBRIDGE.

First, I disabled the NTP daemon so that it won't interfere with ntpdate. I did this by editing /etc/inittab and commenting out the line which read "::respawn:/bin/ntpd -g -n". It should then look like "#::respawn:/bin/ntpd -g -n".

It will be necessary to reboot the PhotoBridge at this point in order to get rid of the running ntpd. Killing it doesn't work since it will just be respawned.

Now, we can verify that ntpdate will really work. If your system is like mine, the time and day will be correct (or close) but the year will be 2003 or something other than 2008. DON't CHANGE IT, yet.

Execute the following command:
/bin/ntpdate -u 0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org


It will take several minutes to complete. Once it returns, do a 'date' command and verify that the date is now set correctly, including the year. If this is the case, then congratulations, you have a working ntpdate.

NOTE:
If you are not in the US, then it may be necessary to use different time servers. Visit http://www.ntp.org for a list of valid time servers you may use.


Now, we need to make this automatic. To do this, edit the file /etc/rc.d/rc.local and find the line which reads "/bin/ntpdate 66.187.233.4" and change it to
/bin/ntpdate -u 0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org

Save your changes and exit the editor. The time will now be set correctly at startup.

To cause the time to be periodically re-synchronized, you can create a periodic task to be run. We do this by creating a cron task for root.
Run "crontab -e". This will allow you to create or edit root's cron control (crontab) file.
Add the line:
7 2 * * * /bin/ntpdate -u 0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org

then save and exit. (ESC then ZZ)

This will cause ntpdate to be run at 02:07 every day. There is nothing magic about this time so feel free to change it if you want. I never pick a time between midnight and 2AM since tasks in this time range might be run twice on days when switching between daylight savings time and standard time.

Have fun. I hope this works for you.

Daryl in Oregon
HD1000-B, 3 SoundBridge, Sceptre Naga-37 HDTV

Who is online

Users browsing this forum: No registered users and 2 guests