nrf52840 packet transmitting time measurement for TOA or TDOA
Hi I’m currently working with the given nordic project “nrf52-ble-long-range-demo”
What I’m trying to do is measuring the sending time of packet from peripheral BLE device and arriving time of packet to central BLE device. Then with those time data I want to measure time of arrival (TOA) or time difference of arrival (TDOA) for checking distance between peri and central BLE devices in real time.
I got some questions while going through this project.
Q1) I sniffed some packets using wireshark when peripheral and central device are connected. What I could check is they are transmitting only empty PDUs between each other. Is there any way to store/load sending time onto this empty PDU?
Q2) What I tried to do is putting RTC1 into manufacturing data in advertising packet to measure the sending time of packet. But the problem is that advertising packet is transmitted only before the connection is built between peripheral and central devices. So After they are connected, there is no way to transmit data. Is it possible to inject data in emptyPDU?
Q3) How can I change the type of packet from emptyPDU to other types like Data PDU or Control PDU? Control PDUs don’t normally carry data, so a preferable choice for me would be converting into Data PDU tho.
Q4) In terms of measuring sending time, it is the right way to check RTC1 to measure the time when the packet is transmitted? If it is not, should I use TIMER library?
I really hope to get explanation in detail. I’ve already gone through the code many times, so you can just mention the name of any methods or functions in code if you need. Thank you.