mirror of
https://github.com/pollen-robotics/microduck.git
synced 2026-11-26 04:25:46 +08:00
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