Sterling Diaz
Sterling Diaz

Reputation: 3875

Configure Zebra Printer via bluetooth using zpl

I want to change the zebra printer language to zpl via bluetooth, but the default printer language is Line_Print, so, I don't how to change the printer programmatically to zpl if the printer does not understand zpl yet. Is it necessary to change the language using Zebra Setup Utilities and then start using zpl commands?

I would also change a configuration in the bluetooth connection, so, it does not require a pairing number to connect, but again, I want to do it programmatically but the printer does not understand zpl commands.

Is there a way to do it?

Upvotes: 1

Views: 4720

Answers (2)

Wessel Wessels
Wessel Wessels

Reputation: 61

Download the Link-OS SDK from Zebra: https://www.zebra.com/us/en/products/software/barcode-printers/link-os/link-os-sdk.html

Follow instructions to add the SDK to your application.

On Android:

import com.zebra.sdk.printer.SGD

SGD (SET GET DO) sets, gets and does things on the printer, regardless of the current language. If your language is set to line_mode, other methods of getting or changing settings will likely just print our the raw commands.

Make a connection with your printer (follow the docs) and use this before you print something: SGD.SET("device.languages","zpl", thePrinterConn); where thePrinterConn is the connection made and open (tested by using thePrinterConn.isConnected().

For iOS:

Follow a similar path. Haven't done it myself, but look at the example app they give. Specifically, look in LineModeViewController.m for this:

[SGD SET:@"device.languages" withValue:@"zpl" andWithPrinterConnection:connection error:&error];

This is in objective C, but the swift bridge will have a similar method.

Upvotes: 3

banno
banno

Reputation: 1544

! U1 setvar "device.language" "zpl"

Make sure you send a carriage return and line feed afterwords.

This kb article also speaks to this: https://km.zebra.com/kb/index?page=content&id=SO7296

Also there is an Android SDK which has helper commands to do this: http://www.zebra.com/us/en/products-services/software/link-os/link-os-sdk.html

Upvotes: 1

Related Questions