Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: USB Printing Architecture for vendor specific usb parallel printer device




On Oct 18, 2005, at 10:52 PM, Vamsi Krishna wrote:

Hi,
 
Earlier we developed USB- Serial driver for Mac 10.3, Mac10.4 and it  works fine.   Now we are going to develop USB-Parallel Printer driver for
Mac10.3. Our device is vendor specific device i.e we need to send vendor commands to configure the usb parallel printer port and also for
sending/receivng data.  And our device doesnot comes in to USB-Printing class devices.
 
Our deivce is a USB Parallel printer adapter, one end of the adapter connects to USB port and other end provides the DB25 connector, so
that you can connect printers to it. 
 

When we experimented with the USB printing class devices ( Prolific USB Printer adapter, Its a USB Printing class device ) it uses a backend
(usb, which is in /usr/libexec/cups/backend/) and the class driver ( USBGenericPrintingClass.plugin, USBGenericTOPrintingClass.plugin, which
are in /system/Library/Printers/Libraries)
 
 
Can you please give some help on developing printing support for our vendor specific parallel printer device.
 
1) Can you please tell me what is the apple recommonded usb parallel printer architecture for usb vendor specific devices.

We support native USB printers. Parallel ports are an anachronism that we support by querying for printer information through the USB printing class "GetDeviceID" request (and falling back to the USB device configuration information if that information isn't present).

If you're looking at doing a vendor specific USB device you'll need to do a lot more work to shim it into the printing system. That's one reason there's a USB spec for printing: to divide the work between the vendor and the operating system. If you choose to go it alone, you're going to need to the work.

 
2) Is it do we need to develop a "backend" and "plugins" for our vendor specific device or can we use the usb backend which is provided by Apple.

If your device doesn't appear as a USB printing class device, you need to write a CUPS backend. There's no need to support the plugin architecture for class drivers, since you're not complying with any class. You can get more information about CUPS from Michael Sweet's site: www.cups.org 

The USB printing class is rather widely formed. Other than providing a pipe to the printer, which one assumes you have to have to get data to the parallel port, it only requires a configuration descriptor that specifies a couple of constants differently than you'll need to provide for a vendor specific device. The requirements are hardly onerous. And by complying with the printing class spec you'll save yourself untold work now, and in future support.

 
3) How to add our Vedor Specific Printer device in Printer Setup Utility ( Like USB, Bluetooth, AppleTalk etc ) if we we need to develop our own
custom backend and plugins.

If you're unable to convince the chip vendor to make changes, you can use Apple's open sourced usb-darwin.c as a model backend using IOKit to query for devices on the USB bus.


-olav
Olav Andrade
Apple Printing Engineering
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/printing/email@hidden

This email sent to email@hidden

References: 
 >USB Printing Architecture for vendor specific usb parallel printer device (From: "Vamsi Krishna" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.