Home / Hardware y Moviles / A two-nanosecond pulse: how ultra-wideband measures centimetres and defuses relay car theft

A two-nanosecond pulse: how ultra-wideband measures centimetres and defuses relay car theft

There is a scene that keeps repeating in car parks across Europe: two people, a small case of electronics, and a car that opens by itself. Nobody forces the door or breaks a window. One of them walks next to the owner with a receiver that captures the signal from his key; the other stays beside the vehicle with a transmitter that repeats it. The car asks “are you close?”, the key answers yes, and the distance both believe they share is a fiction created by an amplifier. It is the relay attack, and for years it was almost impossible to stop because keyless systems measured the strength of the signal, not the time it took to arrive.

The technology that changed that equation is called UWB, ultra-wideband. It is not a new network or a faster version of Bluetooth: it is a different way of using the spectrum, based on emitting extremely short radio pulses and measuring in nanoseconds when they come back. With that, a car can tell whether the key is two metres away or twenty, and a phone can point to the exact position of a tag in a room. The trick is not in the power. It is in the clock.

The trick is bandwidth, not strength

Any radio system can roughly estimate a distance from the strength at which a signal arrives (RSSI). The problem is that strength can be amplified: an attacker with a good amplifier and two directional antennas turns a key fifty metres away into a key that seems to be one metre away. Power is data that can be lied about; time of flight, much less so.

Measuring distance by time of flight requires resolving a pulse in time, and there the physical limit appears: the minimum duration of a pulse is roughly the inverse of its bandwidth. A 20 MHz Wi-Fi channel can emit pulses of about 50 nanoseconds; light and radio waves travel 30 centimetres in one nanosecond, so that pulse “occupies” some 15 metres of space. It is enough to know whether something is in the same room, not whether it is at 1.20 m or 1.80 m.

UWB occupies at least 500 MHz of spectrum, and in practice works with channels from 500 to 1,500 MHz. A 2-nanosecond pulse spans about 60 centimetres; by correlating the exact shape of the received pulse with the expected one, resolution drops to centimetres, and with fine calibration to a few. The regulation that opened the door was the US FCC decision in 2002: allowing emissions between 3.1 and 10.6 GHz at a very low spectral density, around -41.3 dBm/MHz, which makes the system look, to every other receiver, almost like background noise.

What a pulse looks like inside the standard

The standard used by today’s chips is IEEE 802.15.4z, in its HRP (high rate pulse repetition) mode. The transmitter does not emit a continuous sine wave: it fires trains of pulses about two nanoseconds long at a mean repetition rate of 64 or 128 MHz, modulated in position and phase (BPM-BPSK) over a 499.2 MHz chip rate. Each symbol carries information in the exact instant the pulse appears, not in its amplitude. The usual channels are 5, centred at 6.5 GHz, and 9, at 8 GHz.

On the receiving side there is no simple envelope detector: there is a correlator that compares the incoming signal with the template of the expected pulse and looks for the peak. That peak is a timestamp. The whole positioning system comes down to comparing four or six of those timestamps against a local clock which, of course, is not perfect: the quartz oscillators in a key or a phone drift by tens of parts per million, and at the speed of light an error of 1 ppm over a 10-metre path is already several centimetres.

Four timestamps that cancel the clock error

The solution is called two-way ranging. Device A sends a pulse and records t1; B receives it at t2 and replies, recording t3; A receives the reply at t4. Time of flight would be (t4 – t1 – (t3 – t2)) / 2. With independent clocks, each side measures on its own scale and the result is contaminated. That is why the double-sided variant is used, in which both sides exchange their timestamps and combine them so that the frequency offset cancels algebraically. It is the same principle used by GPS satellite correlators, applied to distances of metres instead of thousands of kilometres.

One detail separates a prototype from a product: antenna delay. The pulse does not leave the chip, it leaves an antenna, and the internal path to the radiating element adds tens of picoseconds that must be calibrated at the factory and compensated in the calculation. An error of 30 picoseconds is almost a centimetre of distance measured wrong.

The sequence that disarms the relay

Measuring time solves the amplifier problem, but not that of an attacker who simply forwards the pulses with minimal delay. The modern defence sits at the physical layer and is called STS, scrambled timestamp sequence. Both devices share a 128-bit AES key and derive from it the exact timing position of every pulse in a block. Without the key you cannot know when the next pulse will arrive, and therefore you cannot regenerate the sequence or answer in time. The receiver compares the timestamp of the STS pulses with the expected one; if the path implies a distance greater than a predefined threshold, the operation is rejected even if the signal is perfect. It is the technique the literature calls distance bounding: the protocol does not just measure, it enforces a verifiable physical limit.

Direction is added on top. Many modules carry two or three antennas and compare the phase difference of arrival (PDoA) to compute an angle. With distance and angle, the car knows not only that the key is three metres away but in which direction; and a key that suddenly appears three metres away at the wrong angle is discarded. The digital key specification from the Car Connectivity Consortium, CCC 3.0, relies on these two pieces so that a phone can open the car without a relay being able to impersonate it.

Beyond the car key

The same mechanism is behind the feature that tells you “40 centimetres, to the right” when you hunt for a lost tracker in the sofa: Apple’s U1 and U2 chips, and the Android equivalents in Find My Device, use this kind of measurement. In industrial logistics, UWB tags locate forklifts and pallets with decimetre accuracy inside warehouses where GPS does not exist; in factories they are used so a robotic arm knows whether a person is inside its working radius; in hospitals, to track beds and equipment. There are less obvious uses too: proximity-based car door opening, augmented reality anchored to a fixed point, or console controllers that detect where you are pointing.

What UWB cannot do

It is worth not selling it as magic. It needs a reasonably clear line of sight: the human body, metal and water absorb these frequencies strongly, and a measurement through a concrete wall simply does not exist. Indoor multipath produces echoes that arrive a few nanoseconds after the direct pulse, and although modern receivers discriminate them, in a narrow corridor accuracy degrades. Practical range is tens of metres, not hundreds, and the consumption of a receiver sampling at 500 MHz is not that of a low-power Bluetooth chip: that is why phones switch it on in bursts rather than as a permanent service.

What it has achieved is changing the question. For twenty years the industry asked how much signal arrives; now it asks when it arrived. And that question, measured in nanoseconds, is far harder to fake than any power level.