[open-beos-printing] Re: PnP Printers
- From: philippe.houdoin@xxxxxxx
- To: open-beos-printing@xxxxxxxxxxxxx
- Date: Fri, 07 Dec 2001 12:03:31 +0100 (MET)
> >Printers auto-detection could be done only on busses which
> > include a device description / inquiry protocol.
> >AFAIK, USB printers only today.
>
> Yep, USB should be able to do it. However, I think we need
> to determine how USB works on BeOS, and how it will work on
> OpenBeOS :)
Under BeOS, there is a kernel driver call usb_printer (IIRC) which
handle the I/O for the "USB" print_server transport addon.
I think this driver publish (dynamicly) under /dev/printer/usb/*,
but I'm not sure of path (maybe it's just /dev/bus/usb/*/*...).
Anyway...
This driver also offer a opcode ioctl called
USB_PRINTER_GET_DEVICE_ID.
Look at /boot/develop/headers/be/drivers/USB_printer.h
USB print devices class specification is simple
(http://www.usb.org/developers/data/devclass/usbprint11.pdf),
it shouldn't be too difficult to rewrite this driver for BeOS.
But I'm not sure it's our highest priority!
> I think, looking at the current driver architecture, it would be pretty
> difficult, as rescanning busses works by looking at the kernel drivers,
> and for printers, there is no kernel driver :( However, when USB gets
> done for OpenBeOS, we can take this up again and see how it works.
> Maybe I could simply write a kernel driver which will try to find any
> devices that there are printer addons for.....
For OpenBeOS we need to wait for working/stable USB drivers API...
Maybe the new NewOS' BeOS modules wrapper could help here, by loading
current USBD & UHCI modules, maybe not.
The rescanning process, however, could perfectly be done from user-land,
if a generic "usb_printer"-like offer some ioctl opcodes to get
detected USB printers IDs. In fact BeSANE scanners USB generic driver
do exactly this!
This auto-detection could be done, at Printers
preference launch time, as some kind of "oh, I've detected a
new printer on USB bus, and this print_server driver addon
state that he knows about it, which is great,
so I've created automagicly a new spooler for...".
;-)
Philippe.
Other related posts: