PB42 Programmer's Reference Manual

Use this reference manual to program and communicate with your Intermec PB42 Portable Receipt Printer. The PB42 supports four types of commands:

  • Line Printer mode

  • Easy Print mode

  • Bluetooth

  • Query

You can use Line Printer and Easy Print commands to print receipts, tickets, and reports. You can use Bluetooth commands to set Bluetooth parameters. You can use Query commands to retrieve information about the printer or a print request, cancel printing, or reset the printer.

There are nine commands that are not included in the other four types of commands. These commands are specific to the PB42 printer and allow you to set some of the same commands as Intermec Settings and retrieve printer information:

  • Allow Messages From Printer

  • Restore Factory Defaults

  • Retrieve Firmware Version

  • Retrieve Job Status

  • Retrieve Printer Status

  • Retrieve Serial Parameters

  • Set Dark Adjust

  • Set Low Battery Indicator

  • Set Media Sensitivity

  • Set Serial Parameters

PB42 Programmer's Reference Manual, P/N 937-003-003 (updated 10/12/06)
Copyright 2006 by Intermec Technologies Corporation
All rights reserved.


Bluetooth Commands

Use Bluetooth commands to set up the Bluetooth configuration. There are two types of Bluetooth commands you can send from the host: set (S) and query (Q). All of the Bluetooth commands are preceded by the ESC character and you must send the Commit command ({COMMIT}{LP}) to invoke all of the Bluetooth commands. These commands are paired with replies. All of the replies are exactly the same as the Bluetooth commands except for two things:

  • There is no ESC character.

  • The parameter sections are replaced by status codes (0 = okay, non-zero = error).

If there is data that follows a command, the letters are followed by a colon. Each parameter that you can configure has a unique letter and is followed by a colon and then the data for that parameter. Multiple parameters within a command are separated by a semicolon. Multiple fields within data are separated by a comma. You must send all commands in uppercase letters. Do not include spaces between data unless they are part of the data.

Here is an example for setting a Bluetooth command.

If you send this command:

ESC{SBT:D:N}{COMMIT}{LP}

You receive this reply:

{SBT:D:0}

This table lists the Bluetooth commands available for the printer.

Command | Format
Reserve the Printer | ESC{SBT:B}
Retrieve Bluetooth Passcode | ESC{QST:BP}
Retrieve Bluetooth Settings | ESC{QST:BA}
Set Authentication | ESC{SBT:A}
Set Encryption | ESC{SBT:E}
Set Passcode | ESC{SBT:P}
Set the Connectable State | ESC{SBT:C}
Set the Device Name | ESC{SBT:F}
Set the Discoverable State | ESC{SBT:D}


Reserve the Printer

Description

Enables the printer to pair exclusively with another Bluetooth device. The first Bluetooth device that attempts to establish a relationship with your printer is paired exclusively with it.

Command

ESC{SBT:B:x}ESC EZ{COMMIT}{LP}

where:

x is either Y (Yes) or N (No).

Example

Set command: | ESC{SBT:B:Y}ESC EZ{COMMIT}{LP}
Reply: | {SBT:B:0}

This command enables the printer to be paired exclusively with another Bluetooth device and returns a reply saying that it has successfully enabled the printer.


Retrieve Bluetooth Passcode

Description

Retrieves the passcode from the printer.

Command

ESC{QST:BP}

Example

Retrieve command: | ESC{QST:BP}
Reply: | {QST:BP:x...x}

where:

x...x is the ASCII string you entered as the passcode.


Retrieve Bluetooth Settings

Description

Retrieves all Bluetooth settings except for the passcode.

Command

ESC{QST:BA}

Example

Retrieve command:

ESC{QST:BA}ESC

Reply:

{QST:BA:AD:x...x;F:x...x;SN:x...x;PR:xxx;CL:xxxxx;D:x;
C:x;B:x;E:x;A:x;P:x;PWR:xx;RVx...x}

Use this table to understand the query reply.

Command | Setting | Definition
AD | x...x | Returns the MAC address.
F | x...x | Returns the device name.
SN | x...x | Returns the service name.
PR | xxx | Returns the profile support.
CL | xxxxx | Returns the class of device.
D | x | Returns the discoverable state.
C | x | Returns the connectable state.
B | x | Returns the printer reserve status.
E | x | Returns the encryption status.
A | x | Returns the authentication status.
P | x | Returns the presence of a passcode.
PWR | xx | Returns the power status.
RV | x...x | Returns the radio firmware version.


Set Authentication

Description

Enables or disables authentication based on the passcode and pairing.

Command

ESC{SBT:A:x}ESC EZ{COMMIT}{LP}

where:

x is either Yes (Y) or No (N).

Example

Set command: | ESC{SBT:A:Y}ESC EZ{COMMIT}{LP}
Reply: | {SBT:A:0}

This command enables authentication and it returns a reply saying that it has successfully been set on the printer.


Set Encryption

Description

Enables or disables encryption, which encodes data to prevent others from being able to interpret the information.

Command

ESC{SBT:E:x}ESC EZ{COMMIT}{LP}

where:

x is either Y (Yes) or N (No).

Example

Set command: | ESC{SBT:E:Y}ESC EZ{COMMIT}{LP}
Reply: | {SBT:E:0}

This command enables encryption and it returns a reply saying that it has successfully been set on the printer.


Set Passcode

Description

Sets the Bluetooth passcode for the printer.

Command

ESC{SBT:P:x...x}ESC EZ{COMMIT}{LP}

where:

x...x is up to 16 printable ASCII code characters.

Example

Set command: | ESC{SBT:P:123456}ESC EZ{COMMIT}{LP}
Reply: | {SBT:P:0}

This command sets the passcode on your printer and it returns a reply saying that it has successfully been set on the printer.


Set the Connectable State

Description

Allows other Bluetooth devices to connect to your printer.

Command

ESC{SBT:C:x}ESC EZ{COMMIT}{LP}

where:

x is either Y (Yes) or N (No).

Example

Set command: | ESC{SBT:C:Y}ESC EZ{COMMIT}{LP}
Reply: | {SBT:D:0}

This command sets the printer to a state where other Bluetooth devices can connect to it and it returns a reply saying that it has successfully set the state.


Set the Device Name

Description

Assigns a "friendly" name to your printer.

Command

ESC{SBT:F:x...x}ESC EZ{COMMIT}{LP}

where:

x...x is an alphanumeric string up to 16 characters. You can have spaces between the characters.

Example

Set command: | ESC{SBT:F:My PB42}ESC EZ{COMMIT}{LP}
Reply: | {SBT:F:0}

This command sets the device name to "My PB42" and the printer returns a reply saying that it has successfully set the name.


Set the Discoverable State

Description

Allows other Bluetooth devices to be able to discover your printer during a device discovery.

Command

ESC{SBT:D:x}ESC EZ{COMMIT}{LP}

where:

x is either Y (Yes) or N (No).

Example

Set command: | ESC{SBT:D:N}ESC EZ{COMMIT}{LP}
Reply: | {SBT:D:0}

This command sets the printer to a state where it is not discoverable and returns a reply saying that it has successfully set the state.


Easy Print Mode Commands

Use Easy Print mode to design a custom receipt, ticket, or report. You can use borders, lines, stored graphics, logos, and text in any orientation you want. The main difference between Line Printer mode and Easy Print mode is that Easy Print mode allows you to use graphics that are stored in the printer. You can print your information very fast since you do not have to download the graphics every time you print.

You should always use Easy Print mode for graphics that you use repeatedly, such as a company logo. By storing the graphic in flash memory, you decrease the amount of time spent communicating information to the printer and you increase print speed. Your computer only needs to send the variable data to the printer to print receipts.

The PB42 can store up to 1 MB of graphics (or formats) in internal memory.

Easy Print Command General Format

There are five things to remember about all Easy Print mode commands:

  • All Easy Print mode commands must be preceded by the Go to Easy Print Mode command (ESC EZ).

  • The commands all follow this format: {Command:Information} where Information is the set of instructions the printer needs to carry out a command.

  • No Information is necessary for some commands.

  • The Information needed for some commands is somewhat complex.

  • There are global options for some commands that modify the entire command.

This table lists the Easy Print mode commands available for the printer.

Format | Description
{AHEAD:nnn} | Advances the paper by nnn dotlines.
{BACK:nnn} | Moves the printer back nnn dotlines.
{COMMIT} | Causes the printer to invoke a command.
{LP} | Puts the printer in Line Printer Mode.
{PRINT, Global Options:@row,column:Name, Field Options|data|} | Controls the images that print on the page.
{TP} | Causes the printer to print a self test.

View an Easy Print mode example.


Easy Print Mode Example

Total:$13.15

01-01-05

Command Strings for Text

  1. <--EZ

  2. {PRINT:

  3. @10,30:PB203,HMULT2,VMULT2|Total:$13.15|

  4. @60,30:PB203,HMULT2,VMULT2|01-01-05|

  5. }

Explanation of Command Strings

Line | Explanation
1 | Sets the printer to Easy Print mode. The "<--" character is how ESC appears on your screen.
2 | Begins the print request.
3 | Prints "Total:$13.15" in font PB203 in twice its normal size.
4 | Prints "01-01-05" in font PB203 in twice its normal size.
5 | Ends the print request


Ahead Command Format

Description

Advances the paper by a specified number of dotlines.

Command

{AHEAD:nnn}

where nnn is a number from 1 to 65,000.


Back Command Format

Description

Retracts the paper a specified number of dotlines which enables the printer to print on paper previously fed past the printing mechanism.

Command

{BACK:nnn}

where nnn is a number from 1 to 65,000.


Commit Command Format

Description

Causes settings to take effect only after the printer receives this command. Until the printer receives the {COMMIT} command, the settings are cached into memory where you can change or undo them.

Command

{COMMIT}

You must send the {COMMIT} command to invoke all of the Bluetooth commands, the Set Serial Parameters command, and the Set Default Values command.

Example

ESC{SSC:S:115200,8,N,1,H}ESC EZ{COMMIT}{LP}

where:

ESC{SSC:S:115200,8,N,1,H} sets the serial port parameters.

ESC EZ{COMMIT} invokes the serial port parameters command.

{LP} returns the printer to the default Line Printer mode.


Line Printer Mode

Description

Puts the printer in Line Printer Mode.

Command

{LP}

See Also

Line Printer Mode Commands


Media Command Format

Description

Use the media command format to set the printer to fanfold media mode and set its size in inches. This command also resets the printer to roll media mode.

Command

{MEDIA:MTYP xxx, TMAR xx, BMAR xx, CUTP xx}

Use this table to understand the elements of the print command format:

Field | Reply | Definition
MTYP | xxx | Media type in hundreds of inches. Options are 000 (returns printer to roll media mode), 600, 800, 1200.
TMAR | xx | Top margin in millimeters.
BMAR | xx | Bottom margin in millimeters.
CUTP | xx | Fine-tunes the media forward a specified number to dots to position the perforation closer to the tear bar.

Example of Printing Sequence

Step | Command | Description
1 | ESC EZ{MEDIA:MTYP 600, TMAR 20, BMAR 20, CUTP 10} | Sets the printer to fanfold media mode using 6 inch media with a top and bottom margin of 20 mm and advances the paper forward 10 dots.
2 | Send any printing files or contents to the printer. |
3 | ESC EZ {MEDIA:MTYP 000, TMAR 10, BMAR 15, CUTP 10}{LP} | Resets the printer to roll media mode with a top margin of 10 mm and a bottom margin of 15mm.


Print Command Format

Description

Use the print command format to stop the paper or rotate the image, print images, and alter the images. You can use a single print command for multiple print lines called a print request.

Command

{PRINT, Global Options:@row,column:Name,Field Options|data|}

Use this table to understand the elements of the print command format:

Element | Description
PRINT, | Use a comma after the PRINT command only if there are global options.
Global Options: | Global Options include BACK, DEMAND, QUANTITY, QSTOP, and STOP. If you use more than one global option, separate each option with a comma.
@row,column: | Specifies the row and column where each line of text or graphics will be printed. The row and column numbers are separated by a comma with no spaces anywhere. The range for each row is 1 to 65,000. In a typical print request, there may be five or more @row,column: elements for the single word "Print."
Name | Specifies the name of the font, graphic, or line to print. The Name must be five characters.
Field Options | Field options increase the size of fonts, graphics, or lines. Each field option is separated from the next by a comma.
data | Specifies the text to print. There must be vertical bars at the beginning and the end of the data. If there is no data, you do not need to include vertical bars.


Quantity

Description

Allows you to specify how many copies of a label or receipt to print.

Command

QUANTITYnnn

where nnn is a number from 1 to 999.

Example

{PRINT,QUANTITY5:@10,30:PB203|Hi world|}


Self Test Printout

Description

Causes the printer to print a self test printout.

Command

{TP}


Line Printer Mode Commands

Use Line Printer mode commands for printing receipts with text and simple (bitmapped) graphics that do not need to be stored in the printer. The following table lists the Line Printer commands available for the printer.

Note: All Line Printer commands are case-sensitive. You must type the letters exactly as they appear in this manual.

Command | Format
Advance "n1n2" From "Q" Mark | ESC Q
Cancel Line Buffer | CAN
Carriage Return | CR
Enter Bitmap Graphics Mode | ESC V
Enter Compressed Graphics Mode | ESC B
Exit Compressed Graphics Mode | ESC E
Form Feed | FF
Go to Easy Print mode | ESC EZ
Line Feed | LF
Multiply Font Height | ESC H
Reset Printer | ESC @
Select Font | ESC w
Select International Character Set | ESC R
Set Double-High and Double-Wide | ESC !
Set Double-Wide Print | SO
Set Form Length | ESC C
Set Interline Spacing | ESC A
Set Single-Wide Print | SI

View a Line Printer mode example.


Line Printer Mode Example

RECEIPT
Item #1 - yellow version | $1.00
Item #2 - blue version | $1.00
Item #3 - red version | $1.00
TOTAL : $3.00

Command Strings for Text

  1. <--wm

  2. RECEIPT

  3. <--w"

  4. Item #1 - yellow version $1.00

  5. Item #2 - blue version $1.00

  6. Item #3 - red version $1.00

  7. <--wm

  8. TOTAL: $3.00

  9. <--EZ

Explanation of Command Strings

Lines | Explanation
1 and 2 | Lines 1 and 2 print "RECEIPT" in the monospace 821 WGL4 24 font. The "<--" character is how the ESC character appears on your screen.
3 to 6 | Print item #1 through item #3 information in the monospace 821 WGL4 16 font.
7 and 8 | Prints "TOTAL: $3.00" in the monospace 821 WGL4 124 font.
9 | Go to Easy Print mode.


Advance "n1n2" From "Q" Mark

Description

Advances the paper "n1n2" dotlines from "Q" mark.

Command

Format | Value
ASCII | ESC Q n1 n2
Hex | 1B 51 n1 n2


Cancel Line Buffer

Description

Causes characters received on the currently downloading line (but not printed) to be discarded.

Command

Format | Value
ASCII | CAN
Hex | 18


Carriage Return

Description

Causes the printer to print the line being formed and then advance the media. You can use either Carriage Return (CR) or Line Feed (LF) commands to print and advance media.

Command

Format | Value
ASCII | CR
Hex | 0D

See Also

Line Feed


Enter Bitmap Graphics Mode

Description

Prints user-generated bitmap graphics across the width of the printhead.

Command

Format | Value
ASCII | ESC V n1 n2
Hex | 1B 56 n1 n2

Where n1 n2 (n1*256 + n2) forms a 16-bit binary number set, with the most significant byte first.

After the printer receives this command, the printer dumps the binary data supplied directly to the printhead. Graphics printed with this command must be the exact width of the printhead in bits. A "1" bit indicates that a dot is on, a "0" bit indicates that a dot is off. Bit 7, of the first byte of data the printer receives, prints at the left-most dot on the printhead as you view the printhead with the paper feeding away from you.

The printer remains in Bitmap Graphics mode until it receives the total amount of bytes necessary to fill n1 n2 lines of print.


Enter Compressed Graphics Mode

Description

Accepts compressed graphics data and then decompresses the graphics and prints them.

Command

Format | Value
ASCII | ESC B
Hex | 1B 42

Each compressed dotline (using a run-length encoding scheme) is preceded by an uppercase "G." Each uncompressed dotline is preceded by an uppercase "U." You can efficiently handle vertical white space by using an uppercase "A" followed by a single byte count of the number of dotlines to advance.

Compressed dotlines use a single graphics byte followed by the number of times that byte is to be repeated. Once the printer receives the compressed graphics data command (ESC B), you must have each dotline preceded by the "G" or "U." Or, you can send an "A" followed by the number of lines to advance.

When you finish sending all of the data, you must send ESC E as the final bytes. ESC E causes the printer to exit compressed graphics mode.

Compressed graphics mode requires that the graphic image be the same width as the printhead being used.

See Also

Exit Compressed Graphics Mode


Exit Compressed Graphics Mode

Description

Exits compressed graphics mode.

Command

Format | Value
ASCII | ESC E
Hex | 1B 45

See Also

Enter Compressed Graphics Mode


Form Feed

Description

Causes the printer to print the line being formed and then advance the media to the top of form.

Command

Format | Value
ASCII | FF
Hex | 0C


Go to Easy Print Mode

Description

Puts the printer in Easy Print mode. You must use capital letters for "EZ."

Command

Format | Value
ASCII | ESC E Z
Hex | 1B 45 5A

See Also

Easy Print Mode Commands


Line Feed

Description

Causes the printer to print the line being formed and then advance the media. You can use either Line Feed (LF) or Carriage Return (CR) commands to print and advance media.

Command

Format | Value
ASCII | LF
Hex | 0A

See Also

Carriage Return


Multiply Font Height

Description

Multiplies the height of the font by n. This command applies to the entire line.

Command

Format | Value
ASCII | ESC H n
Hex | 1B 48 n


Reset Printer

Description

Resets the printer to the default settings.

Command

Format | Value
ASCII | ESC @
Hex | 1B 40


Select Font

Description

Selects a font from the fonts available on your printer.

Command

Format | Value | Default
ASCII | ESC w n | n = 108
Hex | 1B 77 n | n = 6C

Values for n are numbers from 33 to 126 (21 to 7E hex). Here is a table listing the resident fonts available on your printer and which fonts work with a 40, 80, or 132 column printer.

Font (Hex) | Description | CPI | Column (4" tph) | Supported Printer Size
28 | Intermec OCR-A BT 25 | 16.9 | 67.6 | 40-column normal
29 | Intermec OCR-B BT 39 | 8.8 | 35.2 | None
22 | Monospace 821 WGL4 16 | 20.3 | 81.2 | 80-column normal
21 | US Standard CP437 with Euro 24 | 20.3 | 81.2 | 80-column enhanced
6D | Monospace 821 WGL4 24 | 14.5 | 58 | 40-column normal
42 | Enhanced CNDS font | 33.8 | 135.2 | 132-column normal
2B | Monospace 821 bold 26 | 10.7 | 42.8 | 40-column bold
26 | Roman bold 26 | 10.7 | 42.8 | 40-column bold
66 | Arabic CP1256 10x16 | 20.3 | 81.2 | 80-column normal
46 | Arabic CP1256 14x24 | 14.5 | 58 | 40-column normal
70 | Cyrillic 1251 10x16 | 20.3 | 81.2 | 80-column normal
50 | Cyrillic 1251 14x24 | 14.5 | 58 | 40-column normal
69 | Greek CP1253 10x16 | 20.3 | 81.2 | 80-column normal
49 | Greek CP1253 14x24 | 14.5 | 58 | 40-column normal
6E | Hebrew CP1255 10x16 | 20.3 | 81.2 | 80-column normal
4E | Hebrew CP1255 14x24 | 14.5 | 58 | 40-column normal
6A | Thai CP874 10x16 | 20.3 | 81.2 | 80-column normal
4A | Thai CP874 14x24 | 14.5 | 58 | 40-column normal


Select International Character Set

Description

Selects the international character set.

Command

Format | Value | Default
ASCII | ESC R n | n = 0
Hex | 1B 52 n | n = 0

Values for n range from 0 to 7.

Value for n | Country
0 | USA
1 | France
2 | Germany
3 | UK
4 | Denmark
5 | Sweden
6 | Italy
7 | Spain


Set Double-High and Double-Wide

Description

Selects the font height and width for one line. This command applies to the entire line.

Command

Format | Value
ASCII | ESC ! n
Hex | 1B 21 n

Here are the acceptable values for n.

Value for n | Description
10h | Double-high
20h | Double-wide
30h | Double-high and double-wide


Set Double-Wide Print

Description

Prints the current font in double the width until the printer receives a Set Single-Wide Print (SI) command or a Carriage Return (CR).

Command

Format | Value
ASCII | SO
Hex | 0E

See Also

Set Single-Wide Print


Set Form Length

Description

Sets the page length in character lines.

Command

Format | Value | Default
ASCII | ESC C n | n = 20
Hex | 1B 43 n | n = 14

Where n represents the number of lines in the form and n is a single byte.

Values for n are numbers from 1 to 255.


Set Interline Spacing

Description

Sets the number of blank dot lines that are fed between character lines.

Command

Format | Value | Default
ASCII | ESC A n | n = 0
Hex | 1B 41 n | n = 0

This command adds n blank lines after completion of the current line and before the next line begins printing.

Values for n are numbers from 1 to 155.


Set Single-Wide Print

Description

Prints the current font in single width.

Command

Format | Value
ASCII | SI
Hex | 0F

See Also

Set Double-Wide Print


Query Commands

Use the query commands to retrieve information about the printer or the print request. There are three steps involved in sending a query:

  1. Frame your query using the correct command format.

  2. Send the query to the printer.

  3. Use the appropriate table to interpret the printer's reply.

Query Commands General Format

Query format: | ESC{Query?}
Reply format: | {Query!Query1:Reply1;...QueryN:ReplyN}
Function: | The word "Query" in the query format above is replaced in each case by a specific command. For example, send the string {BT?}.

Interpreting the Reply to a Query

Each query reply contains several pairs of letters. The first letter or "query character" is separated from the reply character by a colon (:) and the pair is followed by a semicolon (;). Use the query reply table for each command to interpret the reply.

This table lists the Query commands available for the printer.

Command | Format | Description
Battery | ESC{BT?} | Returns current battery voltage, temperature, and conditions.
Cancel | ESC{CN!} | Cancels all demand printing.
Configuration | ESC{CF?} | Returns information about configuration options such as baud rate and default mode.
Demand Quantity | ESC{DQ?} | Returns remaining quantity of copies that have not printed yet.
Fonts | ESC{FN?} | Returns a list of available fonts.
Graphics | ESC{GR?} | Returns a list of downloaded graphics.
Hardware Revision | ESC{QST:HW} | Returns the hardware revision of the printer being queried.
Infrared | ESC{IR?} | Returns the model number of the remote printer.
Memory | ESC{MY?} | Returns the amount of all memory available. You receive information on the amount of used memory and the amount available.
Printhead | ESC{PH?} | Returns the amount of all memory available. You receive information on the amount of used memory and the amount available.
Reset | ESC{RE!} | Resets the printer.
Serial Number | ESC{QST:SN} | Returns the serial number of the printer being queried.
Status | ESC{ST?} | Returns information about the ability of the printer to print the next image and reports any errors from the last print request such as paper condition, command errors, buffer size, and battery voltage.
Version | ESC{VR?} | Returns the version number of firmware and downloaded files.


Battery

Description

Returns current battery voltage and charging status.

Query Format

ESC{BT?}

Reply Format

{BT!V1:n.n;CH1:x;V2:n.n;CH2:x}

Use this table to understand the query reply.

Query | Reply | Definition
V1, V2 | n.n | Battery voltage in DC volts. V1 represents the first battery, V2 represents the second battery.
CH1, CH2 | x | The status of the battery charge. Values for x include: C = Charging complete with external power connected. I = Charging in progress with external power connected. E = Charging error with external power connected. N = Not charging. No external power connected.

Reply Example

{BT!V1:8.4;CH1:C;V2:6.6;CH2:I}


Cancel

Description

Cancels demand printing.

Query Format

ESC{CN!}

Reply Format

ESC{CN!}


Configuration

Description

Returns information about configurable options.

Query Format

ESC{CF?}

Reply Format

{CF!L:xx;B:xxx;P:x;N:x;H:x;D:xx%;Y:x;S:x;T:nnnn}

Use this table to understand the query reply.

Query | Reply | Definition
L | xx | The current printing mode of the printer. Options are Line Printer (LP) and Easy Print (EZ).
B | xxx | The baud rate of the printer. Options are: 012 = 1200 024 = 2400 048 = 4800 096 = 9600 192 = 19200 384 = 38400 576 = 57600 115 = 115200
P | x | The parity of the printer. Parity is always a value of N (None).
N | x | Number of data bits. Data bits is always a value of 8.
H | x | Handshaking is always a value of H (Hardware).
D | xx% | Darkness adjust. Values can be -25%, -20%, -15%, -10%, -05%, +00%, +10%, +15%, +20%, +25%, +35%.
Y | x | The ply of paper is always a value of 1.
S | x | The beeper is always a value of Y (on).
T | nnnn | Timeout value in seconds. The timeout is always a value of 9999 (always on).

Reply Example

{CF!L:LP;B:115;P:N;N:8;H:H;D:+00%;Y:1;S:Y;T:0000}


Demand Quantity

Description

Returns the remaining quantity of copies left to print.

Query Format

ESC{DQ?}

Reply Format

nnn

where

nnn represents a number from 1 to the remaining number of copies to print.


Fonts

Description

Returns a list of all fonts available on the printer, including both permanent and downloaded fonts. Each query and reply in a font is separated from the next by a comma. A semicolon, a carriage return, and a line feed (;<CR><LF>) separate each font.

Query Format

ESC{FN?}

Reply Format

{FN!N5:xxxxx,N1:x(nn),L:x,UV:x,UD:xx/xx/xx,US:x...x,CPI:nn.n}

Use this table to understand the query reply.

Query | Reply | Definition
N5 | xxxxx | Five character name of the font.
N1 | x (nn) | One character name of the font. You can also use hex for the one character name.
L | x | The location of the font. Options are resident (R) or download (D).
UV | x | User version number. This is a specified number from 0 to 9.
UD | xx/xx/xx | User date that the format was created.
US | x...x | User descriptive summary of the font. This reply can be up to 20 characters.
CPI | nn.n | Characters per inch.

Reply Example

{FN!N5:PB203,N1:!(21),L:R,UV:1,UD:01/02/05,US:Monospace 821 WGL4,CPI:16.0;
N5:PB145,N1:"(22),L:R,UV:1,UD:01/02/05,US:Monospace 821 WGL4,CPI:24.4}


Graphics

Description

Returns a list of all graphics currently downloaded to the printer. Each query and reply in a font is separated from the next by a comma.

Query Format

ESC{GR?}

Reply Format

{GR!N5:xxxxx,N1:x,L:x,UV:x,UD:xx/xx/xx,US:x...x}

Use this table to understand the query reply.

Query | Reply | Definition
N5 | xxxxx | Five character name of the graphic.
N1 | x (nn) | One character name of the format. You can also use hex for the one character name.
L | x | The location of the graphic. Options are resident (R) or download (D).
UV | x | User version number. This is a specified number from 0 to 9.
UD | xx/xx/xx | User date that the format was created.
US | x...x | User descriptive summary of the graphic. This reply can be up to 20 characters.

Reply Example

{GR!N5:LOGO1,N1:z(7A),L:D,UV:1,UD:05/29/04,US:Big Logo}


Hardware Revision

Description

Returns the hardware revision of the printer being queried.

Query Format

ESC{QST:HW}

Reply Format

{QST:HW:Revx}

Use this table to understand the query reply.

Query | Reply | Definition
HW | Revx | The hardware revision of the PB42 printer.

Reply Example

{QST:HW:RevB}


Infrared

Description

Returns the model number of the remote printer.

Query Format

ESC{IR?}

Reply Format

{IR!P:x;AV:x;DV:x;IV:x;IN:x;ID:x}

Use this table to understand the query reply.

Query | Reply | Definition
P | x | Off. Protocol is not supported on the PB42.
AV | x | Not supported.
DV | x | Not supported.
IV | x | Not supported.
IN | x | PB42
ID | x | PB42

Reply Example

{IR!P:OFF;AV:Not supported;DV:Not supported;IV:Not supported;IN:PB42;ID:PB42}


Memory

Description

Returns the amount of all memory available in the printer, including the amount used and the amount remaining for an application.

Query Format

ESC{MY?}

Reply Format

{MY!FS:x;FM:x;RS:x;DT:nnnnnn;DR:nnnnnn}

Use this table to understand the query reply.

Query | Reply | Definition
FS | x | The size of the flash storage (32 Mbits) on the printer.
FM | xxxx | The flash manufacturer is ATMEL.
RS | x | The RAM size (128 Mbits) of the printer.
DT | nnnnnn | Download total area in bytes. The total flash area is 1048576 bytes.
DR | nnnnnn | Download flash memory remaining in bytes.

Reply Example

{MY!FS:32M;FM:ATMEL;RS:128M;DT:1048576;DR:1036228}


Printhead

Description

Returns the type of printhead and the number of dots across. Each query reply is separated by a semicolon.

Query Format

ESC{PH?}

Reply Format

{PH!TD:nnnn;DD:nnn;M:x...x;T:nn.nC}

Use this table to understand the query reply.

Query | Reply | Definition
TD | nnnn | Total number of dots across the printhead.
DD | nnn | The dot density of the printhead (dots per mm).
M | x...x | Model number of the printhead.
T | ±nn.nC | Current temperature of the printhead in degrees Celsius.

Reply Example

{PH!TD:0832;DD:203;M:LPT3445;T:+27.8C}


Reset

Description

Resets the printer.

Query Format

ESC{RE!}

Reply Format

ESC{RE!}


Serial Number

Description

Returns the serial number of the printer being queried.

Query Format

ESC{QST:SN}

Reply Format

{QST:SN:x...x}

Use this table to understand the query reply.

Query | Reply | Definition
SN | x...x | The serial number of the PB42 printer.

Reply Example

{QST:SN:32510514004}


Status

Description

Returns information about the ability of the printer to print the next image and reports any errors from the last print request such as paper condition, command errors, buffer size, and battery voltage.

Query Format

ESC{ST?}

Reply Format

{ST!E:x;L:x;P:x;R:nn;B:x;H:x}

Use this table to understand the query reply.

Query | Reply | Definition
E | x | Gives the error status. Options include: N = No error c = Command error (invalid command) d = Data error f = Font not available g = Global parameter error
L | x | Lid up (U) or lid down (D).
P | x | Paper present (P) or not present (N).
R | nnn | RAM buffer size remaining in kilobytes.
B | x | Condition of the battery. Options include: O = OK V = Out of voltage range
H | x | Printhead temperature. Options include OK (O) and out of range (T).

Reply Example

{ST!E:N;L:D;P:P;R:62;B:O,H:O}


Version

Description

Returns the version number of firmware and downloaded files.

Query Format

ESC{VR?}

Reply Format

{VR!F:n.nn;B:n.nn;D:n.n}

Use this table to understand the query reply.

Query | Reply | Definition
F | n.nn | Firmware version.
B | n.nn | Boot code version.
D | n.n | Download version.

Reply Example

{VR!F:1.01;B:1.0;D:1.0}


Allow Messages From Printer

Description

Turns on or off the ability to see error messages the printer generates to alert a user of an error condition. Each error is only sent once from the printer.

Command

ESC{SSC:U:x}

where:

Element | Description
x | Turns the allow messages from printer command option on (Y) or off (N). The default setting is N (off).

Example

Set command: | ESC{SSC:U:Y}
Reply: | {SSC:U:0}

This command turns the allow messages from printer option on and returns a reply saying that it has successfully set the parameter.

Here is the command and a list of the self-generated replies the system creates to alert a user of an error condition.

Command

{UST:S:error condition=X}

where:

Error Condition

Description

Lid_Open

If Lid_Open=Y, the printer has detected an error condition and cancels any pending print jobs.

Paper_Out

If Paper_Out=Y, the printer has detected an error condition and cancels any pending print jobs.

Voltage

If Voltage=H, the printer has detected a high voltage condition. No action is required, the printer is just giving status that it has reached full voltage.

If Voltage=L, the printer has detected a low voltage condition. The battery voltage is below the level set with the Set Low Battery Indicator command. You should plug the printer into external power to recharge batteries.

You can receive several error conditions in the same string. For example, the printer may send a command string that looks like this:

{UST:S:Lid_Open=Y,Paper_Out=Y,Voltage=H}


Restore Factory Defaults

Description

Resets the printer to factory default values. You must follow the Restore Factory Defaults command with the Commit command (ESC EZ{COMMIT}{LP}) for it to take effect.

Command

ESC{SDV}ESC EZ{COMMIT}{LP}

Use this table to understand the default values that are restored when you send this command.

Setting | Default
RS-232 serial port
Baud rate | 115200
Data bits | 8
Parity | None
Stop bits | 1
Flow control | Hardware
Bluetooth
Device name | PB42-xxxxxxxxxxx (where xxxxxxxxxxx is the last eleven characters of the serial number)
Service name | Wireless printer
Class of device | 00040680
Discoverable | Yes
Connectable | Yes
Authentication | Off
Encryption | Off
Printer reserve | Disabled
Battery
Low battery indicator | 7.2V
Allow messages from printer | Off
Dark adjust | 100
Media sensitivity | 2


Retrieve Firmware Version

Description

Retrieves firmware information from the printer.

Command

ESC{QST:VR}

Example

Retrieve command: | ESC{QST:VR}
Reply: | {QST:VR:PB42F3NNN_MMDDYY}

Use this table to understand the retrieve serial parameters reply.

Element | Description
NNN | The firmware release number. Options for this number can range from 000 to 999.
MMDDYY | The month, day and year of the firmware build.


Retrieve Job Status

Description

Retrieves the job status of the printer. This command is useful for marking the beginning and end of a job.

An application can send the Retrieve Job Status command before starting a report to make sure that there are no pending error conditions. It can also send the Allow Message From Printer command to turn on unsolicited messages and find out if there are any problems with the printer.

Command

ESC{QST:JB:F1, F2}

where:

F1 is a four digit job number between 0001 and 9999 (an ASCII string).

F2 turns the Allow Message From Printer on (Y) or off (N).

Example

Retrieve command: | ESC{QST:JB:F1, F2}
Reply: | {QST:JB:JN:xxxx;CJ:x;CN:xx;TC:xxxx}

Use this table to understand the retrieve job status reply.

Command | Setting | Definition
JN | xxxx | The four digit job number that corresponds to F1 in the retrieve command.
CJ | x | The current job status. Options are: 0 (zero) = Complete 1 = Still printing 2 = Timeout 3 = Cancelled 4 = Out of paper 5 = Lid open
CN | xx | The number of cancelled jobs since the last time this command was sent. Sending this command returns the number of cancelled jobs to zero.
TC | xxxx | The total number of cancelled jobs over the life of the printer.


Retrieve Printer Status

Description

Retrieves the status of the printer.

Command

ESC{QST:PR}

Example

Retrieve command: | ESC{QST:PR}
Reply: | {QST:PR:E:x;L:x;P:x;B:1x2x;H:x}

Use this table to understand the retrieve printer status reply.

Command | Setting | Definition
E | x | The error status of the printer. Options are errors exist (Y) and no errors (N).
L | x | Status of the paper release lever latch. Options are latched (Y) and unlatched (N).
P | x | Paper present status. Options are yes (Y) and no (N).
B | 1x2x | Status of the batteries. 1x represents the status of the first battery and 2x represents the status of the second battery. Options are: Y = Battery has the correct voltage H = Battery is above maximum voltage* N = Battery is below 3.5 VDC or is not installed L = Battery is below low battery indicator setting
H | x | Status of the printhead temperature. Options are acceptable (Y) and unacceptable (N).

*Maximum voltage for the printer is 8.4 VDC. The minimum voltage is 3.5 VDC.


Retrieve Serial Parameters

Description

Retrieves the serial port settings from the printer.

Command

ESC{QST:SS}

Example

Retrieve command: | ESC{QST:SS}
Reply: | {QST:SS:F1, F2, F3, F4, F5}

Use this table to understand the retrieve serial parameters reply.

Element | Description
F1 | The baud rate.
F2 | The parity of the printer.
F3 | The number of data bits.
F4 | The number of stop bits.
F5 | The flow control of the printer.


Set Dark Adjust

Description

Sets the energy level for the printhead which controls how dark the print appears on the media.

Command

ESC{SSC:E:F1, F2}

where:

Element | Description
F1 | The printhead Manufacturer ID. The printer supports only S (Seiko).
F2 | Sets the energy level for the printhead. Options are 60 (lightest), 70, 80, 90, 100 (default), 110, 120, 130 (darkest).

Example

Set command: | ESC{SSC:E:S,100}
Reply: | {SSC:E:0}

This command sets the dark adjust on the printer to 100 and returns a reply saying that it has successfully set the parameters.


Set Low Battery Indicator

Description

Sets the voltage at which the low battery indicator turns on. The default low battery indicator setting is 7.2.

Command

ESC{SSC:V:x.x}

where:

Element | Description
x.x | Sets the unit in volts at which the low battery indicator turns on. Options are 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2 (default), 7.3, 7.4, 7.5, and 7.6.

Example

Set command: | ESC{SSC:V:7.2}
Reply: | {SSC:V:0}

This command sets the low battery indicator on the printer to 6.6V and returns a reply saying that it has successfully set the parameter.


Set Media Sensitivity

Description

Sets the sensitivity for the media you are using. Intermec recommends that you use the default setting (2) for media sensitivity.

Command

ESC{SSC:M:F1, F2}

where:

Element | Description
F1 | The printhead Manufacturer ID. The printer supports only S (Seiko).
F2 | Sets the media sensitivity of the printhead. Options are: 0 = Sensitivity 1 (low heat setting) 2 = Sensitivity 2 (moderate heat setting) (default) 3 = Sensitivity 3 (high heat setting)

Example

Set command: | ESC{SSC:M:S,2}
Reply: | {SSC:M:0}

This command sets the media sensitivity to 2 (Sensitivity to use for the Seiko printhead) and returns a reply saying that it has successfully set the parameters.


Set Serial Parameters

Description

Sets the serial port parameters on the printer. You must follow the Set Serial Parameters command with the Commit command (ESC EZ{COMMIT}{LP}) for it to take effect.

Command

ESC{SSC:S:F1, F2, F3, F4, F5}ESC EZ{COMMIT}{LP}

where:

Element | Description
F1 | Sets the baud rate. Options are 2400, 4800, 9600, 19200, 38400, 57600, 115200.
F2 | The parity of the printer. The printer supports only no parity (N).
F3 | The number of data bits. The printer supports only 8 bits (8).
F4 | The number of stop bits. The printer only supports 1 stop bit (1).
F5 | The flow control of the printer. The printer only supports Hardware Flow Control (H).

Example

Set command: | ESC{SSC:S:115200, N, 8, 1, H}ESC EZ{COMMIT}{LP}
Reply: | {SSC:S:0}

This command sets the serial port parameters on the printer and returns a reply saying that it has successfully set the parameters.


Back

Description

Retracts the paper a specified number of dotlines which enables the printer to print on paper previously fed past the printing mechanism.

Command

BACKnnn

where nnn is a number from 1 to 200.

Example

{PRINT,BACK50:@10,30:PB203|Hi world|}


Demand

Description

Allows you to print a specified amount of copies with the printer stopping between each copy. Push the Feed button to print each copy. You can use this command with the QUANTITY command or alone. If you specify a quantity, you do not need to print all of the labels specified. If you do not specify a quantity, you can print one copy when you are ready. If you do not print all of the labels specified with the quantity command, the remaining demands clear when the printer falls asleep. You can also cancel the remaining demands by sending ESC{CN!}.

Command

DEMAND

Example

{PRINT,QUANTITY5, DEMAND:@10,30:PB203|Hi world|}


Qstop

Description

Stops a specified number of dotlines after sensing the "Q" mark. After the printer finds the mark, the paper advances for nnn dotlines and stops. If the printer cannot find a "Q" mark, it continues to search for one. You may need to use the STOP command as a safeguard.

Command

QSTOPnnn

where nnn is a number from 1 to 65000.

Example

{PRINT,QSTOP500:@10,30:PB203|Hi world|}


Stop

Description

Advances the media to the correct place for tearing. The command stops the media nnn dotlines after the beginning of the receipt. The data nnn sent after the STOP command specifies the total number of dot lines high for this print image.

You can use the STOP command with the QSTOP option to make sure that the printer stops advancing media.

Command

STOPnnn

where nnn is a number from 1 to 65000.

Example

{PRINT,STOP500,QSTOP125:@10,30:PB203|Hi world|}


Font Names

Description

Specifies the name of the font that you want your text to use for printing. Each font has a five-character name.

Command

Font Name | Description
PB203 | Monospace 821 WGL4 16 (default)
PB145 | Monospace 821 WGL4 124
PB338 | Monospace 821 CNDS 9
PB107 | Monospace 821 BOLD 26

Field Options

Font Field Options | Description
HMULTn | Increases the width of the font. Where n is a value from 1 to 255.
VMULTn | Increases the height of the font. Where n is a value from 1 to 255.


Graphic Names

Description

Specifies the name of the stored graphic that you want to use for printing. Each graphic has a five-character name.

Field Options

Graphic Field Options | Description
HMULTn | Multiplies the width of the graphic by n.
VMULTn | Multiplies the height of the graphic by n.

Example

{PRINT:@10,30:ALOGO,HMULT2,VMULT2|}

This example prints the graphic (ALOGO) twice its normal size.


Line Names

Description

Draws horizontal or vertical lines around text or graphics.

Field Format

HLINE, Lengthnnn, Thicknnn

VLINE, Lengthnnn, Thicknnn

Field Options

Line Field Options | Description
HLINE | Specifies a horizontal line.
VLINE | Specifies a vertical line.
Lengthnnn | Sets the line length.
Thicknnn | Multiplies the height of the graphic by n.

Example

{Print: @60,30:HLINE, Length200, Thick2|}

This example prints a horizontal line that is 200 dotlines long and 2 dotlines thick.