Re: 📡 Synchronization of timestamps, using Bluetooth Connection Event?
site_archiver@lists.apple.com Delivered-To: Bluetooth-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bluekitchen-gmbh.com; s=default; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eFeRbf+DAvcUo17sY9mkpuzJxQCBo529Wp/0Oftce0Q=; b=MVfoAl1I2Bo4rJXVODe0S1rUq s+Ab4NMPqymLCzRYFvLR8JjexdM5ZGAZZV4sBQ4D3aLQFlh+hE5sKSmNjESuXtsO83xsgvnEpAUkk Om2Ch5koa0Vc23r4O65teB6WFAfEvPp6msjmZikcclQZAxq/ZxadVdAhSgGHrNHzcjh0MPgFOeUiV sjPdepUb7F6682iF5K+yqdriC9DyHV9XrnIkc+ira4BhoaMHgppCCjwUTKKJtkr5r067s2y7xwoBz A0cTPb4h9B9MNLhzUOV/6M+ok0zD9euduv1o3oeS5ac1LvCMFpK413I4KQy1K3boyilnIC4eyLapo uE+ehi8xA==; Hi Julian Under the assumption that you don't have much control over the iOS side, I would try to minimize unknown latencies there. If you're sending, you cannot know when the Connection Event happens, so you have the time until next CE plus the time through the iOS stack. Because of this, I'd suggest to send a timestamp from the nRF52 to iOS. Then, you only have the time it takes from the Bluetooth Controller through the stack to the app. I would hope that this might be possible in 1-2 ms if your app in front. Now, for the nRF52, there you're aware of the Connection Event and queue a packet e.g. 2 ms before the next CE and put that time into the timestamp. On iOS, the might be a random jitter. However, knowing the connection interval, you can always identify the timestamp with the shortest delay through the stack. If you're take this idea for a spin, I'd be curious to learn if that worked, and how well.. Cheers Matthias — Dr. sc. Matthias Ringwald CTO and Co-founder of BlueKitchen GmbH, Zurich https://bluekitchen-gmbh.com
On 12 Feb 2019, at 12:25, Julian Vogels <julian@soundbrenner.com> wrote:
Dear list,
Thank you for interesting topics and your support in the past.
We’re building a peripheral device (Nordic nRF52840) which needs to be time synchronized with the central device (iOS device) once on connection. When sending a timestamp, we have unknown, noticeable latency. This is because we cannot know the time it takes until one packet is processed on the central side, sent, and then received and processed on the peripheral side. However, we do know that there are Connection Events (CEs) occurring every Connection Interval (30 ms), where the packets are exchanged. We were planning on using the CEs to infer the actual time of send/receive, as the event is happening at the same time on both sides and has a very short duration.
On the peripheral device, we are able to generate an interrupt when the CE occurs. On the iOS device, we are unable to detect when a Connection Event is occurring. Is there any way to get the synchronized Bluetooth clock tick (Connection Event) on iOS? Or maybe we’re on the wrong track altogether?
Any other ideas on how do you synchronize two timestamps on peripheral and central device? (We already have clock drift compensation by the way, I am just asking about timestamp sync.) Our requirement is a latency/jitter under 5-8 ms.
I hope I sparked someones interest in this engineering problem! Please send me a message if anything is unclear.
All the best,
Julian Julian Vogels CTO & Co-Founder +49 176 5659 1152 (GER) | Skype: julian.vogels | WeChat: julianvogels www.soundbrenner.com
Download our free standalone app "The Metronome by Soundbrenner" for iOS or for Android
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/matthias%40bluekitchen...
This email sent to matthias@bluekitchen-gmbh.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matthias Ringwald