Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›Guides›How Labelixa stops a label printing on the wrong printer

How Labelixa stops a label printing on the wrong printer

Published:

The companion guides explain why it happens: a label printed on the wrong printer is an identity problem, and every layer of the stack trusts a name or an address that is allowed to change. This guide describes what the Labelixa DirectPrint agent does about it, what we measured on a real printer, and exactly where the protection stops.

The job goes to a device, not to an address

A print job is sent to a device record: the device_id you get when you register the printer (POST /v1/devices; GET /v1/devices lists them). The network address lives in the agent's mapping on the computer next to the printer, not in your integration, so moving the printer means changing one mapping — not your ERP code.

Pin the printer's identity

When you map a network ZPL printer, pin its identity in the same step:

labelixa-agent map-printer -device DEVICE_ID -address 192.168.1.50:9100 -pin-identity zpl

The agent asks the printer who it is (ZPL ~HI), stores a digest of the answer and replies Identity pinned. From then on it asks the same question before every job — not once at install time, because install time is not when a DHCP lease moves.

On a mismatch, nothing is printed

If the device that answers at the mapped address gives a different answer, the agent does not send the label. Its log says so in one line:

identity mismatch: the device at 192.168.1.50:9100 is NOT the device pinned for "DEVICE_ID". Nothing was printed.

followed by the command to pin again if the printer was really replaced. The job is marked failed with the error type KimlikUyusmazligi and is not retried automatically. That matters: if the job waited in the queue, fixing the pin would print the old label on whatever device now holds the address — so sending it again is your decision.

What we measured

On 2 November 2026 we ran this on a Zebra GK420d on the network, with agent 0.6.1 and the production service:

We simulated the mismatch on one printer by changing the pin; we did not swap two physical printers at the same address.

Where the protection stops

When you see a mismatch

  1. Find out which device now holds the address: print its configuration label or check the DHCP lease table, as in the diagnosis guide.
  2. Point the mapping back at the right printer, ideally at a reserved address.
  3. Pin again only if the printer itself was replaced or its firmware was updated.
  4. Then send the failed label again — deliberately.

The agent is on the download page; the print and device endpoints are in the API documentation.

Frequently asked questions

What happens when a different printer answers at the address?

If the printer was pinned and the answer to the identity query differs from the pinned one, the agent sends nothing. Its log says the device is not the one pinned and that nothing was printed, and the job is marked failed with KimlikUyusmazligi. It is not retried automatically.

Does the check work for every printer?

No. It works for ZPL printers reached over the network, where the agent can ask ~HI. EPL, TSPL and CPCL have no verified identity query, a USB print queue carries data one way only, and a device that was not pinned is not checked.

Can it tell two identical printers apart?

No. The pin is the printer's answer to ~HI — model, firmware, resolution and memory, no serial number. Two printers of the same model with the same firmware and memory answer the same, so reserved addresses remain the protection between them.

Related guides

The printer answers ping, but port 9100 does not

The printer answers ping but nothing reaches port 9100: ICMP and the raw print service are different things. Four checks, in the order that isolates the cause.

Printer identity: why queue names and IPs betray you

Every layer of the label printing stack identifies a printer by something mutable: a queue name, a port mapping, a DHCP lease. Anatomy of jobs going astray.

Status requests take an age — or never come back

A ~HS query that takes ages or never returns is rarely a slow printer: five printer states answer with silence, and a query behind an open connection waits.

Why did my label print on the wrong printer?

Labels landing on the wrong printer are an identity problem, not bad luck: queue names, DHCP leases and shared drivers. How to diagnose and stop it.

Try your own ZPL code →