From: PASCHAL,DAVID (HP-Roseville,ex1) <dav...@hp...> - 2001-04-12 02:50:47
|
Hi, I just checked in some more code changes, mostly regarding adding PML support to libptal. It works pretty well over parallel and USB, but there's still some more development and cleaning up to do, including adding JetDirect support. Do a "cvs update" to pick up the new changes, then re-run the configure script, make, and make install. Of particular interest is the new "ptal-hp" command-line application, which has various options for device status/control, including setting the device clock, reading the LCD contents (like xojpanel), and PML scanning. At the moment, scanning only works on the LaserJet 1100A/1220/3200, and I'm still trying to get it working on the OfficeJets, but I figured I might as well check in what I have right now and keep working on it. One intention behind ptal-hp is to serve as a prototype and testbed for future development on xojpanel, xhpcontrol (a replacement for xojpanel), and a unified SANE backend for the supportable OfficeJets and LaserJets. I added to the INSTALL file a little bit of getting-started information about ptal-hp, but later I need to go back and overhaul the documentation, since it's gotten rather disorganized during my recent coding frenzies. :-) Joe, thanks for your xojpanel patch. Shall I check it into CVS to serve as a baseline for further development? I haven't yet gotten around to documenting the new PTAL API, but if you'd like to go ahead and take a stab at switching xojpanel over to PTAL, you can use apps/cmdline/ptal-hp.c as an example. Here's a quick outline of what you'll need to do: #include "ptal.h" ... main() or constructor { // startup code: ptalInit(); char *deviceName=device name (i.e. mlc:usb:0) from command line; ptalDevice_t dev=ptalDeviceOpen(deviceName); ptalPmlOpen(dev); ... // shutdown code, which ptal-hp currently lacks: ptalPmlClose(dev); ptalDeviceClose(dev); } Also look at handleDisplay() and printOneLine. Note that I added a second pair of OIDs which works for the LaserJet 1220 and 3200, which would also be nice to add to xojpanel. Currently I hard-coded the object IDs (OIDs) and structures and constants, such as "\x1\x2\x2\x1\x....". Eventually I'll move this to a common header file(s), but for now you can just hard-code the OIDs the way I did in handleDisplay(). David |