Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

What I am doing is to synchronize multiple Bluetooth devices by broadcasting non-connectable advertisement (only 1 packet) to 2 devices which are scanning. I register advertisement report function using blecm_RegleAdvReportCb. In that function, I use bleapputils_currentNativeBtClk(); to get receiving timestamp. Then, I can know time offset on those 2 devices.

In the situation that I transmit nothing else among those devices, the offset I get are very consistent. It varies only  1 - 3 unit (less than 1 ms; good enough). However, when I experimented in the situation that they transmit information continuously, the time offset is not consistent anymore with the range up to 35 units (~11 ms).

Therefore, I conclude that the callback function might start quite late after it actually receive the advertisement packet. Then, I am finding for a way to get the timestamp at the point it is receiving (not in the callback) for more consistent time offset. Is it possible? or Is there any patch for that feature?

I'm using WICED Sense.

0 Likes
1 Solution

Unfortunatley, because all of the tasks are queued serially within the same thread and processed in order, priority cannot be given to the advertisement report callback relative to other callbacks.

View solution in original post

5 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Is this what you are looking for?

Callback to modify single advertisments?

0 Likes
Anonymous
Not applicable

My problem is not at the broadcaster (the advertising device), but my problem is at the scanner devices.

0 Likes
Anonymous
Not applicable

I think it's difficult.

But, to synchronize two observers,

if you can use the timestamp of broadcaster,

boont's suggestion will work.

0 Likes
Anonymous
Not applicable

Is it possible to give more priority to the advertisement report callback (relatives to other callbacks that run in application thread) ?

0 Likes

Unfortunatley, because all of the tasks are queued serially within the same thread and processed in order, priority cannot be given to the advertisement report callback relative to other callbacks.