Skip to Main Content
Round trip time (RTT) is widely used in ranging algorithms to compute the time of arrival (TOA) of a packet sent from a mobile station (STA) to an access point (AP). We propose a mechanism for measuring RTT in IEEE 802.11g using data and acknowledgement (ACK) messages at the driver layer. The scheme is implemented in the ATH9K driver in which timestamps (in nano-second) are collected when data are sent and ACK messages are received. The time differences between those two events (or interrupts) are considered the RTT for delivering these packets. However, due to noise caused by hardware, interrupt handling, and packet processing, directly using the measured RTT data to compute range of a mobile device can generate a high error of about 100ft. In fact, we discover from experiments that the standard deviation of RTT samples is 79μs. We prove that 1.7 million samples are required to achieve a ranging accuracy of 30ft. To reduce the size of samples, we use Euclidean distance (ED) to measure the difference of two sets of RTT data. With the help of ED, we only need 40k samples and achieve ranging accuracies of 10 ft and 50 ft for indoor and outdoor scenarios, respectively. Because the entire ranging system is implemented in the ATH9K driver, it can be easily installed in current STAs without modifying the existing APs.