Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Errors Communicating with USB Printers due to USB Selective Suspend


View products that this article applies to.

Source: Microsoft Support

↑ Back to the top


Rapid publishing

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

↑ Back to the top


Symptom

If you have a printer connected to your computer through a Universal Serial Bus (USB) connection, communication with the printer may fail intermittently with a variety of possible error messages.

↑ Back to the top


Cause

This problem may occur due to the�action of�USB Selective Suspend.� When the USB Printer is placed in a USB Suspended state due to inactivity, some delay may occur in processing new requests while the USB Printer resumes from the USB Suspended state.� This delay may cause communication requests to the printer to time out and fail with an error status such as error 21 (ERROR_NOT_READY).

↑ Back to the top


Resolution



If a request to a USB Printer fails after the printer has been idle for some time, retrying the request quickly may succeed.

Developers of drivers for USB-connected printers may be able to work around this problem by using one or a combination of the following actions:

1. If a call to the USB port monitor (for example, pfnWritePort())�returns Error 21 (ERROR_NOT_READY), retry the call after a short delay (to allow time for the USB device�and hubs to fully resume).

2. In your language monitor (or other module) open a handle to the USB printer port and keep it open to prevent the USB printer from entering Selective Suspend.

You may also be able to work around this problem by disabling USB Selective Suspend for the Windows installation where you are experiencing this problem.

↑ Back to the top


More information



For detailed information on how to disable USB Selective Suspend functionality, please see the following article in the�Microsoft Knowledge Base:

902274�A device may not establish a connection with a desktop computer when you try to connect the device to the desktop computer through an external USB port hub in Windows XP or in Windows Server 2003

On Windows XP and Windows Server 2003, the Microsoft USB Printer class driver (Usbprint.sys) implements USB Selective Suspend functionality.� Usbprint sets the printer to Idle status if there are no handles open to the USB printer port, which may cause the USB printer to enter the USB Suspended state.� When port-monitor calls are made while the printer is suspended, the port monitor times out the request sooner than the printer and intervening hubs can resume from USB Suspended state, and returns Error 21 (ERROR_NOT_READY).

This problem does not occur on Windows Vista, Windows Server 2008, and later versions of Windows, because the version of Usbprint.sys included with these Windows versions does not implement USB Selective Suspend functionality.

↑ Back to the top


Disclaimer

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE �MATERIALS�) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

↑ Back to the top


Keywords: kbrapidpub, kbnomt, KB974330

↑ Back to the top

Article Info
Article ID : 974330
Revision : 1
Created on : 8/5/2009
Published on : 8/5/2009
Exists online : False
Views : 610