NTP for iPhone

  • Follow


I am building an iPhone application that needs to ensure thats its
time is accurate to a fraction of a second. I am considering setting
up the devices to check the time on startup using the NTP protocol (or
maybe the simple NTP protocol).

1) Are there any NTP libraries for the iPhone?
2) It was suggested to me that I could pull code from OpenNTPD or
perhaps another c project (the iPhone supports c code). About how much
work would it take to make this work on the iPhone given I have no
experience with NTP?
3) Any other advice?
0
Reply casebash 2/16/2010 10:47:29 PM

casebash <walkraft@gmail.com> wrote:
> I am building an iPhone application that needs to ensure thats its
> time is accurate to a fraction of a second. I am considering setting
> up the devices to check the time on startup using the NTP protocol
> (or maybe the simple NTP protocol).

Depending on your definition of a fraction of a second, wouldn't an
iPhone already be getting rather accurate time from the cell towers?

Or are you also concerned about devices like the iPod touch?

rick jones
-- 
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
0
Reply Rick 2/16/2010 11:44:35 PM


casebash wrote:
> I am building an iPhone application that needs to ensure thats its
> time is accurate to a fraction of a second. I am considering setting
> up the devices to check the time on startup using the NTP protocol (or
> maybe the simple NTP protocol).
> 
> 1) Are there any NTP libraries for the iPhone?
> 2) It was suggested to me that I could pull code from OpenNTPD or
> perhaps another c project (the iPhone supports c code). About how much
> work would it take to make this work on the iPhone given I have no
> experience with NTP?
> 3) Any other advice?

I suspect using the ntpd for the Mac would get you most of the way
there. I have no clue if there would be compile problems or run problems
but I believe that Apple would make their iPhone O/S as close as
possible to what they run on the Mac.

Danny

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
0
Reply Danny 2/16/2010 11:57:26 PM

Yes, the the phone can sync with the phone towers. However, I do want
to try to support iPod touch if possible and from my what I've seen/
what I've heard the phone towers are only accurate to within a few
seconds and not always reliable.

On Feb 17, 10:57=A0am, Danny Mayer <ma...@ntp.org> wrote:
> casebash wrote:
> > I am building an iPhone application that needs to ensure thats its
> > time is accurate to a fraction of a second. I am considering setting
> > up the devices to check the time on startup using the NTP protocol (or
> > maybe the simple NTP protocol).
>
> > 1) Are there any NTP libraries for the iPhone?
> > 2) It was suggested to me that I could pull code from OpenNTPD or
> > perhaps another c project (the iPhone supports c code). About how much
> > work would it take to make this work on the iPhone given I have no
> > experience with NTP?
> > 3) Any other advice?
>
> I suspect using the ntpd for the Mac would get you most of the way
> there. I have no clue if there would be compile problems or run problems
> but I believe that Apple would make their iPhone O/S as close as
> possible to what they run on the Mac.
>
> Danny
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

0
Reply casebash 2/17/2010 12:53:43 AM

On 2010-02-16, casebash <walkraft@gmail.com> wrote:
> I am building an iPhone application that needs to ensure thats its
> time is accurate to a fraction of a second. I am considering setting
> up the devices to check the time on startup using the NTP protocol (or
> maybe the simple NTP protocol).
>
> 1) Are there any NTP libraries for the iPhone?

It's already been done.

http://web.archive.org/web/20080401170640/http://wickedpsyched.com/iphone/ntp

-- 
Steve Kostecke <kostecke@ntp.org>
NTP Public Services Project - http://support.ntp.org/
0
Reply Steve 2/17/2010 3:42:06 AM

Thanks heaps. I saw a reference to that project before, but the
hyperlink was broken.

On Feb 17, 2:42=A0pm, Steve Kostecke <koste...@ntp.org> wrote:
> On 2010-02-16, casebash <walkr...@gmail.com> wrote:
>
> > I am building an iPhone application that needs to ensure thats its
> > time is accurate to a fraction of a second. I am considering setting
> > up the devices to check the time on startup using the NTP protocol (or
> > maybe the simple NTP protocol).
>
> > 1) Are there any NTP libraries for the iPhone?
>
> It's already been done.
>
> http://web.archive.org/web/20080401170640/http://wickedpsyched.com/ip...
>
> --
> Steve Kostecke <koste...@ntp.org>
> NTP Public Services Project -http://support.ntp.org/

0
Reply casebash 2/17/2010 4:13:39 AM

casebash wrote:
> Yes, the the phone can sync with the phone towers.
>  However, I do want to try to support iPod touch if
>  possible and from my what I've seen / what I've heard
>  the phone towers are only accurate to within a few
>  seconds and not always reliable.

(Shrug)

 CDMA is used as a source for some Stratum One servers.  e.g.
<http://psp2.ntp.org/bin/view/Servers/ServersSynchronizedByCDMA>


There have been at least three iPhone / IPod Touch apps
 that claim use NTP: Emerald, Clockulous, wickedpsyched

The iPhone has GPS, it could be used as a time source?

GSM NITZ is apparently supported by AT&T, Cingular, T-Mobile;
 However, it seems service provider support in the rest of
  the world is lacking?

I've seen reports of people running openNTPd on iPhones
 (after JailBreaking them).

-- 
E-Mail Sent to this address <BlackList@Anitech-Systems.com>
  will be added to the BlackLists.
0
Reply E 2/17/2010 4:15:05 AM

Unfortunately, I can't access the GPS.

On Feb 17, 3:15=A0pm, E-Mail Sent to this address will be added to the
BlackLists <N...@BlackList.Anitech-Systems.invalid> wrote:
> casebash wrote:
> > Yes, the the phone can sync with the phone towers.
> > =A0However, I do want to try to support iPod touch if
> > =A0possible and from my what I've seen / what I've heard
> > =A0the phone towers are only accurate to within a few
> > =A0seconds and not always reliable.
>
> (Shrug)
>
> =A0CDMA is used as a source for some Stratum One servers. =A0e.g.
> <http://psp2.ntp.org/bin/view/Servers/ServersSynchronizedByCDMA>
>
> There have been at least three iPhone / IPod Touch apps
> =A0that claim use NTP: Emerald, Clockulous, wickedpsyched
>
> The iPhone has GPS, it could be used as a time source?
>
> GSM NITZ is apparently supported by AT&T, Cingular, T-Mobile;
> =A0However, it seems service provider support in the rest of
> =A0 the world is lacking?
>
> I've seen reports of people running openNTPd on iPhones
> =A0(after JailBreaking them).
>
> --
> E-Mail Sent to this address <BlackL...@Anitech-Systems.com>
> =A0 will be added to the BlackLists.

0
Reply casebash 2/17/2010 4:32:10 AM

Actually, while that link isn't broken, the files it refers to are not
available (the  link is to wayback machine). Anyone know of any ntp
attempts? BTW, in terms of accuracy, Emerald time claims to have a
standard deviation of 0.0042 seconds, while my phones clock is off
Emerald times by -0.385 seconds. So, if one phone can be off by that
much, two phones could be off by 0.8 seconds.

On Feb 17, 2:42=A0pm, Steve Kostecke <koste...@ntp.org> wrote:
> On 2010-02-16, casebash <walkr...@gmail.com> wrote:
>
> > I am building an iPhone application that needs to ensure thats its
> > time is accurate to a fraction of a second. I am considering setting
> > up the devices to check the time on startup using the NTP protocol (or
> > maybe the simple NTP protocol).
>
> > 1) Are there any NTP libraries for the iPhone?
>
> It's already been done.
>
> http://web.archive.org/web/20080401170640/http://wickedpsyched.com/ip...
>
> --
> Steve Kostecke <koste...@ntp.org>
> NTP Public Services Project -http://support.ntp.org/

0
Reply casebash 2/18/2010 1:30:02 AM

On 2010-02-18, casebash <walkraft@gmail.com> wrote:

> Actually, while that link isn't broken, the files it refers to are not
> available (the  link is to wayback machine).

Right.

> Anyone know of any ntp attempts? BTW, in terms of accuracy, Emerald
> time claims to have a standard deviation of 0.0042 seconds, while my
> phones clock is off Emerald times by -0.385 seconds. So, if one phone
> can be off by that much, two phones could be off by 0.8 seconds.

I've already contacted the techinical/admin contact (from whois) for the
original domain and asked for the file. No reply yet.

I also spent some time searching for that ntp.tgz. Closest I came was (
a Russian bittorrent site)
http://www.p2pbg.com/index.php?page=torrent-details&id=447407f35b5781f7a68a6f1c9ea2056bc3d01ba6#expand
but can't figure out how to make it go.

Perhaps  http://code.google.com/u/wickedpsyched/ might be a lead.

-- 
Steve Kostecke <kostecke@ntp.org>
NTP Public Services Project - http://support.ntp.org/
0
Reply Steve 2/18/2010 2:58:54 AM

Thanks for your detective work. I was considering trying posting to
that project's list, but you beat me to it.

On Feb 18, 1:58=A0pm, Steve Kostecke <koste...@ntp.org> wrote:
> On 2010-02-18, casebash <walkr...@gmail.com> wrote:
>
> > Actually, while that link isn't broken, the files it refers to are not
> > available (the =A0link is to wayback machine).
>
> Right.
>
> > Anyone know of any ntp attempts? BTW, in terms of accuracy, Emerald
> > time claims to have a standard deviation of 0.0042 seconds, while my
> > phones clock is off Emerald times by -0.385 seconds. So, if one phone
> > can be off by that much, two phones could be off by 0.8 seconds.
>
> I've already contacted the techinical/admin contact (from whois) for the
> original domain and asked for the file. No reply yet.
>
> I also spent some time searching for that ntp.tgz. Closest I came was (
> a Russian bittorrent site)http://www.p2pbg.com/index.php?page=3Dtorrent-d=
etails&id=3D447407f35b5781...
> but can't figure out how to make it go.
>
> Perhaps =A0http://code.google.com/u/wickedpsyched/might be a lead.
>
> --
> Steve Kostecke <koste...@ntp.org>
> NTP Public Services Project -http://support.ntp.org/

0
Reply casebash 2/18/2010 10:14:38 PM

>>> In article <hlfal3$q6t$2@usenet01.boi.hp.com>, Rick Jones <rick.jones2@hp.com> writes:

Rick> Depending on your definition of a fraction of a second, wouldn't an
Rick> iPhone already be getting rather accurate time from the cell towers?

I have the NTP iPhone app from Emerald Sequoia on mine.  So far I haven't
seen the time reported by my iphone to be off by more than 61 seconds from
the correct time.

I gather the internal TOD clock on the iPhone is not sync'd to reality all
that often.

-- 
Harlan Stenn <stenn@ntp.org>
http://ntpforum.isc.org  - be a member!
0
Reply Harlan 2/27/2010 8:04:55 AM

11 Replies
567 Views

(page loaded in 0.165 seconds)

Similiar Articles:
















7/22/2012 4:09:38 AM


Reply: