I want 开发者_高级运维to develop a USB host on an embedded device that will talk to printers from various vendors. Drivers for the vendor specific printers would be available on PC which is ultimately communicating with printer but my device is facilitating this communication and needs to perform the basic handshaking/setup of the printer (i.e, it needs to know when the printer is connected, what are the socket IDs that needs to be opened for CTRL and DATA transmissions etc). All of these printers are supposed to comply with IEEE 1284.4 standards but I see that many of them vary quiet a bit.
One approach I have is to take the USB traces of handshaking from each of these printers and write various sections of code respectively (I know, that sounds ridiculous!). Is there a generic way to do this? Is there any available forum where these standard informations are mentioned? For eg: EPSON uses 'EPSON-CTRL' and 'EPSON-DATA' for its control and data services which needs to be provided to get the socket ID for these services. I am pretty sure HPs, Canon's etc would have their own service names as well. As per the standards, this was supposed to be captured in IANA but I dont see anything there. Any help on this would be greatly appreciated.
Thanks and regards, Ullas
No, you can't do this because EPSON and HP will implement their printers differently even if they do the exact same thing. Your "generic" driver will have to explicitly account for each type of printer.
That being said, you could theoretically implement each driver type in your generic driver suite and have it determine which driver to use when the printer becomes available. But, this seems like a bit of overkill since you can just get the drivers free online at the manufacturer's website.
精彩评论