Re: [SlimDevices: Touch] Clock running 2 minutes ahead
Waldo Pepper;683477 Wrote: The clock on my SB Touch can drift upto 5 mins a week. I have forgot most of the obscure Linux commands but since I use my PC most nights, I SSH in using Putty on Windows and correct the time manually using date mmddhhmm.ss. Lazy, I know. This has rewoken my old C programming days and I have written a C prog that can generate a file containing the correct time from my PC (which is NTP synched and the Touch does not appear to support NTPDate), converts it to the date format required by Linux and ssh the file into the Touch to automatically correct the time on the Touch when my PC boots (which is every day). Not keen to post an .exe because of peoples worry, but happy to show the source and the batch using Plink. The batch is: logitime.exe plink.exe -ssh -pw password -noagent -m commands.txt root@Touch IP address The source is: #include stdio.h #include stdlib.h #include time.h #include io.h FILE *commands; void main (void) { char tim[9]; char dat[9]; char output[20]; _strdate(dat); _strtime(tim); if ((commands=fopen(commands.txt, w)) == NULL) { printf(\n\rError: Could not open output file); fclose(commands); exit(-1); } sprintf(output,date %c%c%c%c%c%c%c%c.%c%c\n\r,dat[0],dat[1],dat[3],dat[4],tim[0],tim[1],tim[3],tim[4],tim[6],tim[7]); printf(\n\r%s,output); fprintf(commands,%s,output); sprintf(output,exit); printf(\n\r%s,output); fprintf(commands,%s,output); fclose(commands); } Run the batch and it automatically takes DOS time, converts it to Linux Date and SSH's it into your touch. Make it happen when your PC boots and you're sorted. WTP PM me if you need help. -- Waldo Pepper Waldo Pepper's Profile: http://forums.slimdevices.com/member.php?userid=39029 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
The clock on my SB Touch can drift upto 5 mins a week. I have forgot most of the obscure Linux commands but since I use my PC most night, I SSH in using Putty on windows and correct the time manually using date mmddhhmm.ss. Lazy, I know. -- Waldo Pepper Waldo Pepper's Profile: http://forums.slimdevices.com/member.php?userid=39029 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
I don't know about logs, but a random thought: What if your server clock is drifting, and was 2 minutes ahead when the Squeezeboxes connected to it. Then the Squeezeboxes synced to your server, and got the wrong time. Then your server synced to an NTP server and received the correct time. After which you noticed the difference? -- Soulkeeper -That is not dead which can eternal lie. And with strange aeons even death may die.- 'Bug 17797: Updating wiki.slimdevices.com' (http://bugs.slimdevices.com/show_bug.cgi?id=17797) Soulkeeper's Profile: http://forums.slimdevices.com/member.php?userid=35297 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
Soulkeeper;682088 Wrote: I don't know about logs, but a random thought: What if your server clock is drifting, and was 2 minutes ahead when the Squeezeboxes connected to it. Then the Squeezeboxes synced to your server, and got the wrong time. Then your server synced to an NTP server and received the correct time. After which you noticed the difference? There are a number of factors that exclude the drifting of my server clock: * When the Radio and Touch where drifting, the ReadyNAS, which is the server, was still running on the correct time. * None of my 4 SBs get ever unplugged and they stay connected with my server 24/7. I dont use mysqueezebox.com (it is even disabled). * Both IPK3 players, who have no clock logic inside, were running on the correct time. Only the SqueezeOS players had their time drifting when I noticed the problem. It lasted for a couple of hours before both had the correct time again. Very strange. -- Pascal Hibon 1 x SB3, 1 x SB Boom, 1 x SB Radio and 1 x SB Touch - all wireless ReadyNAS NVX running LMS 7.7.1. w iTunes plugin iPeng on iPod Touch. SqueezePad iPeng on iPad. Pascal Hibon's Profile: http://forums.slimdevices.com/member.php?userid=7969 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
This is still consistent with my scenario, provided that: 1) The SqueezeOS players don't -continuously- sync their clocks against LMS. 2) Your NAS doesn't -continuously- sync its clock against an NTP server. But if you know for certain that your NAS clock never drifts, my scenario has got to be wrong, of course. -- Soulkeeper -That is not dead which can eternal lie. And with strange aeons even death may die.- 'Bug 17797: Updating wiki.slimdevices.com' (http://bugs.slimdevices.com/show_bug.cgi?id=17797) Soulkeeper's Profile: http://forums.slimdevices.com/member.php?userid=35297 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
The Touch and Radio keep their own time using the linux system time which is kept in software based on the processor clock, which is not particularly accurate. A 2 minute drift is definitely possible, but it usually takes several days to get that far off. The Touch has a separate hardware clock which is WAY more accurate, but it is not used in the existing firmware. (you can issue linux commands to sync the system clock to the RTC, but the firmware does not automatically do this). The problem with the RTC is that it is not battery backed, you have to reset it after every power up. The Touch is supposed to sync itself to whatever server the Touch is connected to once per hour. If there is no server connected it won't sync. For example if the server is asleep at the time of the sync the Touch won't send a WOL to wake it up just to get the time. If your server is frequently sleeping you can wind up with issues if its never awake when the Touch wants to get its time. You can get araound this by playing music continuously for say an hour and a half, that should pretty much guarantee the time update will happen while the server is awake. You can see whats happening on the Touch by SSHing to it (use PuTTY on windows) and checking the log file (vi /var/log/messages). If it can't connect to a server to get its time it will put an error message in the log file. John S. -- JohnSwenson JohnSwenson's Profile: http://forums.slimdevices.com/member.php?userid=5974 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
[SlimDevices: Touch] Clock running 2 minutes ahead
I just noticed that the clock on my Touch and Radio are running 2 minutes ahead. First I thought I had an issue with my NTP server but that is fine. My ReadyNAS, which runs LMS, runs on the correct time and both my Boom and SB3 have the correct time as well. Both the Touch and Radio are on 7.7.1. (so is LMS). Is this a know issue? -- Pascal Hibon 1 x SB3, 1 x SB Boom, 1 x SB Radio and 1 x SB Touch - all wireless ReadyNAS NVX running LMS 7.7.1. w iTunes plugin iPeng on iPod Touch. SqueezePad iPeng on iPad. Pascal Hibon's Profile: http://forums.slimdevices.com/member.php?userid=7969 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
Soulkeeper;681888 Wrote: I don't know if it's the exact same problem, but something similar has been discussed before, see forum thread: 'NTP on the Touch' (http://forums.slimdevices.com/showthread.php?t=87588) I dont know how the Touch and Radio work when connected to a local LMS server in terms of clock synchronizing so I dont know if it is the same problem. But even if the offered solution in that thread works, it is a kind of solution I dont like. Since we have an LMS server running locally I believe the Touch and Radio should sync with the clock of LMS. For some strange reason, both my Touch and Radio are back on the right time again (without me interfering with them). Im a bit in the dark about what happened here. Is there any log I could check that could tell me what went on; maybe a log file on the Touch / Radio? -- Pascal Hibon 1 x SB3, 1 x SB Boom, 1 x SB Radio and 1 x SB Touch - all wireless ReadyNAS NVX running LMS 7.7.1. w iTunes plugin iPeng on iPod Touch. SqueezePad iPeng on iPad. Pascal Hibon's Profile: http://forums.slimdevices.com/member.php?userid=7969 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch
Re: [SlimDevices: Touch] Clock running 2 minutes ahead
I don't know if it's the exact same problem, but something similar has been discussed before, see forum thread: 'NTP on the Touch' (http://forums.slimdevices.com/showthread.php?t=87588) -- Soulkeeper -That is not dead which can eternal lie. And with strange aeons even death may die.- 'Bug 17797: Updating wiki.slimdevices.com' (http://bugs.slimdevices.com/show_bug.cgi?id=17797) Soulkeeper's Profile: http://forums.slimdevices.com/member.php?userid=35297 View this thread: http://forums.slimdevices.com/showthread.php?t=92804 ___ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch