• @myownself

    I think connecting will result in a much more accurate time than relying on the right advertisement being picked up at the right time.

    I thought so too but in my tests that connection takes several seconds while advertisement-solution can be improved down to e.g. 50ms delay between updating advertisement, so using connection is a lot worse for some reason.

    @fanoush

    bluetoth timing is strict, advertising packets are timed/spaced in deterministic way

    No it's not deterministic - Bluetooth protocol has builtin random delay for timing which is around 10 ms or so, so accuracy better than that is not possible using normal API. (But yeah it's good enough.)

  • Scan response timing seems deterministic only in relation to preceding advertising packet. For that to be useful I'd need to
    a) know the exact time when preceding advertising packet was sent
    b) set response packet content after preceding advertising packet has been sent, so it's uptodate

    I don't think either of those are possible with normal APIs since advertising isn't meant to be used for sending time-sensitive data like this. (Sure both would be possible in theory with custom Bluetooth protocol stack.)

About

Avatar for fanoush @fanoush started