I need to trigger something at the other end of a quasi-random broadcaster. I have an LP-CC2640R2 continuously scanning and I usually end up with a latency of 20ms, but sometimes the first, second, and rarely the third, advertisements are not caught, so the delay is up ~40ms. This image shows when the advertisement is sent from the CC2652RB (bottom) and a 10-second heatmap of when it is received (3rd row, ~100 samples shown). I'm wondering how I might know which packet is received. My first thought is to use a byte in the advertisement data and increment it 0x00-0xFF at GAP_EVT_ADV_END, then I can use that on my receiver to determine how many packets dropped and adjust the latency to trigger my receiver event which requires ~2Hz phase specificity.
I just want to make sure I'm not missing some better way to know the latency of a single advertisement. Thanks