Skip to content

Bernie User Guide

Automation (UDP)

A workshop script sends LightBurn's UDP commands to Bernie with a token; the job still starts only after your click on the Mac.

A workshop script (or other software) can drive Bernie with LightBurn’s UDP commands — open a project, import a file, choose the device, read the state — but authenticated: each message starts with a token (LightBurn requires none).

  • Enable: Settings › Automation › Automation (UDP) › Accept UDP commands from this Mac (off by default). Bernie only listens on this Mac (127.0.0.1), port 19840 by default; replies go to the sender’s port 19841, as with LightBurn. New Token invalidates the old one; after too many wrong tokens, it changes by itself.
  • Files folder: the app is protected by the macOS sandbox; LOADFILE and IMPORT only open files in the folder chosen here (absolute path inside that folder, or relative to it).
  • Message: token COMMAND or token COMMAND:argument. Commands: PING (→ OK), STATUS (→ OK, BUSY during a job, OK DISCONNECTED without a laser), LOADFILE:file (refused if the open project has unsaved changes), FORCELOAD:file (opens anyway), IMPORT:file (into the open project), LASER:device name, CLOSE (refused with unsaved changes), FORCECLOSE (closes without saving). Errors reply ERREUR … with the reason.
  • START asks to start: Bernie runs its usual checks (checklist included) and shows “Start the job?”; the job only runs after your click on the Mac’s screen (the Dock icon bounces if Bernie is in the background). The OK reply means the confirmation is shown; an error if no project is open, the laser is not connected or a job is running.
  • Command-line tool: bernie-udp (in the repository, cargo build -p bernie-link --bin bernie-udp), the equivalent of SendUDP: bernie-udp --jeton TOKEN STATUS, bernie-udp --jeton TOKEN "LOADFILE:badge.bernie" (token also from the BERNIE_UDP_JETON variable); it prints the reply and exits with an error if it is not OK.

In this section

  • bernie Command

    The bernie command checks, estimates, exports and engraves a project from a terminal or a script, on a USB or network laser, Bernie Link, OctoPrint or Duet.

This manual is also built into Bernie: press F1, or open the Help menu, to read the topic for what you are doing. A mistake, a missing answer? Tell us

Try it in Bernie, for free.

Free laser engraving and cutting software for diode, CO2, fiber and galvo lasers. Windows, Mac, Linux, iPad, iPhone and in the browser.