When synchronization is required
- First boot or after a factory reset
- When the OLED displays
REQTIME - If login services report “invalid code” despite entering it immediately
- After long periods without power (several weeks)
Sync workflow
- Unlock ZeroKeyUSB.
- Connect to the serial interface via the web manager or CLI.
- The device sends
REQTIMEto signal it needs the current epoch. - The host responds with
SETTIME <epoch>, for exampleSETTIME 1706227200. - ZeroKeyUSB stores the value in EEPROM (little-endian 64-bit) and resets its internal counters.
Checking drift manually
Run the CLI status command:Clock drift: +18s. If the value approaches ±60s, perform a new synchronization.
Troubleshooting
| Symptom | Fix |
|---|---|
REQTIME persists after sending SETTIME | Ensure the epoch is in seconds (not milliseconds). |
| Codes always off by 30 s | Host clock likely misconfigured; verify OS time sync. |
| CLI cannot open port | Close other serial programs (e.g., Arduino IDE) that might be connected. |