Files
microduck/btd/systemd
Pierre Rouanet c03918aa76 Setup code from the ID EEPROM, and secure mode whenever a robot has one
The factory writes the setup code into the robot's ID EEPROM with an
external programmer, after the 18-digit label serial:
md1:<first name>:<64 hex>, the same string as the QR printed on it.
robotd-params::label decodes it.

configd's unit runs `robotctl system setup-code export` before it
starts: it takes the EEPROM's code (or a dev board's installed key),
refuses one whose id is not this robot's first name, and leaves the key
in /run/credstore. btd and duck-gateway are ordered after configd and
ImportCredential=ble-psk, so secure mode follows the robot with no
drop-in; without a key btd serves the PIN path and the gateway exits
cleanly. The gateway gains an [Install] section.

`robotctl system setup-code` shows the code and where it came from;
`install` is now for dev boards with nothing in the EEPROM. The factory
doc's sequence becomes: read the first name, generate a random key,
program the EEPROM, print the QR, verify against the printed label.

Assisted-by: Claude:claude-opus-5-5
2026-11-10 11:58:42 +01:00
..