About Zebra | Investors | Partner Site | Contact Us | How To Buy | Home
Because of the many different flavors of Unix, it is impossible to write one document to cover all of the different platforms, and impractical to write a document for each specific platform. In development of this Document, Linux was used as the testing platform. Due to this fact all of the information here only refers to Linux systems using LPR printing, although the instructions should be similar for other platforms.
Throughout this document, you will be able to use Linux and Unix interchangeably.
Printing Parallel via Unix
The Unix device names for the parallel ports are /dev/lp0, /dev/lp1, and /dev/lp2. The following chart will show you which device names in Unix match up to which IO addresses for your various parallel ports.
Possible LPT Assignments
LPT1 or LPT2
LPT1, LPT2, or LPT3
There is not a consistent match of DOS based LPT ports to /dev/lp? devices. This is because of the way the BIOS assigns the LPT entries for the parallel ports. It will scan all of the above base addresses in order, the first port it finds, becomes LPT1. So, depending upon your configuration, any of the above port addresses could map to LPT1, but the port at address 0x3bc could never be LPT3, since it is scanned first, and if it is determined to be a valid parallel port, would be assigned to LPT1.
Unix does not accept the BIOSs representation of the parallel ports. The mapping for the /dev/lp? devices is constant. Before knowing which device file to use for printing, youll need to find out the base addresses of all your parallel ports. For the rest of this document Ill assume your parallel port is /dev/lp1, which is how most computers configured with a single parallel port are setup.
At bootup time the Linux kernel will tell you what /dev/lp devices it finds. After the machines you can run "dmesg | less" to view the bootup messages. Look for a line similar to this:
lp1 at 0x0378, (polling)
For additional information on configuring Linux for printing (non-zebra specific) see the Printing-HOWTO at http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Printing-HOWTO.
The simplest way to setup your printer is to enable passthrough printing for zpl/epl/CPCL text files. This configuration will require that the data that you are sending to your printer is already formatted in the appropriate language for the printer to print. To enable pass through printing, add the following entry to your /etc/printcap file:
### Zebra Passthrough printer entry for the parallel port
Printing Remotely with Unix via LPR
Zebra has a TCP/IP micro print server called ZebraNet which allows you to attach your Zebra printer directly to an Ethernet segment. The ZebraNet device then acts as a print server for LPR printing. What follows is a sample /etc/printcap entry for printing to a ZebraNet device:
### Remote ZebraNet Printer
This will setup a print queue called znet" that will print via the microprint server at IP address 10.27.70.10, using the service name ZNET_PCL. To print you would then execute the command "lpr Pznet <FILENAME>" at the command prompt. Here is a brief description of what each line means in the printcap entry:
znet = print queue name
lp = Having the entry blank specifies that the printer is NOT a local printer.
rm = Used to specify the IP address or host name for the remote print server
rp = specifies the remote printer to print to on the remote machine. If you were printing to another Unix machine, you would be able to specify any of the print queues which they have setup in their /etc/printcap file.
On the ZebraNet device, you can do a "show services" to list the printer service names that are valid for this entry.
Serial Printing via Unix
In order to print to your Zebra Printer via the serial port of your Unix box you will need to make sure you are using a Null Modem cable. A standard RS232 serial cable will not work. You will also need to print out a printer configuration label from your printer to get the printers serial port configuration settings.
The default port setting for Linux is 9600, No parity, 8 data bits, 1 stop bit, XON-XOFF flow control. Following is a mapping of COM ports to Linux device file names. Your particular platform may differ.
At bootup time the Linux kernel will tell you what /dev/tty devices it finds. After the machines you can run "dmesg | less" to view the bootup messages. Look for a line similar to this:
tty00 at 0x03f8 (irq = 4) is a 16550A
Although the bootup screens will tell you the port is /dev/tty00, it will actually be mapped to /dev/ttyS0. The device file /dev/tty01 will be mapped to /dev/ttyS1, and so on.
The configuration for LPR to support serial printing is almost identical to the configuration for supporting Parallel printers. To enable printing through the serial port you would add the following entry to your /etc/printcap file:
### Zebra Passthrough printer entry for the serial port
The only added entry that is added from the parallel port configuration is the "br#" line, which specifies the baud rate which the printer is operating at. It has to match what is on the printer configuration label for Baud . All of the other settings for the printer should be Parity=None, Data bits= 1, Stopbits=1, flow control = XON. See your printer manual for information on how to configure your printers serial port properly.
Parallel Port FAQ:
Linux Serial HOWTO
Linux Printing Usage HOWTO
Linux Printing HOWTO
Copyright | Privacy Statement | Site Map