0

time synchronization

asked 2015-05-09 04:07:06 -0700

riko642 gravatar image

updated 2015-05-09 10:01:25 -0700

Is there any way how to precisely synchronize time in two connected devices? For instance, to measure ping/latency.

edit retag flag offensive close merge delete

Comments

Is it possible to be more specific as to what you mean by two connected devices? Do the devices have an AllJoyn session established between them? If yes, over which transport? Also, what level of precision (millisecond / microsecond) are you aiming for?

praveenb ( 2015-05-17 02:36:03 -0700 )edit

Yes, they have an AllJoyn session established, The communicate using BusObject.Signal. Microseconds are fine.

riko642 ( 2015-05-22 08:34:03 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-17 02:43:23 -0700

praveenb gravatar image

IMHO, time synchronization between two nodes of a network (distributed system) is best achieved via NTP.

To measure latency between two nodes, you can try using ajn::BusAttachment::Ping.

A crude form of time synchronization using AllJoyn is possible by doing the following:

  • Set up an AllJoyn session between the two nodes
  • Send multiple ajn::BusAttachment::Ping messages between the two nodes to get an average round-trip-time.
  • Send AllJoyn messages containing the time-stamp at one end to the other node (after defining necessary objects, interfaces and members)
  • Based on this, one should be able to calculate the time difference between the clocks of two nodes

As I mentioned already, the above is quite crude. NTP is far more sophisticated to synchronize times between two nodes.

edit flag offensive delete publish link more

Comments

Thanks for your answer, is there any tutorial explaining how to use NTP?

riko642 ( 2015-05-22 08:30:08 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-05-09 04:07:06 -0700

Seen: 107 times

Last updated: May 17 '15