The document discusses the interfaces, status reporting, requests, and descriptors for USB printer class devices. It describes unidirectional and bidirectional interfaces that support sending data to the printer and receiving status information. It also covers IEEE 1284 compatible interfaces, status compatibility with parallel ports, class-specific requests like GET_DEVICE_ID and GET_PORT_STATUS, and standard descriptors including device, configuration, interface, and endpoint descriptors.
3. Interfaces Unidirectional Interface. The unidirectional interface supports only the sending of data to the printer via a Bulk OUT endpoint. Status data that is compatible with a standard PC parallel port is retrieved via the class-specific command GET_PORT_STATUS over the default pipe. Bi-directional Interface. The bi-directional interface supports sending data to the printer via a Bulk OUT endpoint, and receiving status and other information from the printer via a Bulk IN endpoint. Status data that is compatible with a standard PC parallel port is also available when this interface is in use via the GET_PORT_STATUS class-specific command over the default pipe.
4. Interfaces IEEE 1284.4 compatible Bi-directional Interface. The 1284.4 interface supports sending data to the printer via a Bulk OUT endpoint, and receiving status and other information from the printer via a Bulk IN endpoint, just as the bi-directional interface does. The 1284.4 interface additionally specifies that data will be transmitted to and from the device using the 1284.4 protocol. The 1284.4 protocol is defined by the IEEE P1284.4 Standard for Data delivery and logical channels for IEEE std. 1284 interfaces, version 1.0. This specification is pending final approval.
5. Status Reporting Compatibility with a Parallel Port The GET_PORT_STATUS class-specific command returns 1 byte of information that is compatible with the standard PC parallel port Printer Capabilities The GET_DEVICE_ID command returns a variable-length string that describes the printer. The capabilities include PDLs, such as PostScript or HPGL , and manufacturer ID strings. Host software reads this string to determine the supported PCPs. Protocol-Specific Status PCPs support extensive methods of status reporting. Status information for PCPs is returned on the Bulk IN endpoint. Note This specification does not define Page Description Languages (PDL) or Printer Control Protocols (PCP). This specification defines interfaces that are intended to support existing PDLs and PCPs.
6. Requests Standard USB Requests- Perform general functions for supporting the USB bus and bus-related functions. Class Specific Requests- which cause the device to transfer command data to or from the host.
7. Standard Requests A printer device supports all of the standard device requests described in Chapter 9, USB Device Framework, of the Universal Serial Bus Specification : Clear Feature Get Configuration Get Descriptor Get Interface Get Status Set Address Set Configuration Set Descriptor (optional) Set Interface Set Feature
9. GET_DEVICE_ID (bRequest = 0) This class-specific request returns a device ID string that is compatible with IEEE 1284. A printer with multiple configurations, interfaces, or alternate settings may contain multiple IEEE 1284 device ID strings. The wValue field is used to specify a zero-based configuration index. The high-byte of the wIndex field is used to specify the zero-based interface index. The low-byte of the wIndex field is used to specify the zero-based alternate setting. The device ID string is returned in the following format : IEEE 1284 device ID string (including length in the first two bytes in big endian format). Data 0...n-1 Description Type Offset
10. This class-specific request returns the printers current status, in a format which is compatible with the status register of a standard PC parallel port. The following table defines the data returned. 1 = Paper Empty, 0 = Paper Not Empty 1 = Selected, 0 = Not Selected 1 = No Error, 0 = Error Reserved for future use; device shall return these bits reset to zero. Note Some USB printers may not always be able to determine this information. In this case, they should return benign status of Paper Not Empty, Selected, and No Error. GET_PORT_STATUS (bRequest = 1) Reserved Not Error Select Paper Empty Reserved 0 1 2 3 4 5 6 7
11. SOFT_RESET (bRequest = 2) This class-specific request flushes all buffers and resets the Bulk OUT and Bulk IN pipes to their default states. This request clears all stall conditions. This reset does NOT change the USB addressing or USB configuration. Note: Version 1.0 of the specification incorrectly stated that the bmReqestType for SOFT_RESET was 00100011B. Version 1.1 Host software implementers should be prepared for USB printers that expect this request code, and version 1.1 device implementers should be prepared for host software that issues this request code.
12. Standard Descriptors Printer Class devices support the following standard USB descriptors: Device . Each printer has one device descriptor. Configuration . Each device has one default configuration descriptor which supports at least one interface. Interface . A printer device has a single data interface with possible alternates. Endpoint . A printer device supports the following endpoints: Bulk OUT endpoint. Used for transfer of PDL/PCP data. Optional Bulk IN endpoint. Provides status and other return information. Printers have no class-specific descriptors.
14. Configuration Descriptors A printer has one default configuration descriptor. This descriptor has one interface, called the Data interface, which has one or two endpoints: Bulk OUT, and the optional Bulk IN.
15. Interface Descriptors All printers support a Data interface for transferring data to and/or from the device:
16. Endpoint Descriptors Printers support one or two endpoints. In addition to the Default endpoint, printers are required to support the Bulk OUT endpoint, or both the Bulk OUT and the Bulk IN endpoints.