In development. It changes without notice.
How it is tested
How the firmware this reference documents is tested: on a computer, on the boards themselves, and with a meter.
Two kinds of test
The C++ logic that needs no board (the vault's format, the crypto, the timing rules, the decisions of a screen) is compiled for a computer and tested there. Everything else is one suite in Python, which drives boards when there are any. The C++ tests run as part of it too, and one that fails to compile is a failure: the run compares the tests it was told to expect with the ones that ran.
With no board connected, the suite runs its own logic against a stand-in for a board, the checks of the project's rules, and the pages that are published. Continuous integration runs that on every change, and compiles and runs the C++ tests when the code changed. A test that needs a board runs only when the run is told that a board is there.
A board under test
A board is tested with a debug build, the only kind that holds the serial console (Serial Debug Console). The suite drives the board through that console, over a cable. It presses the board's own buttons, keys and touch panel by injection, opens a test vault, reads the state of the application, starts measurements, and takes the frame the firmware drew into its frame buffer, which is what was sent to the panel and not a photograph of it.
An image without the console holds none of its code. Continuous integration reads each one it builds for that.
Each test says which part of a board it needs: a keyboard, a touch panel, a motion sensor, a clock chip, an SD slot, e-paper. A board without it skips the test, so one run over every board takes each test to exactly the boards that can run it. What each board has is in The boards.
A host for the radios
Bluetooth tests need a machine on the other side of the air: one that scans, pairs, reconnects and reads what the board types. That is a computer with Linux, or another board with the firmware of the test host (QA Host Firmware), one image that plays either a Bluetooth computer or a Wi-Fi client. The portal's tests join the board's own access point or, in a debug build, reach the portal over a shared network.
The meter
Power is measured by one instrument: an ESP32-S3 that reads a TI INA228 across a 0.100 Ω resistor in the battery lead of the board under test. Two relays take a null reading with no hand on the rig. It answers to SCPI commands over a USB cable, the only way in: its firmware uses no radio.
A board is taken through its states: asleep, at the unlock screen, at the home screen, typing over Bluetooth, serving the portal. Each reading is kept with its uncertainty, its voltage and the calibration it was taken under. A board states a current for its sleep only when it was read there, and one does so far, the LILYGO T-Deck (Power). The readings are published at https://kleidos.dev/
The meter is a separate project with firmware of its own. Its documentation is published beside this reference: how it is used, wired and calibrated, its commands, its firmware and its Python package, at https://api.kleidos.dev/
The hardened build
A hardened build has a suite of its own: what it does with firmware that was tampered with, with a write that was cut, with a wrong secret and with a wipe, and what a dump of its flash shows. It runs only when it is asked for, on a board whose fuses were burned for it, and every other board skips it.
What a run leaves
Each run leaves a report of every test, with what the board said and, where there is one, the frame it drew.