Skip to content

ZeroTrace HID

Autostart

Run a script automatically when the device boots

Designate one script as the autostart and the firmware runs it at boot — the script saved as /__autoStart__ on the device filesystem executes on every power-on and reset.

Configure

Autostart is provisioned over BLE from the mobile app:

  1. Open the device's Files.
  2. Set the script you want as the autostart script.
  3. Power-cycle to verify. The status LED runs cyan → green while the autostart script executes.

To clear it, set a different script or unset the current one.

Boot timing

On boot the firmware waits up to ~8 s for OS detection (plus a short settle) before the autostart script runs, so _@detectedOS is usually populated by the time your script branches on it.

Autostart requires a working HID transport with the keyboard mounted. If USB HID is not brought up — for example when disable_hid_startup is set — the autostart script is skipped. It can be brought up later with enableHID.

Common patterns

  • Plant-and-trigger — load the payload before deployment, then power the device at the target site to fire automatically.
  • Persistence — combined with repeat, re-arm a payload after a host reboot.
  • Delayed fire — begin the autostart script with a delay to wait after power-on without an RTC.

Command Palette

Search for a command to run...