← RFID test tools

Chameleon Ultra crystal oscillator offset

Measure how fast or slow your Chameleon Ultra's 32 MHz crystal runs, against internet time.

  1. 1Connect
  2. 2Measure
  3. 3Result

Connect your Chameleon Ultra

Plug your CU in to USB, not Bluetooth, and close anything else using it, such as the CU app or the Python CLI. This browser-based tool requires Chrome or Edge on a computer. See below for alternative options.

Connected
Chameleon Ultra
Checking the firmware…

Keep this tab open in the foreground with the computer awake, stay on the same network, and keep the CU away from readers.

Options

starting

–
Estimate so far
–
–
The crystal's offset, + meaning fast.
CU relative to this computer
–
This computer's clock
–
CU read scatter
–
Network check
–
Firmware

Measuring needs the test firmware: stock v2.3.0 plus a crystal tick counter (source). Chameleon Ultra only, not Lite. Flashing keeps your slots and saved cards. When you're done, flash stock v2.3.0 back, or use "Flash a file" for another application DFU package (a .zip). The FSK self-trim test firmware has the counter too: if your CU is on it, measure without flashing.

Command line (Python script)

hfxo_ntp.py performs the same measurement using NTP. It also needs the test firmware.

curl -LO https://mfcarroll.github.io/rfid-test-tools/chameleon/crystal/hfxo_ntp.py
uv run hfxo_ntp.py /dev/tty.usbmodemXXXX

uv installs pyserial automatically.

Options

PORT
The CU's serial port: /dev/tty.usbmodem… on macOS, /dev/ttyACM0 on Linux, COM5 or similar on Windows.
--minutes N
How long to measure. 30 by default.
--server HOST
The NTP server. time.cloudflare.com by default.
--log FILE
Write every sample to a file.

For developers

The test firmware adds command 3125 to the CU's protocol, a tick counter for the crystal-driven 16 MHz clock (branch feat/hfxo-count).

Log