OS/2 and USB Printers

By Jonas Buys

OS/2 and hardware... For more than a decade, OS/2 has been misjudged to have very limited hardware support. But in fact, if you dig some further, you'll notice that OS/2 Warp and eComStation offer extreme large and powerful hardware support. Recently, a whole lot has changed ever since USB support became available for OS/2. Over the last two or three years, IBM has provided us with some great device drivers, which enable the use of several hundreds of older and modern USB devices with the OS/2 Warp family of operating systems. The upcoming series of articles will discuss all IBM USB drivers thoroughly, and list a lot more OS/2 compatible devices and chipsets than the very limited number IBM tested with the drivers.

This article was intended both for novice and advanced OS/2 users. Also, this article should be considered to be an introduction offering basic knowledge for the upcoming articles.

Introduction
Printers and OS/2. Unfortunately, only very, very few manufacturers tend to provide out-of-the-box native OS/2 device drivers for their products. Also more and more printers are shipped with only a USB interface to connect to the computer, to avoid the limitations imposed by the outdated "Parallel Port" technology.

This article will discuss the IBM OS/2 Warp USB Printer Device Driver in detail. However, though the driver name can cause confusion, this driver is not be sufficient to get USB Printer working on OS/2. The USB Printer Device Driver is in fact only a driver that allows you to "bind" a printer driver to the USB port (thus obliging OS/2 to communicate with the printer device over the USB interface instead of the classic Printer Interface (LPT, line print terminal)). This theoretical approach comes in very handy; if you have an existing OS/2 printer driver (no matter if it supports USB or not), you can use it with a printer attached to a USB port (and it doesn't matter whether you use a USB-to-LPT convertor or not). Hey, this could cause your troubles to stop, especially if you have got an LPT Iomega ZIP drive!

Advantages of USB Printing

 * 1) Less CPU It is well known that the Parallel Printer Port (more popularly known with the term LPT) swallows a huge amount of CPU time, and this during some time. Printing via the USB will demand a considerable smaller amount of CPU time, and this during a much smaller task. However, notice that UHCI controllers will rely more on the processor than OHCI PCI cards will do.
 * 2) More Efficient Bus Technology
 * 3) Higher Data Transfer Rates With average optimal rates of 11Mbps (approximately 1.5MBps) and 480Mbps (approximately 64MBps) for the respective USB 1.1 and 2.0 Hi-Speed technologies, USB beats the Parallel Port technology that only has a maximum rate of XXXXXX Kbps. A huge difference, especially with ever arising printing requirements: documents that become larger, and don't forget: Innotek Acrobat Kit* prints documents as images! This also requires more data to be sent to the printer.
 * 4) Hot Plugging You can attach and disconnect a printer to the USB ports anytime you wish, turn it on and off as you like, without having to reboot the system. The USB Auto Monitor included in the USB Printer Device Driver provides support for this, and more information is given later in this article. You can also do this with the classic parallel printer port, but the printer still needs to be attached to the same printer port. This restriction is removed with USB; you can connect the printer to ANY USB socket available on the USB chains that are present on your system.
 * 5) Support for Modern Printers The Line Print Terminal technology has reached its limits years ago, and is dying rapidly. Many manufacturers ship new printers with both USB and parallel printer interface for backwards compatibility on older systems, but a lot     even ship printers with only a USB connection.
 * 1) Support for Modern Printers The Line Print Terminal technology has reached its limits years ago, and is dying rapidly. Many manufacturers ship new printers with both USB and parallel printer interface for backwards compatibility on older systems, but a lot     even ship printers with only a USB connection.

1.2. Some common USB Terminology...
There are many reasons why USB is inferior to other technologies like e.g. SCSI, but that will not be discussed in this article. Fact remains that, despite of its limited performance (and this performance limit doesn't matter with today's modern Hi-Speed USB 2.0) USB is a great technology, since it combines ease of use, compatibility with all major operating systems, and especially mobility (USB memory keys, USB Ethernet NICs).

Unfortunately, there often seems to be some misunderstanding related to USB terminology when discussing the Universal Serial Bus technology. That's why a brief and clear overview is given here: So far for a brief overview of technologies. Now, in the "USB technology family", there are some variants, types of Host Controller Interfaces: First, for USB 1.1 (or for USB 2.0 cards that can also use USB 1.1 devices), we have UHCI and OHCI. UHCI is short for Universal Host Controller Interface. It is one particular direction in the USB controller interfaces. It is used by Intel and VIA chipsets. Other brands also can be compatible with UHCI. This is the real standard for USB 1.1. nVidia nForce is also UHCI. UHCI, Intel's proprietary interface, defines how the USB controller talks to the host computer and its operating system. UHCI is optimized to minimize host computer design complexity and uses the host CPU to control the USB bus. A kind of equivalent of UHCI is OHCI, Open Systems Host Controller Interface. It's another particular direction in USB 1.1, and is mainly used in chipsets branded by SiS, ALi, Opti and Cyrix (Gnode), Agere Systems, inSilicon Core. OHCI, jointly developed by Compaq, Microsoft, and National Semiconductor Corporation and backed by more than 25 companies, defines the register level interface that enables the USB controller to "talk" to the host computer and its operating system. OHCI defines an industry standard hardware interface for operating systems, device drivers, and the basic input output system (BIOS) to manage the USB. OHCI optimizes performance of the USB bus while minimizing central processing unit (CPU) overhead to control the USB. USB devices don't care whether you're using an OHCI or UHCI controller; you can use all devices on any kind of controller. Then, there is EHCI: Enhanced Host Controller Interface. This is a direction that enables USB 2.0, more to say USB Hi-Speed. The two-direction market as exists for USB 1.1 is not present here; all controllers use the same specific technologies. One thing you should very well be aware of is that USB is a serial technology. That means that the maximum bandwidth (12Mbps for USB 1.1, 480Mbps for USB 2.0 Hi-Speed) is divided between all USB ports. This also applies to USB Hubs, where this issue should be accounted for more seriously. This problem will be discussed thoroughly in the article about USB hubs; for regular PCI USB controllers, with only a limited number of ports, there should not be any real problems, unless you are using several fast devices, like USB 2.0 hard disks, USB 2.0 Memory Keys, USB Audio, and USB Ethernet cards simultaneously. The problem is even more present on USB 1.x controllers. But remember that if you use a lot of USB devices at the same moment, this unavoidably leads to a performance degradation.

All of these variants are supported using OS/2 Base USB Device Drivers (EHCI.EXE).

2. Enabling USB Printer Device Support
The IBM USB Printer Device Driver comes in a self-extracting file. The official driver is available via IBM SoftWare Choice or IBM PassPort Advantage subscriptions, and can be downloaded from the IBM OS/2 Device Driver Pack Online and from the eComStation.com download web site. eComStation 1.0 and 1.1 also include the driver. In order to use this driver, your computing system must meet the following requirements: The USBPRINT.EXE file, once executed, will extract ten files: an installation utility (RSPDDI.EXE), USBPRT.SYS USB and USBPRT.SYM as physical printer drivers, USBMON.EXE, the USB Auto Monitor Executable, a DDP file USBPRT.DDP USB to install the driver using ddinstal.exe, USBPRT.PDR as USB Printer Port driver, a help reference USBPRT.HLP, a CLEANUP.CMD Command file that deletes all USB print support files from installation directory to release disk space after installation, a utility to check if the base USB drivers are working correctly and USBPRINT.TXT, a limited readme. As already pointed to, if you want to use a USB printer, you need to do accomplish this task in two steps: It is very important to understand the difference between the USB Printer Device Driver, which only allows you to attach a USB printer to a USB socket, and the actual printer drivers, which include OS/2 instructions about how to control the printer. Note that even if a particular device driver says that it's for use with a printer port (LPT) only, you CAN use it using the USB Printer driver. What USBPRINT.EXE actually does, is "fool" OS/2 and the printer driver by installing some kind of printer port, which is actually being mapped on a USB Socket. This article will only deal with installing a printer in OS/2 Warp or eComStation. A knowledge of creating a printer object with the Printer template is assumed. Also note that on Convenience Pack cd-roms, you can find the driver in the options/USBprint directory.
 * OS/2 Warp 3 (FP35), OS/2 Warp 4 Merlin (FP6), OS/2 Warp Server for e-business Aurora, MCP1 or ACP1, MCP2 or MCP2, eComStation 1.0 or higher, WorkSpace On-Demand 2.0 (FP11);
 * Any PCI to USB Host Controller compatible with USB 1.1 or USB 2.0 specification and using UHCI, OHCI or EHCI interface that is supported by the Base USB Support Driver (part one of this article series).
 * 1) Check if the USB Base Device Driver(s) are working correctly with your USB     card, and if so, install the USBPRINT.EXE device driver. This will allow you     to "tell" OS/2 that your printer is attached to your USB port, and     that OS/2 should actually "talk" to the printer using the "USB language";
 * 2) And then, install a device driver for the printer while you are creating     a printer object.

2.1. Installing the USB Printer Port Driver
To install the USB Printer Device Driver manually, proceed as follows: Note: Unlike the powerful USB support in eCS 1.1, eCS 1.0 and the IBM Convenience Packages do install and configure the USB device drivers, but by default, they are REMmed out in config.sys. This means you'll have to un-REM the USB Base Device Drivers and then install the USB Printer Driver (USB stack needs to be active, thus you'll need to reboot after config.sys changes). eComStation 1.1, when you install USB support during setup, will automatically install the USB Printer Device Driver too, so you only need to do steps 2, 3 and 4 of the instructions above. You need not reboot when changing a driver's output port.
 * 1) To obtain the required USB driver files, you must expand the USBPRINT.EXE     file into its 10 component files by downloading the USBPRINT.EXE file from     the DDP OnLine web site (or elsewhere), and do one of the following possible     actions:
 * 2) Via WarpCenter or XCenter, browse to the directory where you downloaded         the driver, and right-click the directory to open it in a window.         Double-click on the USBPRINT.EXE icon. Now the files will be extracted.
 * 3) Open an OS/2 Command Prompt, change the active directory to the directory         where you stored the self-extracting file, and type usbprint.         Press ENTER.
 * 4) Open the existing (or create new) printer object properties window, by     right-clicking the appropriate printer object, and selecting Properties     from the pop-up menu. Select the Output     Port tab by clicking on the tab. As you can see in the image below,     only LPT (printer port interfaces) and COM ports (serial modem interfaces)     are listed on which you can connect a printer.  [[Image:NewPort.jpg]]
 * 5) Select the Install new port     button. When the Install New Port     dialog box window opens (see image below), select the New     port drivers</tt> </tt>radio     button and type the full path to the expanded port driver in the Directory</tt>     edit box. Select Refresh</tt>     (this will make OS/2 read the port drivers from the specified directory, and     they will then be listed on the Output     Port</tt> field), afterwards choose the USB port.  [[Image:inst1.jpg]]
 * 6) Once you selected the USB icon in the above image, click the Install</tt>     button to install the port. (NOTE: Use the DDINSTAL.exe utility     from OS/2 command line to reinstall physical drivers if notified about install     failure during automated install.) If the OS/2 USB Stack was not installed     on the system (the Basic OS/2 USB Device Driver(s)) you will see the message     The file, TSTUSBC.EXE, returned a non-zero return code. This DDP file did not run. You have to install the USB Basic Device Driver(s) before     installing USBPRINT.EXE.
 * 7) Shutdown and restart your operating system if prompted to do so from the     previous step. The prompt will be as shown in the image below:  [[Image:reboot.jpg]]
 * 1) Shutdown and restart your operating system if prompted to do so from the     previous step. The prompt will be as shown in the image below:  [[Image:reboot.jpg]]

2.2. USB Device Driver Options
There are some config.sys device driver options that come in handy. We'll briefly take a look at them, and discuss whether or not these settings are useful. The config.sys line for the USB Printer Port Device Driver is DEVICE=x:\OS2\BOOT\USBPRT.SYS</tt>, where x: is the drive letter of the OS/2 boot partition on your system.

/V: The /V verbose option forces the driver to display its initialization information. Doing so, during boot, this message will be prompted: "USBPRT.SYS: USB Printer Device Class Driver V1.1 loaded". /LPT: Sets the driver name as LPTn (by default name is $USBPRT), with n an integer value. We discommend the use of this switch!

2.3. USB Printer Port Settings
Additional settings can be specified for the USB Printer Interface, by opening the Properties</tt> dialog box of a random printer, clicking the ''Output Port</tt> tab, right-clicking the USB_PRINTER</tt> icon, and choosing Properties</tt>'' from the pop-up menu. The image below shows the dialog box window that will then appear (the one in the lower left corner):



The image above was just taken as an example of a USB printer that was not attached to the USB port. Note that the Canon BubbleJet-30 is an LPT printer, which you can only use with the USB Printer Driver using a USB-to-Centronics convertor. The Two images below have been captured with an Epson Stylus C70 USB printer attached. Let's have a look at the Properties</tt> dialog box: ''Port name</tt>'': This is the name that is being assigned to your USB printer output port. This is done automatically via the operating system, but you can, of course change the name here. Status</tt>: displays whether the USB printer is attached and found on the USB bus ("ONLINE (ATTACHED)</tt>"), or not ("OFFLINE (DETACHED)</tt>"). This is automatically detected by the usbmon.exe program. <tt>Timeouts in seconds</tt>: self-explanory, see the properties of regular Parallel Printer Interface (LPT) ports. <tt>Auto Monitor</tt><tt> </tt>checkbox: Click this checkbox to enable "hot swapping" of your USB printer. You can attach or detach you printer anytime you like, even when OS/2 is already running. When you leave this option unchecked, OS/2 will only detect the printer's status while initializing the USB Printer Device Driver, which implies it is done at boot time. When you attach your driver when OS/2 is already booted and you've checked this option, your printer's <tt>Properties</tt>dialog box will open automatically. The buttons at the bottom of the dialog box have the same meanings as in regular settings notebooks. By clicking the <tt>Advanced</tt> button in the Properties dialog box, the following dialog box will appear:



3.1. About adapters


Some manufacturers like Belkin offer special convertor cables. There are two versions available: the USB-to-Printer and Printer-to-USB cables. Mind the order of the words!

The first one, USB-to-Printer, is a cable to connect to a USB socket of the USB controller in your Personal Computer or on your USB hub, and to attach to a Printer Port Interface connection on the printer. This can be a solution if you've got an older printer that does not have a USB interface. These cables can be recognized by the two endings: one ending has a male type A USB connector, the other end has a Centronics connector.

The second one, Printer-to-USB, is used less to connect a modern printer that only offers a USB connection to a Printer Port Socket on either a Multi-Port USB Hub or, most probably, the on-board Printer Interface Socket implemented on the motherboard. This cable can be recognized by the two endings: one ending has a female Printer Port connector, the other side has a type B USB connector.

These cables are relatively cheap, and prices vary between € 20 - 50 ($25 - 55).

But are these adapters (convertors) compatible with OS/2? Normally, any USB-to-Printer cable should work with OS/2, as long as you select the output port of the printer to be the USB port.

!!!!! 2e TYPE?? OS/2 compatible??? !!!!

3.2. Win32Prn
The win32prn project is designed to use Microsoft Windows 2000 printer drivers on the IBM OS/2 platform family with the use of the ODIN emulation technology. This is the solutions for the problem we as OS/2 Community experience that manufacturers generally don't develop OS/2 device drivers for their printers anymore. Theoretically, every Windows Driver Model (WDM) 1.1 (This includes Windows2000, WindowsXP, Windows2003 and WindowME device drivers.) compliant printer driver could be used with this project to print out of OS/2 Warp. The Win32Prn was originally based on printers to be attached via a Printer Port Interface (LPT) and unfortunately, as of writing, ODIN has no subsystems yet to support USB. However, this does not mean that printer for which you are using Windows drivers via Win32Prn can't work via a USB connection. The well-though theoretical implementation of the USB Printer Device Driver allows the use of USB Printers even with Win32Prn, since the USB_PRINTER port is just being seen (internally) as an LPT port. The USB Printer Driver device driver will then "translate" the calls made by OS/2 to the correct USB signals. VOORBEELD ++++++++ HOE op w2k configgen? LPT of USB??

For more information about the Win32Prn project, please visit, where you can find a list of tested and approved devices for use with the OS/2 Warp platform.

4. OS/2 CHL Tested USB Printers
os2warp.be has tested some selected USB Printers on the OS/2 Warp platform. Some of them are listed in the table below. For additional tested and/or reported devices, please consult our online hardware list or the USB Printers section. os2warp.be has also made a commitment to the Win32Prn Project, and USB testing results will be posted at.

5. And what about Linux?


You can find a list of tested devices at. For more information about Linux and USB, visit[.

6. Conclusion
USB Printers are really no problem to use on the OS/2 Warp platform, as long as you have got a specific OS/2 device driver (or Windows Driver Model 1.1x device driver compatible with Win32Prn) for your printer. The theoretical concept of a "special USB printer port" is a great advantage, since even older drivers can be used with the help of USB-to-LPT convertor cables.

7. References

 * [IBM Device Driver Pack Online];
 * [IBM SoftWare Choice web site];
 * [eComStation Home Page];
 * [OS/2 Compatible Hardware List (OS/2 CHL) web site]
 * [OS/2 and USB Web Site]