Walk up.
It unlocks.
A smart lock that measures your phone’s distance by time of flight and opens only when you are really at the door. iPhone or Apple Watch, on approach or on tap. Verified on the lock, with no cloud in the loop.
A relay can add delay and nothing else, so arming one pushes the measurement away from the door. Every reading here is computed from the firmware’s own constants. How it is measured
Clone to a passing suite in one minute.
A C compiler and python3 are the whole requirement.
No board, no toolchain, and nothing phones home.
git clone https://github.com/ultrawidelock/ultrawidelock.git
cd ultrawidelock
make check # 18 suites, 9,608 checks
make dfu-key # once per clone · image-signing key
make bootstrap # once per machine · NCS v3.3.0
make build # -> build/cdk-matter
make flash # over the on-board J-Link
make monitor # console, over RTT
Distance is measured, not trusted.
Signal strength can be faked from across the street. Time of flight cannot: light takes 3.34 ns per metre, and nothing makes it arrive early.
-
Time of flight, not signal strength
A DS-TWR round under a scrambled timestamp sequence puts the phone on a ruler with 4.7 mm ticks. A relay can only add delay, which moves the phone further from the door.
-
Verified on the lock
The credential is checked on the device itself. No app in the loop, no account, no cloud round trip, and therefore no remote verifier to compromise.
-
The phone already in your pocket
An iPhone or Apple Watch opens it on approach over UWB or on tap over NFC, and the lock reports its state to Apple Home over Matter.
Learned from the air.
Written by hand.
Five steps in the order they happen, each one studied as it crossed the air and reimplemented in portable C: the credential exchange, the key ladder, STS, DS-TWR, and a Matter node without CHIP. The notes are public.
- 01BLE The phone finds the lock’s credential service.
- 02Authenticate AUTH0, AUTH1 and EXCHANGE, and both ends hold the ranging key.
- 03Range The key ladder seeds an STS session, then one DS-TWR round.
- 04Gate A trusted range inside 1.00 m moves the bolt.
- 05Home Lock state into Apple Home over Thread or Wi-Fi.
The firmware, running in your browser.
The real ranging engine compiled to WebAssembly, not a re-implementation. Walk a phantom phone at the lock, add noise, fire a spoof, and single-step a ranging round.
Plug in an ESP32-S3, C5 or C6 and install a signed image from this page. Once a board is running, the same page updates either chip over the air.
Three chip families. One portable core.
-
DWM3001CDK
nRF52833 + DW3110
The reference board. Radio, MCU and a J-Link on one part, nothing to wire. Matter over Thread. Also builds without Zephyr.
-
nRF5340 DK
DWM3000EVB + NFC12A1
UWB and NFC on the same lock, so a tap works when a walk-up does not. Matter over Thread.
-
ESP32-S3 / C5 / C6
DWM3000EVB
Matter over Wi-Fi, and the tier the web flasher installs with no toolchain at all.
- Every target, every number, and the memory budget on the smallest part.Read the specification
ISC licensed,
all the way down.
No CLA. Every number on this page is checked against the code that produces it, and the build fails when they drift.
Repository defaults are bench defaults. Keys and identities in the tree are for development. Do not secure valuables with it.