laserpecker
An open control library for LaserPecker laser engravers — because the vendor's software is Windows/macOS only and the Android app is painful to use.
Target device: LaserPecker 2. The protocol is shared across the LP1–LP5 range, so other models should work with adjusted device limits.
Status
Tested on real hardware (LP2, firmware 3.16) over both USB and Bluetooth: reading the device works, and engraving runs end to end — dither, upload, print start, motif on the workpiece.
| Area | State |
|---|---|
| Frame encoding / checksums | byte-identical to LDS 2.12.1, confirmed on device |
| Status, version, MAC, file list | verified on hardware, both transports |
| Serial transport (CH340, 460800) | verified |
| BLE transport | verified, but not re-run since the chunk-size fix |
| Preview (frame) and stop | verified |
| Raster upload + engrave | verified end to end |
| Upload file ID from image content | reasoned about, not yet re-run on a machine |
| Focus / Z-axis, settings write | implemented, untested — moves hardware |
| Vector / G-code jobs | not implemented |
The full list of what is still a guess is in
TODO.md.
How it was obtained
LaserPecker Design Space 2.12.1 for Windows is an Electron app. Its renderer bundle contains the complete
command layer in readable JavaScript, and the image pipeline as a WebAssembly module that can be executed
directly. The specification —
docs/protocol.md — comes from reading
that code and running the WASM against synthetic images; the machine then confirmed it.
Decompiling for interoperability is explicitly permitted in the EU (Art. 6 Software Directive, § 40e öUrhG).
Install
uv sync # or: pip install -e "."
Serial access on Linux needs membership in the dialout group; the CH340 driver is in-kernel.
Use
laserpecker ports # find the device
laserpecker info # firmware / hardware version
laserpecker status # mode, progress, errors
laserpecker preview --width 30 --height 20
laserpecker engrave logo.png --width 40 --power 30 --depth 50
from PIL import Image
from laserpecker import LaserPecker
with LaserPecker() as lp:
print(lp.info())
lp.engrave_image(Image.open("logo.png"), x_mm=10, y_mm=10, width_mm=40)
lp.wait_until_done(lambda s: print(s.rate, "%"))
Bluetooth instead of USB:
from laserpecker import LaserPecker, BleTransport
lp = LaserPecker(BleTransport("LP2-"))
Safety
The laser fires on preview and engrave. Wear the goggles, do not leave a running job unattended, and keep
stop within reach — it is the same 0xFF command the app uses.
Layout
src/laserpecker/
protocol.py frames, commands, reply parsers
transport.py serial + BLE
imaging.py dithering and bit packing
device.py high-level API
cli.py
tests/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laserpecker-0.1.0.tar.gz.
File metadata
- Download URL: laserpecker-0.1.0.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"KDE neon","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3b1aade5214590a4ff0b24fb0e7eb38be9735129f431c190cc02d2bce12806a
|
|
| MD5 |
a01636a78dc063dc4e8d0544bad8a4f8
|
|
| BLAKE2b-256 |
af040383bcfc0514e6d6203780b49316d5b94972771937f9085982d45c5d787c
|
File details
Details for the file laserpecker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: laserpecker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"KDE neon","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e86f13ab40145787c66d94a176530193894169ed67d52e3a4565886a7617977
|
|
| MD5 |
2dd529c881f9d1cf2f4f0b94bae824df
|
|
| BLAKE2b-256 |
6f5d98df72eb4bc25848759cbb5cd0bb9523596a05e4999c8cf1fdcc33c30fdc
|