Documentation / Distance quickstart

Distance quickstart

Use two tags to measure one distance. For position, follow the Location quickstart.

You need

Two tags, two USB-C data cables, desktop Chrome or Edge, and a measured separation. Use the hosted console over HTTPS, or a local preview on localhost. No firmware toolchain is needed.

1. Flash one tag per role

  1. Open Console → Distance. Disconnect other DFU devices so you can identify the tag being flashed.
  2. Unplug Tag A. Hold BOOT0 while reconnecting USB. Select Flash Initiator, choose the STM32 DFU device, and wait for the flash result.
  3. Unplug Tag A, release BOOT0, and reconnect normally.
  4. Repeat for Tag B using Flash Responder.

Flashing replaces the installed firmware. An existing calibrated pair does not need to be reflashed for every session. If you already have the correct roles, continue below.

2. Get a measurement

  1. Select Connect serial in each slot. Choose Tag A for the initiator and Tag B for the responder. Connect one at a time if the device names look alike.
  2. Confirm Mode I in slot A and Mode R in slot B. Use INFO to inspect each device.
  3. Keep both tags powered with clear line of sight. The responder log should show changing D records and Live Distance should update.
D 42 1000 16174 -748

This example reports 1,000 mm (1 m). The graph is fixed at 0–5 m; a trace outside those bounds is clipped, but the numeric reading and CSV retain the measurement. The current distance firmware targets 40 Hz; this is not a delivery guarantee.

3. Calibrate the pair

  1. Fix both tags at a measured separation, using consistent antenna reference points and orientation. Start with 1 m in clear line of sight.
  2. Under Pair Calibration, enter 1000 mm, choose responder slot B, and collect at least 100 samples with Start calibration.
  3. Wait for the result and verify the responder acknowledges OK CALIB. Record both device IDs and the offset.
Keep the same calibration for the distance sweep.

The active offset is in RAM. The browser saves a copy for that responder on this browser and site; another computer, Python, or ROS 2 does not automatically share it. See calibration persistence.

4. Save a test

  1. Move the stationary pair to another known separation without recalibrating.
  2. In Static Test, select the correct distance unit and enter the duration in minutes.
  3. Select Start Test, keep the pair still, then select Download Test CSV.

Export Chart CSV contains only the live chart's recent samples. Use the static-test download for a full timed run. Current rate and packet-success estimates can hide long outages; record interruptions and read the measurement limitations.

If it does not work

SymptomCheck
No STM32 DFU deviceUse a data cable; hold BOOT0 while powering on. DFU is for flashing, not serial measurement.
No serial device after flashingUnplug, release BOOT0, and reconnect. Select the serial device again; it is different from the DFU entry.
Port busy or access deniedClose other console tabs, Python readers, ROS nodes, and serial terminals. Check OS permissions; Linux serial access is commonly controlled by the dialout group.
INFO works, but no distanceConfirm one I and one R, matching PHY settings, both powered, and a clear radio path. Inspect MISS and DIAG records.
Graph empty, numbers updatingCheck whether the distance is outside 0–5 m and whether the chart is paused.
Offset changed after reconnectingCheck the device ID and saved calibration. Browser storage is separate for localhost and the live site.

Still stuck? Send hello@open-tags.com your OS/browser, both INFO and DIAG outputs, the failing step, and a short raw log. Browser capability details: Web Serial documentation.

5. Connect your software

Disconnect the responder from the console, keep the initiator powered, and follow the Python setup or ROS 2 guide.