12-07-2012, 08:04 AM | #1 |
Groupie
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
|
Time synchronization on the Touch and PW
I noticed a funny thing about how the Kindle Touch and Paperwhite do their time synchronization.
The system calls the shell script /usr/sbin/updatetime (identical on the Touch and the PW). This script first calls a NTP server at Amazon configured in /etc/sysconfig/ntp. So far, nothing special. Using NTP is standard procedure. If the script can't reach the NTP server it falls back on making a web request to an Amazon web server, filtering out the date header from the web server's response. Nice idea for those situation where only http requests into the net are allowed. In my case this doesn't help as I have blocked any access out of my intranet on my Touch so I changed the address to a local web server. But then I noticed that the web request is not completely standard compliant (the line endings are wrong) and because of that there was no response. I changed the get_web_time() function and then it worked flawlessly: Code:
get_web_time() { printf "HEAD / HTTP/1.0\r\n\r\n" | nc ${HTTP_SERVER} 80 | grep "Date: " | cut -d ' ' -f 3- } |
01-02-2013, 12:30 PM | #2 |
Connoisseur
Posts: 55
Karma: 40919
Join Date: Sep 2012
Device: Kindle Paperwhite 3, Apple iPad Mini
|
I tried modifying the code as suggested and updated the ntp server to time.nist.gov without success. I don’t have a local web server to sync. Does anyone have any other ideas to get time sync working on a wifi only Paperwhite?
|
01-02-2013, 12:54 PM | #3 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
run the ntp server on your router. I do.
|
01-03-2013, 06:51 AM | #4 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Not every router has ddwrt or openwrt
|
01-03-2013, 08:44 AM | #5 | |
Junior Member
Posts: 8
Karma: 10038
Join Date: Jan 2013
Device: KPW
|
Quote:
Try changing /etc/sysconfig/ntp so it has a line like: NTP_SERVER=0.pool.ntp.org |
|
01-03-2013, 08:47 AM | #6 |
Connoisseur
Posts: 55
Karma: 40919
Join Date: Sep 2012
Device: Kindle Paperwhite 3, Apple iPad Mini
|
I checked my time capsule and it doesn't have an ntp server. I was hoping for a quick fix but I'm ok for the 30 seconds it takes to set the time manually if it slips. Thanks to all.
|
01-03-2013, 08:49 AM | #7 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
01-04-2013, 06:20 AM | #8 | |
Groupie
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
|
Quote:
Also before running for a test do 'rm /var/run/prntpset.dat'. The script caches in this file the last result and if not sufficient time has passed since the last run, it doesn nothing. By default it only allows a check once a day. This is configured by the value of NTP_CHECK_TIME in /etc/sysconfig/ntp. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
kindle synchronization | danpeer | Amazon Kindle | 3 | 12-25-2011 09:48 AM |
Tag Synchronization | ccowie | Calibre | 2 | 08-27-2010 07:41 PM |
Device Synchronization | wayner | Amazon Kindle | 6 | 04-22-2010 08:47 AM |
Never ending Synchronization | Raedwulf | Sony Reader | 8 | 11-02-2009 01:05 AM |
Disable Synchronization help please | charlesp | Sony Reader | 2 | 01-10-2009 01:18 PM |