Skip to content

Navigation Menu

Sign in
Sign up

Add TSPL printer status reporting - #219

Open
3DTek-xyz wants to merge 1 commit into
michaelrsweet:master from
3DTek-xyz:tspl-status-reporting
Open

Add TSPL printer status reporting #219
3DTek-xyz wants to merge 1 commit into
michaelrsweet:master from
3DTek-xyz:tspl-status-reporting

Conversation

@3DTek-xyz

@3DTek-xyz 3DTek-xyz commented Sep 1, 2026

Copy link
Copy Markdown

Adds TSPL printer status polling using the <ESC>!? command and maps the returned status bits to PAPPL printer-state reasons.

This follows the existing ZPL/ESC/POS pattern by updating printer reasons before/after jobs and from the printer status callback.

Also propagates TSPL raster write failures instead of always returning success.

Tested:

  • Built on Debian arm64/Raspberry Pi
  • make test passed
  • Tested with a TSC DA210 over USB

@michaelrsweet michaelrsweet added the investigating Investigating the issue label Sep 1, 2026

Copy link
Copy Markdown
Owner

I'll look into this after Labour Day... First blush: I know a lot of TSPL-compatible printers don't actually support this command so I might want to make this model-specific.

Also, for the write error detection, maybe just track a bool ret variable initialized with value true and use ret &= papplDevice...(); to track the write status throughout - fewer control paths to deal with and simpler code.

Finally, since you have a genuine TSC printer, run "lprint -o verbose devices" to get the 1284 device ID you can use to create a new driver entry in "lprint-tspl.h".

Copy link
Copy Markdown
Author

Thanks Michael, that makes sense.

I ran the verbose device command against the real TSC DA210 test printer. Without elevated permissions it only found network/other printers, but with elevated permissions it returned:

usb://TSC/DA210?serial=000001
TSC DA210 (USB)
MFG:TSC;CMD:TSPL2;MDL:DA210;CLS:PRINTER;CID:TSCPrinters;

Happy to rework the patch so the TSPL status command is model-specific for the DA210 rather than applied to all TSPL-compatible printers.

Would you prefer that I resubmit the PR with those changes, or would it be better left to someone with a deeper understanding of LPrint’s driver structure?

Copy link
Copy Markdown
Owner

Would you prefer that I resubmit the PR with those changes, or would it be better left to someone with a deeper understanding of LPrint’s driver structure?

You can certainly take a first pass at it - normally we add something to the driver name for capabilities like this, but if all genuine TSC label printers support the command then it could be as simple as looking for "tspl_tsc-SOMETHING" in the driver name and enabling the status command if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

investigating Investigating the issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /