• For that to be useful I'd need to
    set response packet content after preceding advertising packet has been sent, so it's uptodate

    Yes. This may actually work with nordic softdevice 6.1.x , see https://github.com/espruino/Espruino/iss­ues/2000 since 6.1.0 you need to supply static buffer that needs to be allocated for whole advertising time. So most likely current data will be sent as is from that buffer, so updating timestamp in it periodically or when some event happens (like when someone asks for scan response) may work. Documentation says it should not be modified but if one does not change the structure and just update timestamp in specific location it may work.

    Anyway, opening connection and getting time from characteristics (possibly few times) may be easier after all if millisecond accuracy is preferred.

About

Avatar for fanoush @fanoush started