Squeezebox clock
Posted by: Rockingdoc on 01 July 2011
I know I should probably ask this on the Logitech forums, but I'd have to register and all that malarky. So, can anyone tell me how to set the time on my Squeezebox Touch? It seem to lose time, and I can't find any way to adjust it in Settings.
I had some spare time, so went looking for my own answer on how to set the time, and here it is, copied from the Squeezebox forum. Don't any of you complain about Naim's useability ever again!
"I'm using TinySB and I've been annoyed by the fact that it does not keep time properly, or even some time does not have the time at all :
http://forums.slimdevices.com/showthread.php?t=87505
Keeping a network device on time has been solved eons ago by the NTP protocol. For some reasons, the SqueezeBox reinvented the wheel and the end result is that it does not work.
The solution is of course to add NTP to the Touch. This is mostly for people using TinySB, but people using mysb should also benefit from the greater accuracy.
I've decided to go for "ntpclient" which is half the size of the already small "msntp". It only sync to a single NTP server, but it can't be worse that the current solution which depend on a single Logitech server.
http://doolittle.icarus.com/ntpclient/
1) Building the cross compiler
==============================
The first task is to build the development environment for the Touch.
Relevant URLs :
http://wiki.slimdevices.com/index.ph...d_Instructions
http://www.pokylinux.org/doc/poky-handbook.html
First, you need a Linux system. My main system is Debian, so that's easy for me, other people can probably run Ubuntu from the CD or in a VM.
Second, you need to install a bunch of packages. The URL above has a nice list, but the exact list unfortunately depends on your Linux distribution. The build process usually give enough clues to figure out which package is missing.
After, we start building :
-------------------------------------------
cd .../somewhere
svn co http://svn.slimdevices.com/rep...trunk/squeezeos/poky
sudo sh -c 'echo "0" > /proc/sys/vm/mmap_min_addr'
bash
umask 000
cd poky
source poky-init-build-env
bitbake squeezeos-image
-------------------------------------------
If you manage to get enough package, it should pass the initial checks , start to download various packages and build them. It will take time, so on the mean time you can rip a few CDs or do the groceries...
In my case, it did not manage to go through the end and failed somewhere. It did not matter, though, as it did compile the cross compiler and glibc properly (which is more or less all you need).
2) Picking your NTP server
==========================
The second step is to figure out which NTP server you want to use. If your home router has a NTP server, you probably should use that. Otherwise, get NTP server on the Internet. I wish Logitech would publish the address of their NTP server so that people can use it.
You need to add the new NTP package at the proper place in the tree and set the NTP server. The package is attached as a tar file.
----------------------
cd ../meta-squeezeos/packages/
tar -xvzf .../ntpclient.poky.tar.gz
emacs ntpclient/ntpclient/init
cd ../../build/
----------------------
When you edit the "init" file above, you need to replace "ntp.logitech.com" with your chosen NTP server.
3) Building and installing NTP
==============================
Let's build ntpclient and push it to the Touch.
--------------------------
bitbake ntpclient
cd build/tmp-jive/work/armv5te-none-linux-gnueabi/ntpclient-2010-r1/install/ntpclient/
tar -cvzf ntp.touch.tar.gz etc usr
scp ntp.touch.tar.gz root@192.168.1.100:/tmp
---------------------------
Now, we need to log to the Touch and finish the installation
-----------------------------------
ssh root@192.168.1.101
cd /
tar -xvzf /tmp/ntp.touch.tar.gz
/etc/init.d/ntpclient start
-----------------------------------
If you want ntpclient to be automagically started at boot, you will need to modify /etc/init.d/rcS and add something like :
----------------------------------------
# Start Samba
if [ -x /etc/init.d/samba ]; then
/etc/init.d/samba start &
fi
+ /etc/init.d/ntpclient start &
# Start squeezeplay
/etc/init.d/squeezeplay start
----------------------------------------
4 Final words
=============
Well, I've just installed NTP a few minutes ago, so we will see with time how it performs. For now, the Touch and my PC are within the same second, which is not bad.
Have fun..."