0

Low level clock

CheMax gravatar image

asked 2018-01-11 12:40:28 +0100

Hello,

I need time synchronization between the two devices. At the same time I want to use the standard means of bluetooth, synchronizing the clock of the connected devices with each other.

Am I able to get the time from the lower level through interaction with a stack (s132)?

For example, when working on the HSI level, there is a command to reset time for handle:

BOOL HCI_Read_Clock (WORD wConnectionHandle, BYTE byWhichClock).

Thanks.

edit retag flag offensive close delete report spam

2 answers

Sort by » oldest newest most voted
1
hungbui gravatar image

answered 2018-01-12 13:44:06 +0100

In addition to what endnode already explained, another issue is that if a packet is missing it will be re-transmitted and it will mess up with time synchronization.

I would suggest you to use extra channel to do time synchronization, either by an advertising packet or by proprietary protocol such as ESB. To have full control of the timing when sending the advertising packet, you should use timeslot API.

Using ESB concurrently with BLE for time synchronization is explained here.

edit flag offensive delete publish link more

Comments

Many thanks, I will definitely read and try to understand.

CheMax ( 2018-01-13 08:06:41 +0100 )editconvert to answer
0
endnode gravatar image

answered 2018-01-11 13:55:32 +0100

HCI is not supported by Nordic stack and all upper layers have no concept of time, just asynchronous calls and events. You can still do it over L2CAP or GATT with some custom protocol but due to stack processing and delay between radio interrupt on LL and event callback to your FW there is limit how precise the time synchronization could be (statistically). I would say safely below 10ms, probably even somewhere around 1-2ms. Good for most of usual "clocks" for humans but probably not enough for any precise measurements and automated applications.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

2 followers

Stats

Asked: 2018-01-11 12:40:28 +0100

Seen: 209 times

Last updated: jan. 12

Related questions