diff -r -C 4 -P --exclude=configure --exclude=aclocal.m4 sane-1.0.3-with-hptools/acinclude.m4 sanehack/acinclude.m4 *** sane-1.0.3-with-hptools/acinclude.m4 Sat Aug 12 07:47:16 2000 --- sanehack/acinclude.m4 Thu Nov 23 02:16:54 2000 *************** *** 43,46 **** --- 43,82 ---- [sane_v4l_version=v4l] )]) fi ]) + + # + # Checks for PTAL, needed for MFP support in HP backend. + AC_DEFUN(SANE_CHECK_PTAL, + [ + PTAL_TMP_HAVE_PTAL=no + AC_ARG_WITH(ptal, + [ --with-ptal=DIR specify the top-level PTAL directory]) + if test "$with_ptal" = "no" ; then + echo disabling PTAL + else + PTAL_OLD_CPPFLAGS=${CPPFLAGS} + PTAL_OLD_LDFLAGS=${LDFLAGS} + + if test "$with_ptal" = "yes" ; then + with_ptal=/usr/local + fi + CPPFLAGS="${CPPFLAGS} -I$with_ptal/include" + LDFLAGS="${LDFLAGS} -L$with_ptal/lib" + + AC_CHECK_HEADERS(ptal.h, + AC_CHECK_LIB(ptal,ptalInit, + AC_DEFINE(HAVE_PTAL) + LDFLAGS="${LDFLAGS} -lptal" + PTAL_TMP_HAVE_PTAL=yes)) + + if test "${PTAL_TMP_HAVE_PTAL}" != "yes" ; then + CPPFLAGS=${PTAL_OLD_CPPFLAGS} + LDFLAGS=${PTAL_OLD_LDFLAGS} + fi + fi + + unset PTAL_TMP_HAVE_PTAL + unset PTAL_OLD_CPPFLAGS + unset PTAL_OLD_LDFLAGS + ]) diff -r -C 4 -P --exclude=configure --exclude=aclocal.m4 sane-1.0.3-with-hptools/backend/hp.desc sanehack/backend/hp.desc *** sane-1.0.3-with-hptools/backend/hp.desc Mon Sep 4 05:47:24 2000 --- sanehack/backend/hp.desc Sun Sep 10 17:07:19 2000 *************** *** 9,18 **** ; All other information is optional (but what good is the file without it?). ; :backend "hp" ; name of backend ! :version "0.90" ; version of backend ! :status :beta ; :alpha, :beta, :stable, :new :manpage "sane-hp" ; name of manpage (if it exists) :url "http://www.kirchgessner.net/" ; backend's web page :devicetype :scanner ; start of a list of devices.... --- 9,18 ---- ; All other information is optional (but what good is the file without it?). ; :backend "hp" ; name of backend ! :version "0.91" ; version of backend ! :status :beta ; :alpha, :beta, :stable, :new :manpage "sane-hp" ; name of manpage (if it exists) :url "http://www.kirchgessner.net/" ; backend's web page :devicetype :scanner ; start of a list of devices.... *************** *** 59,65 **** --- 59,78 ---- :model "HP ScanJet 6350C" :interface "SCSI USB" :model "HP PhotoSmart PhotoScanner" :interface "SCSI" + + :model "HP OfficeJet Pro 1150C" + :interface "PTAL" + :comment "See http://hpoj.sourceforge.net for PTAL interface support" + :model "HP OfficeJet Pro 1170C/1175C" + :interface "PTAL" + :model "HP OfficeJet R series/PSC500" + :interface "PTAL" + :model "HP OfficeJet G series" + :interface "PTAL" + :model "HP OfficeJet K series (partial support)" + :interface "PTAL" + ; :comment and :url specifiers are optional after :mfg, :model, :desc, ; and at the top-level. diff -r -C 4 -P --exclude=configure --exclude=aclocal.m4 sane-1.0.3-with-hptools/configure.in sanehack/configure.in *** sane-1.0.3-with-hptools/configure.in Sat Aug 12 07:47:33 2000 --- sanehack/configure.in Thu Nov 23 02:25:20 2000 *************** *** 105,112 **** --- 105,114 ---- SANE_V4L_VERSION dnl Checks for libraries. + SANE_CHECK_PTAL + AC_CHECK_LIB(scsi, scsireq_enter) # FreeBSD needs this AC_CHECK_LIB(cam, cam_open_device) # FreeBSD 3+ needs this AC_CHECK_LIB(m,sqrt) AC_CHECK_LIB(intl,gettext) diff -r -C 4 -P --exclude=configure --exclude=aclocal.m4 sane-1.0.3-with-hptools/doc/sane-hp.man sanehack/doc/sane-hp.man *** sane-1.0.3-with-hptools/doc/sane-hp.man Sat Aug 12 07:53:13 2000 --- sanehack/doc/sane-hp.man Mon Sep 11 02:53:50 2000 *************** *** 5,13 **** .SH DESCRIPTION The .B sane-hp library implements a SANE (Scanner Access Now Easy) backend that ! provides access to HP ScanJet scanners. At present, the following scanners are known positively to work with this backend: .PP .RS Model: Product id: Interface: --- 5,14 ---- .SH DESCRIPTION The .B sane-hp library implements a SANE (Scanner Access Now Easy) backend that ! provides access to HP ScanJet scanners and OfficeJet multi-function ! peripherals (MFPs). At present, the following scanners are known positively to work with this backend: .PP .RS Model: Product id: Interface: *************** *** 48,55 **** --- 49,66 ---- .br ScanJet 6350C C7670A SCSI/USB .br PhotoSmart C5100A R029,R030,R032 SCSI + .br + OfficeJet Pro 1150C PTAL + .br + OfficeJet Pro 1170C/1175C PTAL + .br + OfficeJet R series/PSC500 PTAL + .br + OfficeJet G series PTAL + .br + OfficeJet K series PTAL .RE .PP Support for models 5100C/5200C connected to the parallel port requires the ppSCSI driver available at http://www.torque.net/parport/ppscsi.html *************** *** 58,65 **** --- 69,84 ---- Support for models 5200C/6200C/6250C/6300C/6350C connected to the USB requires an USB driver available at http://www.jump.net/~dnelson/linux/usb (under development) .PP + Support for OfficeJet MFPs requires the "HP OfficeJet driver for Linux", + available at "http://hpoj.sourceforge.net". The "PTAL" (peripheral + transport abstraction library) interface supports peripherals + connected to a parallel port (using special Linux kernel drivers) + or to a LAN with an HP JetDirect 70X/170X/300X/500X external print + server (firmware x.07.xx or later; x.08.xx or later required for + the G and K series). + .PP If you own a ScanJet scanner other than the ones listed above, please let us know if your model works with this backend. To do this, send a mail with the relevant information for your scanner to .IR sane\-devel@mostang.com . *************** *** 77,91 **** device or a symlink to such a device. Under Linux, such a device name could be .I /dev/sga or .IR /dev/sge , ! for example. For the Hp ScanJet Plus the special device name must be the device that corresponds to the parallel interface card that was shipped with the scanner. That is .I /dev/hpscan A special driver is required for this card. See ftp://rvs.ctrl-c.liu.se/pub/wingel/hpscan for details. If the link does not work, try ftp://sunsite.unc.edu/pub/Linux/kernel/patches/scanners. .SH CONFIGURATION The contents of the .I hp.conf file is a list of options and device names that correspond to HP ScanJet --- 96,138 ---- device or a symlink to such a device. Under Linux, such a device name could be .I /dev/sga or .IR /dev/sge , ! for example. For the HP ScanJet Plus the special device name must be the device that corresponds to the parallel interface card that was shipped with the scanner. That is .I /dev/hpscan A special driver is required for this card. See ftp://rvs.ctrl-c.liu.se/pub/wingel/hpscan for details. If the link does not work, try ftp://sunsite.unc.edu/pub/Linux/kernel/patches/scanners. + .PP + For OfficeJets connected to the parallel port, the format of + .I special + is one of + .RS + .I mlc:mlcpp0 + .RE + .RS + .I mlc:mlcpp1 + .RE + depending on whether the device is serviced by parport0 or parport1. + .PP + For OfficeJets connected to an HP JetDirect print server, the format of + .I special + is + .RS + .I hpjd:HOSTNAME_OR_IP_ADDRESS[:PORT_NUMBER] + .RE + where + .RS + .I HOSTNAME_OR_IP_ADDRESS + .RE + is the hostname or dotted-decimal IP address of the JetDirect, and + .RS + .I PORT_NUMBER + .RE + is either 1, 2, or 3 to select the port number on a three-port + JetDirect 500X. The default is port 1. .SH CONFIGURATION The contents of the .I hp.conf file is a list of options and device names that correspond to HP ScanJet *************** *** 98,106 **** keeps a device name apply just to the most recently mentioned device. .PP Supported options are .BR connect-scsi , ! .BR connect-device and .BR enable-image-buffering . Option --- 145,154 ---- keeps a device name apply just to the most recently mentioned device. .PP Supported options are .BR connect-scsi , ! .BR connect-device , ! .BR connect-ptal and .BR enable-image-buffering . Option *************** *** 115,122 **** --- 163,175 ---- device. Input/output is performed by read()/write()-operations on the device. This option must be used for HP ScanJet Plus. Option + .B connect-ptal + specifies that the scanner uses the PTAL interface via the libptal + shared library. This option must be used for the OfficeJet MFPs. + + Option .B enable-image-buffering stores the scanned image in memory before passing it to the frontend. Could be used in case of forward/backward moving scanner. .PP *************** *** 130,137 **** --- 183,220 ---- /dev/hpscan .br option connect-device .RE + .PP + /dev/scanner is typically a symlink to the actual scanner device. + .PP + A sample configuration file for OfficeJets is shown below: + .PP + .RS + # SCSI scanner: + .br + /dev/scanner + .PP + # Parallel port connected MFP: + .br + mlc:mlcpp0 + .br + option connect-ptal + .PP + # JetDirect-connected MFPs: + .br + hpjd:my-jdex.my-domain.com + .br + option connect-ptal + .br + hpjd:my-500x.my-domain.com:3 + .br + option connect-ptal + .br + hpjd:10.10.10.35:2 + .br + option connect-ptal + .RE .SH FILES .TP .I @CONFIGDIR@/hp.conf The backend configuration file (see also description of *************** *** 188,201 **** to load a sheet. Then press 'scan' to start a scan. Maybe it is sufficient to press 'scan' without 'change document' for repeated scans. The use of the preview window is not recommended when working with the ADF. - .TP .B Immediate actions Some actions in xscanimage(1) (i.e. unload, select media, calibrate) have an immediate effect on the scanner without starting a scan. These options can not be used with scanimage. .SH TODO .TP .B HP PhotoSmart PhotoScanner --- 271,329 ---- to load a sheet. Then press 'scan' to start a scan. Maybe it is sufficient to press 'scan' without 'change document' for repeated scans. The use of the preview window is not recommended when working with the ADF. .TP .B Immediate actions Some actions in xscanimage(1) (i.e. unload, select media, calibrate) have an immediate effect on the scanner without starting a scan. These options can not be used with scanimage. + .TP + .B Advertised but unsupported commands + Some actions, such as mirror, are advertised by the OfficeJets but actually + have no effect. Contrast and brightness are simulated by the backend + for these devices. >8-bit scans, which require xsane(1) anyway, may + not work. + .TP + .B OfficeJet ADF issues + The OfficeJet R and G series are capable of scanning 8.5"x14" documents + in the ADF using a two-pass scanning method, but this is not currently + supported in the backend. The OfficeJet 1175 and R series refuse to + unload an ADF-loaded document after scanning, and instead display a + message on the front panel prompting the user to remove the document + from the glass and press a button to continue; the OfficeJet G series + doesn't have this problem, however. The OfficeJet G and K series automatically + unload an ADF-loaded document when the scan channel is closed, particularly + after an idle timeout when connected to an HP JetDirect. + .TP + .B OfficeJet K series + The K series features a "scrollfed" scanner, where the paper is fed + across a stationary scanhead, as opposed to flatbed, where the scanhead + moves across the page. A consequence of this difference is that the + document length is not known in advance; the scan stops when the end + of the document is reached. To perform a scan, you must first click + on "Change document", and then start your preview or regular scan. + If necessary, click on "Cancel" when the scan stops. If there are more + documents to scan, click on "Change document" again to advance to the + next page and repeat the procedure; otherwise, click on "Unload" to + completely unload the page. An alternative for non-preview scans is + to set the page length (option "br-y") to slightly less than the known + page length, for example, 10.5 inches for an 8.5"x11" page. This will + eliminate the need to cancel the scan, but you still need to click on + "Change document" before each scan and "Unload" after the last page. + Note that due to the use of the "Change document" and "Unload" options, + you will probably not be able to use the command-line "scanimage" program + with the K series, not even the "-T" or "--test" parameters. + .TP + .B PTAL parallel port + The parallel port drivers used by the PTAL interface do not take + advantage of the most advanced communication modes (bidirectional ECP + with DMA harware assistance), so scans are noticeably slower than + with a SCSI scanner, or even an MFP connected to an HP JetDirect. + Also, there are some unresolved robustness issues with these drivers. + Avoid power cycling or disconnecting the peripheral while a session + (scan or otherwise) is active. Even so, after heavy and/or prolonged + use the driver may stop functioning, requiring a reboot. .SH TODO .TP .B HP PhotoSmart PhotoScanner *************** *** 208,217 **** --- 336,355 ---- Beside the ScanJet Plus which came with its own parallel interface card, currently only the HP ScanJet 5100C/5200C are supported. These scanners are using an internal parallel-to-SCSI converter which is supported by the ppSCSI-driver (see above). + .TP + .B Scrollfed MFP support + A separate backend is planned to properly support the OfficeJet K series, + as well as other non-SCL HP MFPs, such as the OfficeJet 300/500/600/700 + and T series and the LaserJet 1100A. Support for the LaserJet 3100/3150 + is NOT planned, because programming information for these models is not + expected to ever become available. However, if you have a LaserJet 3150 + connected to a JetDirect 70X/170X/300X/500X with firmware x.08.xx or later, + you can scan using the JetDirect's embedded web server. .SH "SEE ALSO" sane\-scsi(5) .SH AUTHOR The sane-hp backend was written by Geoffrey T. Dairiki. HP PhotoSmart PhotoScanner support by Peter Kirchgessner. + HP OfficeJet support by David Paschal. diff -r -C 4 -P --exclude=configure --exclude=aclocal.m4 sane-1.0.3-with-hptools/include/sane/config.h.in sanehack/include/sane/config.h.in *** sane-1.0.3-with-hptools/include/sane/config.h.in Sat Aug 12 07:53:37 2000 --- sanehack/include/sane/config.h.in Fri Sep 1 01:06:46 2000 *************** *** 349,356 **** --- 349,359 ---- /* Define if you have cfmakeraw() */ #undef HAVE_CFMAKERAW + /* Define if you have PTAL. */ + #undef HAVE_PTAL + #ifndef HAVE_STRNCASECMP /* OS/2 needs this */ # define strncasecmp(a, b, c) strnicmp(a, b, c) #endif