Porównaj commity

...

217 Commity

Autor SHA1 Wiadomość Data
ThierryFR b60e9f742e Merge branch 'escl-add-canon-ts5150' into 'master'
Add canon TS5150

See merge request sane-project/backends!842
2024-05-25 08:22:04 +00:00
Ordissimo 264c59ee8c Add canon TS5150 2024-05-25 10:14:06 +02:00
Ralph Little 70eff07edc Merge branch 'release-1.3.1' 2024-05-22 23:43:18 -07:00
Ralph Little 3ff55fd8ee create_release.sh: corrections to the script. 2024-05-22 22:34:40 -07:00
Ralph Little 55ab38e89b NEWS: updated 1.3.0 to 1.3.1 release because 1.3.0 was a failed release.
1.3.0 got out into the wild even though it didn't really work properly.
A few distros have expressed a desire for a 1.3.1 to replace it due
to reproducability reasons.
2024-05-22 22:05:39 -07:00
Ralph Little 4a5b17a08f Merge branch 'release-1.3.0' 2024-05-22 21:58:06 -07:00
Ralph Little 285730d569 create-release.sh: Added output of the curl JSON.
We can use the output of this to manually create the release if it
fails automatically. We needs the generated paths to provide to the
manual operation in the GitLab GUI.
2024-05-22 21:44:34 -07:00
ThierryFR 15eb96b7a0 Merge branch 'escl-adf-lineart' into 'master'
Escl adf lineart

See merge request sane-project/backends!840
2024-05-21 21:36:23 +00:00
ThierryFR fbf80b0fc1 Escl adf lineart 2024-05-21 21:36:23 +00:00
ThierryFR 7aa3d2de06 Merge branch '755-success-report-epson-expression-home-xp-4200-2022' into 'master'
eSCL Success report: Epson Expression Home XP-4200 (2022)"

Closes #755

See merge request sane-project/backends!839
2024-05-21 21:12:12 +00:00
ThierryFR 004b79c096 eSCL Success report: Epson Expression Home XP-4200 (2022)" 2024-05-21 21:12:12 +00:00
Ralph Little 0f472aa205 Merge branch 'editorconfig_inline_comment' into 'master'
.editorconfig: inline comments are forbidden

See merge request sane-project/backends!832
2024-04-19 19:53:22 +00:00
ThierryFR 728ca40272 Merge branch 'escl-force-idle-status' into 'master'
Escl force idle status

See merge request sane-project/backends!835
2024-04-16 20:45:49 +00:00
ThierryFR 113be50f6b Escl force idle status 2024-04-16 20:45:49 +00:00
Ralph Little bf99345ae2 Merge branch '8200i-1825-unsupported' into 'master'
Mark OpticFilm 8200i 0x07b3/0x1825 unsupported for now.

See merge request sane-project/backends!836
2024-04-02 22:51:47 +00:00
Cyp c918dba927 Mark OpticFilm 8200i 0x07b3/0x1825 unsupported for now.
Confusingly, there seem to be (at least) two different scanners with the same
name.
2024-04-02 19:57:01 +02:00
Cyp bc54b0990f Random minor cleanup. 2024-04-02 19:56:11 +02:00
ThierryFR 7ab85011fc Merge branch 'escl-add-model' into 'master'
escl add model.

See merge request sane-project/backends!833
2024-03-14 21:18:11 +00:00
Ordissimo 219dc45c16 escl add model. 2024-03-14 22:08:52 +01:00
Wolfram Sang 3e8cd75207 Merge branch 'document_fw_usage' into 'master'
add firmware names to description comments

See merge request sane-project/backends!830
2024-02-27 10:07:15 +00:00
Guillaume Girol a6d63a72ec .editorconfig: inline comments are forbidden
source: https://spec.editorconfig.org/#no-inline-comments

this makes neovim unhappy, at least.
2024-02-26 12:00:00 +00:00
Wolfram Sang 3d6acc98e0 artec_eplus48u: desc: add firmware names to comments
Make it easier for users to find the proper firmware by documenting it
in the comments section. I wrote a script to extract the data from the
driver and then manually verified/corrected it.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-02-15 20:12:20 +01:00
Wolfram Sang e183e24b2f epjitsu: desc: add firmware names to comments
Make it easier for users to find the proper firmware by documenting it
in the comments section. I wrote a script to extract the data from the
driver and then manually verified/corrected it.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-02-15 20:12:20 +01:00
Wolfram Sang c87c40a981 gt68xx: desc: add firmware names to comments
Make it easier for users to find the proper firmware by documenting it
in the comments section. I wrote a script to extract the data from the
driver and then manually verified/corrected it. Some model names needed
updates to match their entry in the sourcecode.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-02-15 20:12:01 +01:00
Ralph Little 7088afe04d NEWS: added release notes for 1.3.0 2024-02-12 19:44:29 -08:00
Ralph Little e1daaf076b Merge branch 'add_scsi_devices' into 'release-1.3.0'
sane-find-scanner: add additional SCSI devices for Linux platform.

See merge request sane-project/backends!829
2024-02-12 01:55:49 +00:00
Ralph Little 2f2394c20c sane-find-scanner: add additional SCSI devices for Linux platform.
This is a stop-gap for a Linux user. We will come up with a better
solution involving wildcards or regular expressions.
2024-02-11 17:26:54 -08:00
Wolfram Sang ee5f9a89e1 Merge branch 'epson2/ignore_cancel' into 'master'
epson2: ignore 'cancel request' status bit for more scanners

Closes #716

See merge request sane-project/backends!823
2024-02-04 19:07:33 +00:00
Alex Belkin 05c770546f Merge branch 'xerox_mfp-adf' into 'master'
xerox_mfp: When scanning from ADF, do not stop the device at page completion

Closes #537 and #47

See merge request sane-project/backends!655
2024-02-04 01:06:13 +00:00
Ralph Little 490aecbbac po: merge French translation to release 2024-01-31 19:51:12 -08:00
Ralph Little 61f6eae88d Merge branch 'release-1.3.0' into 'release-1.3.0'
Updated Simplified Chinese translation for SANE 1.3.0 release.

See merge request sane-project/backends!826
2024-02-01 03:37:59 +00:00
Ralph Little 99f3679b57 Merge branch 'french-translation' into 'master'
update french translation

See merge request sane-project/backends!825
2024-02-01 03:35:24 +00:00
ThierryFR 716e146ffc update french translation 2024-02-01 03:35:24 +00:00
Tyson Tan 10b414c7c5 Updated Simplified Chinese translation for SANE 1.3.0 release. 2024-02-01 03:30:40 +00:00
Ralph Little 37e4e6cabe po: merge Ukrainian translation to release. 2024-01-29 13:03:59 -08:00
Ralph Little 6b080c8c82 Merge branch 'uk_update3' into 'master'
Update Ukrainian translation

See merge request sane-project/backends!824
2024-01-29 20:34:04 +00:00
Yuri Chornoivan 6a57a9c308 Update Ukrainian translation 2024-01-29 22:21:11 +02:00
Ralph Little b761349240 doc: Rolf Bensch is no longer a maintainer for the pixma backend. 2024-01-29 10:23:32 -08:00
Ralph Little c98138f32e po: updated en_GB translation. 2024-01-29 10:20:47 -08:00
Ralph Little 0fe08c9036 po: updated all translations. 2024-01-29 10:13:50 -08:00
Wolfram Sang fc6516afc1 epson2: ignore 'cancel request' status bit for more scanners
Not only the Perfection1650, but other scanners need to ignore the
FSG_STATUS_CANCEL_REQ bit as well. Thanks to @matc for debugging and
providing a list. Should fix #716. Remove the hardcoded bitmask while
here.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-01-28 14:58:32 +01:00
Wolfram Sang f742d591fe epson2: desc: sync status of GT-6600U and Perfection 610
If the GT has "complete" support, Perfection 610 has also.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-01-27 23:19:09 +01:00
Ralph Little 242562d54e Merge branch '728-cannon-canoscan-lide-700f-is-working' into 'master'
Resolve "Cannon CanoScan LiDE 700F is working"

Closes #728

See merge request sane-project/backends!822
2024-01-26 18:21:47 +00:00
Ralph Little a08d5bbfac genesys: correct name of LiDE 700F. 2024-01-26 10:13:42 -08:00
Wolfram Sang 9266b647c5 Merge branch 'add-l360' into 'master'
Add support for epson L360

See merge request sane-project/backends!816
2024-01-26 14:23:06 +00:00
Artur Shepilko 86bb976ad6 xerox_mfp: When scanning from ADF, do not stop the device at page completion
- Stopping and releasing the device causes the ADF to purge any remaining pages,
thus only the first page gets properly scanned (observed with Samsung
SCX-4729FW).
- Instead, when sourcing from the ADF, at each page's completion it should
continue and issue "OBJECT POSITION" command to proceed to the next page.
- Once all pages have been processed, the subsequent "OBJECT POSITION" command
returns the proper "CHECK CONDITION" status  (ADF is empty) and triggers the
device stop and release.
- Additionally, the status of the ADF (loaded/empty) needs to be requeried
at the `sane_start()` for proper handling of the "Auto" mode. Otherwise,
the scanning session retains the ADF state from the start of the session,
even though ADF will become empty. Thus the "Auto" mode will not properly
switch to Flatbed as intended in the client application (observed in
Simple-Scan).

> NOTE: the initial "READ" command in `sane_start()` is extraneous and
> appears to always return STATUS_BUSY (indeed, the scanner is usually
> busy loading the page). The actual READ is correctly done in
> `dev_acquire()`. It may appear benign in a single page scan mode, however,
> it becomes malfunctioning in the mutipage ADF mode. The initial READ,
> when successful, will cause the skipping of the read block from processing,
> as the actual processing is tied to content read from `dev_acquire()`.
>
> Therefore, the initial READ command in the `sane_start()` is removed.
2024-01-25 17:20:03 -06:00
Artur Shepilko 8fe58ab678 xerox_mfp: Use doc source macros for clarity 2024-01-25 17:20:13 -06:00
Artur Shepilko 0a9bf84d3c xerox_mfp: Add support for Samsung SCX-4729FW (network mode) 2024-01-25 17:20:03 -06:00
Ralph Little 22108dca2a Merge tag '1.2.1'
Release 1.2.1
2024-01-17 15:54:42 -08:00
Ralph Little dcf4241470 Merge branch 'macfixes' into 'master'
Mac fixes

See merge request sane-project/backends!821
2024-01-12 05:36:52 +00:00
Ben Olden-Cooligan ec3eacfbcb Remove obsolete pixma macOS workaround
Without this change, pixma scanning is currently broken (tested with Canon MP495). The stated reason for the workaround (libusb not supporting timeouts for interrupts) hasn't been true since 2010:
67d9ef7b68
2024-01-11 20:21:36 -08:00
Ben Olden-Cooligan 3f217248f4 Always use pthreads for macOS
https://gitlab.com/sane-project/backends/-/issues/153
2024-01-11 20:20:47 -08:00
Ralph Little bff8d25007 Merge branch 'master' into 'master'
Fix hpljm1005 #723

See merge request sane-project/backends!819
2024-01-11 21:54:21 +00:00
ThierryFR 77059fe3d4 Merge branch 'escl_fix_option_without_poppler' into 'master'
escl: Fix option without poppler.

See merge request sane-project/backends!820
2024-01-11 18:23:04 +00:00
Ordissimo cc13a4986d escl: Fix option without poppler. 2024-01-11 19:13:45 +01:00
Tarwirdur Turon 829b11b72e Fix hpljm1005 #723
1. Fixed scan to jpeg/png
2. Fixed bottom part of the image
3. Removed white pixels from the right part of the image
4. Adjusted physical dimensions of the scanning area
2024-01-06 18:45:25 +03:00
Ralph Little aefcb71a23 Merge branch 'lexmark_X2670_backend' into 'master'
lexmark_x2600 add man mages & doc

See merge request sane-project/backends!818
2024-01-01 23:11:26 +00:00
Benoit JUIN 1c4058fb7c update authors and lexmark_x2600 desc 2024-01-01 05:04:00 +01:00
Ralph Little 22e3de3642 net: fix trailing whitespace from previous merge. 2023-12-31 18:46:24 -08:00
Ralph Little 268be2c712 Merge branch 'refactor_getlogin' into 'master'
Refactor deprecated getlogin()

See merge request sane-project/backends!817
2023-12-31 21:35:26 +00:00
Jonathan Schulz 8a57a6934f Refactor deprecated getlogin() 2023-12-31 21:35:26 +00:00
Benoit JUIN e7040a0b51 white space cleanup 2023-12-23 05:57:22 +01:00
Benoit JUIN f3c3dd0513 white space cleanup 2023-12-23 05:54:54 +01:00
Benoit JUIN 26d6390f92 ad man mages & doc 2023-12-23 05:49:47 +01:00
beeduh 4750093faa Add support for epson L360 2023-12-13 06:07:06 +00:00
Ralph Little 32f335d0f1 Merge branch 'master' into 'master'
Update DMC author's contact details

See merge request sane-project/backends!815
2023-12-12 16:57:46 +00:00
Dianne Skoll 3f612c1277 Update DMC author's contact details
My legal name and my email address have changed.
2023-12-11 22:15:30 -05:00
Ralph Little 8096f84a6f Merge branch 'lexmark_X2670_backend' into 'master'
Lexmark x2600 backend

See merge request sane-project/backends!769
2023-12-10 18:36:08 +00:00
Benoit JUIN c1e9a341ab memory leak fix 2023-12-03 08:08:07 +01:00
Benoit JUIN 7efa04ff78 white spaces 2023-12-03 07:12:11 +01:00
Benoit JUIN daebecd216 fix memory leak 2023-12-03 07:11:41 +01:00
Benoit JUIN 84c94b8368 handle usb plug/unplug correctly 2023-12-03 07:03:39 +01:00
Benoit JUIN 068714ef6e fix ifs 2023-12-03 06:14:03 +01:00
Benoit JUIN f7dd8e224d memoy leak fix 2023-12-03 06:00:23 +01:00
Benoit JUIN 7631c15c5e Mem alloc checks, typo and handle cancel scan correctly 2023-12-03 05:51:50 +01:00
Benoit JUIN 80478c865b add licence & author note 2023-11-30 06:47:40 +01:00
Benoit JUIN 0255c74669 free buffers 2023-11-30 04:53:35 +01:00
Ralph Little 65779d6b59 Merge branch 'libxml2-2.12' into 'master'
sanei_usb: Fix build with libxml2 2.12

See merge request sane-project/backends!814
2023-11-29 06:40:36 +00:00
Benoit JUIN ec9efba602 compile/typo fix 2023-11-29 06:39:17 +01:00
Benoit JUIN 0661fe9d89 fix warnings 2023-11-29 06:31:31 +01:00
Benoit JUIN 1fb0a78dd8 simple scan sends cancel on page finish ... 2023-11-29 06:23:32 +01:00
Benoit JUIN c9e8d812df reposition readPtr correctly 2023-11-29 06:10:05 +01:00
Jürg Billeter 3f727cfb8f sanei_usb: Fix build with libxml2 2.12 2023-11-28 21:35:01 +01:00
Benoit JUIN d022fa9c1b use buffers 2023-11-27 05:52:00 +01:00
Benoit JUIN 1513839238 whitespace cleanup 2023-11-26 06:43:53 +01:00
Benoit JUIN fc8e03ef69 cleanup logs 2023-11-26 06:08:37 +01:00
Benoit JUIN 6ee3558990 add color channel swap 2023-11-25 09:23:42 +01:00
Benoit JUIN 768fa3bf59 refactor more readable 2023-11-25 07:18:22 +01:00
Benoit JUIN 94b67794a5 handle high dpi and use a buffer to read data 2023-11-25 06:15:33 +01:00
Benoit JUIN 51aaef6d81 WIP: fill a buffer instead of messy sync read/write 2023-11-24 06:09:27 +01:00
Benoit JUIN 6e9f4b3785 fix debug line 2023-11-23 09:40:54 +01:00
Benoit JUIN 0a0afc2a71 fix typo 2023-11-23 09:13:29 +01:00
Benoit JUIN 5360166729 Merge remote-tracking branch 'origin/lexmark_X2670_backend' into lexmark_X2670_backend 2023-11-23 09:07:22 +01:00
Benoit JUIN 35aed3072c add debug info 2023-11-23 09:06:12 +01:00
Ralph Little 0098b1c58b Apply 2 suggestion(s) to 1 file(s) 2023-11-23 08:05:14 +00:00
Ralph Little 02f1a624f3 Apply 1 suggestion(s) to 1 file(s) 2023-11-23 08:03:57 +00:00
Ralph Little 15795b8071 Merge branch '715-have_libsnmp-redefinition' into 'master'
Resolve "HAVE_LIBSNMP redefinition"

Closes #715

See merge request sane-project/backends!812
2023-11-14 17:54:40 +00:00
Ralph Little bb8155804c configure.ac: Fixes to remove #define redefinitions from config.log
Involves a simple rearrange for some clauses to avoid #define
duplication in the config log.
2023-11-14 09:46:11 -08:00
Alex Belkin 0327a5c954 Merge branch 'fix-ci-no-tags' into 'master'
autogen.sh: Reconstruct version from ChangeLog files (for CI)

See merge request sane-project/backends!811
2023-11-08 20:30:00 +00:00
Alex Belkin 02a417721f autogen.sh: Reconstruct version from ChangeLog files (for CI)
When repos are forked on GitLab tags aren't copied (0 Tags) thus making
git-version-gen producing incorrect version ("UNKNOWN") which in turn
causes CI build failures (not helpful for people trying to make Merge
Requests). To workaround this issue reconstruct version from ChangeLogs
files (handy updated on every release). If git describe is not working
and we are not in dist package - take version from the top-most
ChangeLog file.

Example of error messages:

  ../libtool: line 1168: UNKNOWN + : syntax error: operand expected (error token is "+ ")

  In file included from net.c:83:
  net.c: In function 'connect_dev':
  <command-line>: error: 'UNKNOWN' undeclared (first use in this function)
  ../include/sane/sane.h:31:21: note: in definition of macro 'SANE_VERSION_CODE'
     31 |   (  (((SANE_Word) (major) &   0xff) << 24) \
	|                     ^~~~~
  net.c:485:41: note: in expansion of macro 'V_MAJOR'
    485 |   req.version_code = SANE_VERSION_CODE (V_MAJOR, V_MINOR,
	|                                         ^~~~~~~
2023-11-07 23:34:24 +03:00
Ralph Little 5bf66ca4e5 Merge branch 'pixma_mf750' into 'master'
pixma: Added speculative definitions for MF750 imageclass machines.

See merge request sane-project/backends!810
2023-11-06 22:56:50 +00:00
Ralph Little 651fc3419a pixma: Added speculative definitions for MF750 imageclass machines.
Also corrected descrption file entry for TS8700.
2023-11-06 14:48:38 -08:00
Alex Belkin 2ba7215acf Merge branch 'fix-alpine-build' into 'master'
CI: Workaround build failures on Alpine

See merge request sane-project/backends!808
2023-11-06 22:00:14 +00:00
Alex Belkin 7a18846c60 CI: Workaround build failures on Alpine
It's confirmed that neither Alpine nor Musl will fix ioctl warnings[1]
that making alpine build to fail and that these warnings are
harmless[2].

  sanei_usb.c:4042:34: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '3221771554' to '-1073195742' [-Werror=overflow]
   4042 |       if (ioctl (devices[dn].fd, SCANNER_IOCTL_CTRLMSG, &c) < 0)
	|                                  ^~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Link: https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580
Link: https://www.openwall.com/lists/musl/2020/01/20/3
2023-11-07 00:13:37 +03:00
Ralph Little 5b067b7cda Merge branch 'avision_warning_fix' into 'master'
avision: fix for warning related to pthread unused variable and shadowed variable name.

See merge request sane-project/backends!809
2023-11-06 18:37:43 +00:00
Ralph Little 43135ab7ed avision: fix for warning related to pthread unused variable and shadowed variable name. 2023-11-06 10:29:19 -08:00
Ralph Little 86f41b1360 Merge branch 'pixma-new-model-oct-2023' into 'master'
pixma: add models October 2023

See merge request sane-project/backends!807
2023-11-03 17:48:51 +00:00
Ordissimo 14dbdc759e pixma: add models October 2023 2023-11-03 10:15:17 +01:00
Alex Belkin b38e620c23 Merge branch 'xerox_mfp-no-usb-clear_halt-workaround' into 'master'
xerox_mfp: skip ENDPOINT CLEAR HALT command by default. #706

See merge request sane-project/backends!799
2023-11-03 04:19:53 +03:00
ValdikSS 655b9736c5 xerox_mfp: skip ENDPOINT CLEAR HALT command by default
Some xerox_mfp scanners, such as Samsung SCX-4521F, hangs when
their OUT ENDPOINT receives CLEAR HALT command, which is performed
in usb open and close functions of the backend.
The issue seem to be dependant on USB controller and assumingly
happens due to some sort of incompatibility of USB implementation
in the scanner.

Skip sending this command by default and add
SANE_XEROX_USB_HALT_WORKAROUND env variable to execute
CLEAR HALT commands.
2023-11-02 15:55:55 +03:00
Ralph Little fd22c210cf Merge branch 'master' into 'master'
Correctly set O_NONBLOCK flag and disallow further reception using shutdown on...

See merge request sane-project/backends!803
2023-10-09 23:37:48 +00:00
ThierryFR edc0fd3283 Merge branch 'escl_work_without_zeroconf' into 'master'
Fix work with pre-configured device

Closes #711

See merge request sane-project/backends!804
2023-10-09 20:54:49 +00:00
ThierryFR d8c3848765 Fix work with pre-configured device 2023-10-09 20:54:48 +00:00
Tom Meyer-Mallorie 7df77203ad Correctly set O_NONBLOCK flag and disallow further reception using shutdown on saned data fd once a connection is open. 2023-10-07 22:51:00 +01:00
Ralph Little fd7b83c8f7 Merge branch '708-possible-segv-null-pointer-deref-in-sanei_configure_attach' into 'master'
Resolve "Possible SEGV (null pointer deref) in sanei_configure_attach()"

Closes #708

See merge request sane-project/backends!802
2023-10-02 23:47:59 +00:00
Ralph Little a92ffb3d97 Merge branch '709-possible-segv-heap-bounds-overwrite-in-init_options-test-c' into 'master'
Resolve "Possible SEGV (heap bounds overwrite) in init_options() (test.c)"

Closes #709

See merge request sane-project/backends!801
2023-10-02 23:41:27 +00:00
Ralph Little a617461c63 sanei_config: malformed line can return NULL for token. We should check. 2023-10-02 16:40:27 -07:00
Ralph Little 6fc47c4c14 test: added validation checks for config string option saelections.
This will avoid a reported buffer overflow issue related to invalid (long) options being specified.
2023-10-02 16:23:07 -07:00
Ralph Little ebb8152058 Merge branch 'epsonds_new_models' into 'master'
epsonds: New model support added.

See merge request sane-project/backends!800
2023-10-02 20:02:22 +00:00
Ralph Little 837d1622ea epsonds: New model support added. 2023-10-02 20:02:21 +00:00
Ralph Little 3c20a989cf Merge branch 'xerox-3335' into 'master'
xerox_mfp: add Xerox WorkCentre 3335

See merge request sane-project/backends!790
2023-09-27 14:01:16 +00:00
Ralph Little 41b865e2a5 Merge branch 'master' into 'master'
Correct tpo scan area for agfa arcus 1200

See merge request sane-project/backends!791
2023-09-27 13:58:52 +00:00
Ralph Little b510c87d85 Merge branch 'xerox_mfp-4521f-fixes' into 'master'
xerox_mfp: Add support for Samsung SCX-4521F. #707

See merge request sane-project/backends!797
2023-09-27 13:54:57 +00:00
Marc Schink 3a58649ff1 xerox_mfp: Fix lineart and halftone mode
Halftone and lineart mode do not work properly except for a
resolution of 600 dpi. The very last part of a scanned document is
missing and displayed as black stripe. This problem was found with a
Samsung SCX-4521F, but is assumed to affect other devices, too.

Decode the data received from the device in halftone and lineart mode
to fix this problem.

This patch was tested with a Samsung SCX-4521F device for all
resolutions supported by the device with color, grayscale, lineart
and halftone mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
2023-09-27 16:32:45 +03:00
Marc Schink 7b0572a180 xerox_mfp: Fix various format specifiers 2023-09-27 16:30:16 +03:00
Marc Schink 1e1f8affb6 xerox_mfp: Add support for Samsung SCX-4521F
The acquisition with the xerox_mfp driver works almost out of the box
for the Samsung SCX-4521F but the process stops just before the end
of the document until an USB transfer timeout expires. The very last
part of the scanned document is missing then.

Do not request more data from the device than available for the last
USB transfer to overcome this problem and to be conform with the
properties of the vendor driver.

The driver was tested for all resolutions supported by the device
with color and grayscale mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
2023-09-27 16:30:09 +03:00
Ralph Little 2fb8eb90cf Merge branch 'pixma-add-model' into 'master'
pixma:  add 2023 model

See merge request sane-project/backends!795
2023-09-26 15:32:00 +00:00
ThierryFR 3094f4a0dc Merge branch 'canon_pixma-add-model' into 'master'
canon_pixma :  add 2023 models

See merge request sane-project/backends!796
2023-09-26 04:34:45 +00:00
ThierryFR cd5443eec8 canon_pixma : add 2023 models 2023-09-26 04:34:44 +00:00
Ordissimo b1f6bea394 pixma: add 2023 models 2023-09-25 23:18:15 +02:00
Ordissimo 766162cad6 pixma: add 2023 models 2023-09-25 23:13:59 +02:00
ThierryFR 353e089ff4 Merge branch 'scanimage-pdf-error' into 'master'
Fix qpdfview error : Invalid XRef entry 0

See merge request sane-project/backends!794
2023-09-20 18:47:27 +00:00
Ordissimo 5978899b54 Fix qpdfview error : Invalid XRef entry 0 2023-09-20 08:58:49 +02:00
ThierryFR 0c1cbc1b6a Merge branch 'jpeg_fix' into 'master'
escl: Fix crash in libjpeg when cropping the scanned image

See merge request sane-project/backends!793
2023-09-19 19:41:43 +00:00
Sebastian Parborg ba7d24bf30 escl: Fix crash in libjpeg when cropping the scanned image
jpeg_crop_scanline will adjust the x offset and the width of the image
to make it line up with the nearest iMCU boundary.

Before, this was not taken into account and it would make SANE
potentially allocate a too small buffer for the final image.

This would lead to segfaults because libjpeg would try to write outside
of the allocated memory region as it assumes that the buffer was
allocated with the new cinfo.output_width size after cropping.
2023-09-19 15:54:22 +02:00
ThierryFR 9bf2415fe6 Merge branch 'escl-fix-build' into 'master'
escl - Fix #690 use constant build .

See merge request sane-project/backends!792
2023-08-05 16:52:45 +00:00
Ordissimo f9951e3b31 escl - Fix constant build . 2023-08-05 17:55:14 +02:00
Antoni Simka caaf65f1a3
Correct tpo scan area for agfa arcus 1200 2023-07-28 18:21:50 +02:00
Mikhail Novosyolov ba3d80949d xerox_mfp: add Xerox WorkCentre 3335
Works OK, but, when scanning in automatic feeder mode, only the first page is scanned:
e.g. if run
SANE_DEBUG_XEROX_MFP=4 skanlite
skanlite thinks that scanning has been finished after the first page, but the scanner continues to work and debug messages about reading data from the scanner (sane_xerox_mfp_read: <..>) continue to be printed.

Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
2023-07-03 19:20:00 +03:00
m. allan noah 9d721e4610 canon_dr backend v65
- fix imprinter support (#672)
- update attach_one and other init functions
2023-06-06 21:48:56 -04:00
Ralph Little 820ce39e94 Merge branch 'matkoniecz-master-patch-83655' into 'master'
apt install also requires sudo

See merge request sane-project/backends!789
2023-05-08 15:30:38 +00:00
Mateusz Konieczny cfb3ab1bbd apt install also requires sudo 2023-05-08 11:00:00 +00:00
Ordissimo b171aa7d87 Merge branch 'escl-fix-pwg-version' into 'master'
escl: Fix version of pwf:Version

Closes #675

See merge request sane-project/backends!788
2023-04-16 19:49:45 +00:00
Ordissimo aa3fc1cad8 escl: Fix version of pwf:Version 2023-04-16 19:49:45 +00:00
m. allan noah 90cc6b1fb7 fujitsu/ricoh.desc file updates
Sort model numbers to be more readable on our website.
Remove 'ricoh' from model names.
2023-03-28 08:29:02 -04:00
m. allan noah 44f96adb33 fujitsu.desc: remove trailing blank line 2023-03-27 21:03:39 -04:00
m. allan noah 9ce70f06c8 fujitsu backend v140
add initial support for Ricoh scanners
2023-03-27 20:59:03 -04:00
m. allan noah f4fcbb59f2 fujitsu.desc: add new line of Ricoh scanners
Fujitsu has transfered their line of scanners to Ricoh, initially
keeping the same USB VID and PID. So we duplicate all current
models into a Ricoh section.
2023-03-24 19:33:30 -04:00
Ralph Little 4f9300d1ae Merge branch 'epsonds-cleanups' into 'master'
epsonds: Add some missing entries

See merge request sane-project/backends!785
2023-03-17 05:11:38 +00:00
Benjamin Gordon c5c329ce24 epsonds: Give names to group options
The group options currently do not have names set.  Since only the title
is supposed to be valid for group options, this isn't a violation of
the SANE standard.  Regardless, it causes scanimage (and maybe other
frontends) to skip them.  Add empty name values so that they can be
processed properly.

Before:
Options specific to device `epsonds:net:n.n.n.n':
  Standard:
    --source Flatbed|ADF Front|ADF Duplex [Flatbed]
        Selects the scan source (such as a document-feeder).
    --mode Lineart|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --depth 1|8bit [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --resolution 75|150|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
    -l 0..215.9mm [0]
        Top-left x position of scan area.
    -t 0..297.18mm [0]
        Top-left y position of scan area.
    -x 0..215.9mm [215.9]
        Width of scan-area.
    -y 0..297.18mm [297.18]
        Height of scan-area.
    --eject [inactive]
        Eject the sheet in the ADF
    --load [inactive]
        Load a sheet in the ADF
    --adf-skew[=(yes|no)] [inactive]
        Enables ADF skew correction
    --adf-crp[=(yes|no)] [inactive]
        Enables ADF auto cropping

After:
Options specific to device `epsonds:net:n.n.n.n':
  Standard:
    --source Flatbed|ADF Front|ADF Duplex [Flatbed]
        Selects the scan source (such as a document-feeder).
    --mode Lineart|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --depth 1|8bit [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --resolution 75|150|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
  Geometry:
    -l 0..215.9mm [0]
        Top-left x position of scan area.
    -t 0..297.18mm [0]
        Top-left y position of scan area.
    -x 0..215.9mm [215.9]
        Width of scan-area.
    -y 0..297.18mm [297.18]
        Height of scan-area.
  Optional equipment:
    --eject [inactive]
        Eject the sheet in the ADF
    --load [inactive]
        Load a sheet in the ADF
    --adf-skew[=(yes|no)] [inactive]
        Enables ADF skew correction
    --adf-crp[=(yes|no)] [inactive]
        Enables ADF auto cropping
2023-03-13 10:57:18 -06:00
Benjamin Gordon 12ef54b087 epsonds: Allow querying OPT_ADF_CRP
The OPT_ADF_CRP (adf-crp) option is detectable from the hardware and is
settable as an option, but can't be queried.  This appears to just be an
oversight, so add it to the list of handled options.
2023-03-09 10:20:51 -07:00
Ralph Little 79962f324d Merge branch '664-pixma-backend-resets-mode-when-source-selected' into 'master'
Resolve "Pixma backend resets --mode when --source selected"

Closes #664

See merge request sane-project/backends!784
2023-03-08 06:22:58 +00:00
Ralph Little 59885e039e pixma: don't change resolution or mode when changing source
If currently selected resolution and mode are still valid when changing
source then retain the selected value rather than picking defaults.
2023-03-07 22:10:54 -08:00
Ralph Little 596f708c96 changelog: Add changelog missed from the 1.2.1 release 2023-02-27 20:04:50 -08:00
Ralph Little 3ab4342ce7 doc: remove "new" markers from lide70 and "template" backends. 2023-02-27 19:36:12 -08:00
Ralph Little 49943e7e45 Merge branch '570-issues-in-man-pages' into 'master'
Resolve "Issues in man pages"

See merge request sane-project/backends!692
2023-02-21 04:26:29 +00:00
Ralph Little 2b20ad5b12 doc: merge changes from default, related to removal of init system config. 2023-02-20 20:14:58 -08:00
Ralph Little 536e486ff7 Merge branch 'saned-doc' into 'master'
doc/saned: Improve service configuration details and security warnings

See merge request sane-project/backends!717
2023-02-21 04:00:50 +00:00
Ralph Little dd145a2383 Merge branch '410-sane-terminates-on-flatbed-scanning-xerox-3225-xerox_mfp-with-not-a-jpeg-file-starts-with-0x00' into 'master'
Resolve "sane terminates on flatbed-scanning (Xerox 3225, xerox_mfp) with : Not a JPEG file: starts with 0x00 0x00"

Closes #410

See merge request sane-project/backends!567
2023-02-21 00:48:34 +00:00
Ralph Little 5f99edda9f Resolve "sane terminates on flatbed-scanning (Xerox 3225, xerox_mfp) with : Not a JPEG file: starts with 0x00 0x00" 2023-02-21 00:48:34 +00:00
Ralph Little 06280f15c1 Merge branch 'master' into '570-issues-in-man-pages'
# Conflicts:
#   doc/sane-epjitsu.man
#   doc/sane-plustek_pp.man
2023-02-21 00:13:33 +00:00
Ralph Little e584a8c503 scanimage: fix for merge failure.
Two changes were made recently for the batch processing component
in scanimage. It's not too bad, just a couple of unused local vars.
Conflict was between some refactoring that I did and a change to
the processing for --batch-prompt.
2023-02-20 16:07:17 -08:00
Ralph Little 189c5361b7 Merge branch 'plustek7600i_8100_vidpid' into 'master'
genesys: Add VID:PID for Plustek OpticFilm 7600i and 8100

See merge request sane-project/backends!767
2023-02-20 23:54:45 +00:00
Ralph Little e147d111e3 Merge branch 'warmar-master-patch-05014' into 'master'
xerox_mfp: Add Dell 1135n

See merge request sane-project/backends!770
2023-02-20 23:52:42 +00:00
Warren Mar 9a190804dd xerox_mfp: Add Dell 1135n 2023-02-20 23:52:42 +00:00
Ralph Little 10b3345a1c Merge branch '16-low-default-buffer-size-results-in-poor-scanner-performance' into 'master'
Resolve "Low default buffer size results in poor scanner performance"

Closes #16

See merge request sane-project/backends!773
2023-02-20 23:51:26 +00:00
Ralph Little 30eb01674a saned: new header stdint.h required for SIZE_MAX. 2023-02-20 15:39:57 -08:00
Ralph Little 9d26edac5f sanei_wire: updated diag for size_t variables using %zu format
(u_long) casts sometimes generate incorrect values in diag.
%zu is pretty standard now so we should be using it for size_t args.
2023-02-20 15:25:46 -08:00
Ralph Little b5058ff5ed saned: increase default buffer size for backend comms to 1MB
Also added an option to change it.
2023-02-20 15:25:21 -08:00
Ralph Little 8ac72560ff Merge branch '646-scanimage-hangs-on-exit' into 'master'
Resolve "scanimage hangs on exit"

See merge request sane-project/backends!783
2023-02-20 20:31:18 +00:00
Ralph Little 1eff86953d Merge branch 'pixma-add-models' into 'master'
pixma: add new models

See merge request sane-project/backends!766
2023-02-20 17:24:49 +00:00
Ralph Little 1f22e0dadd avision: added ADF and lightbox installed options.
Also sorted out the options texts to make them translatable.
2023-02-19 15:08:59 -08:00
Ralph Little 9387e9b35c avision: match also USB vendor and product ids for USB devices.
We always know the USB vendor and product ids for USB devices and
there are multiple entries with the same SCSI details shared by
different USB models. We should pick the correct one at least to
get the right model name to the user.
2023-02-18 13:41:02 -08:00
Ralph Little d88920ffb6 avision: correction for ADF presence detect.
Scanjet 8300 has an ADF port but does not necessarily have an ADF
fitted. In the test case, there is a lightbox instead. Trying to
reset/probe for an ADF that isn't there is futile.
2023-02-18 13:02:29 -08:00
Ralph Little 2e5fffb036 Merge branch 'B-promptReturn' into 'master'
Scanimage Batch Prompt: Discard Extraneous Input Properly

See merge request sane-project/backends!781
2023-02-13 21:26:35 +00:00
Ralph Little 660547e33c Merge branch 'master' into 'B-promptReturn'
# Conflicts:
#   frontend/scanimage.c
2023-02-13 21:15:18 +00:00
Ralph Little bd9771939f Merge branch '634-llvm-15-on-freebsd-support-for-sane-backends-1-1-1_v2' into 'master'
Resolve "LLVM 15 on FreeBSD support for sane-backends 1.1.1"

Closes #634

See merge request sane-project/backends!782
2023-02-13 20:45:38 +00:00
Ralph Little 373dceaa36 scanimage: more generic fix for selecting a common basename function.
We have been specially including libgen.h to get a version in other
platforms such as macOS and FreeBSD. However, it is dangerous to
make assumptions about which version of basename that we will get.
So this change reverts to asking for the version that modifies the
argument and creates a copy of the arg that we *can* modify.
2023-02-13 12:32:35 -08:00
Matthew Gilmore 3222d342eb Less stack diddling 2023-02-10 04:13:13 +00:00
Matthew Gilmore 8072c2e895 batch-prompt - handle EOF and \n more accurately 2023-02-09 20:06:30 -08:00
Ralph Little 971a5a2e92 Merge branch 'master' into 'master'
po: add initial Georgian translation

See merge request sane-project/backends!780
2023-02-09 17:29:36 +00:00
NorwayFun 36d204e3fd po: add Georgian translation 2023-02-09 12:12:00 +00:00
NorwayFun b4ad09be99 Update LINGUAS: add Georgian 2023-02-09 12:11:10 +00:00
Ralph Little 53e227d171 Merge branch 'clang-16' into 'master'
acinclude.m4: fix -Wimplicit-function-declaration

See merge request sane-project/backends!763
2023-02-07 05:38:09 +00:00
Ralph Little f15a40c1bb scanimage: default buffer size increased to 1MB
Because -B argument was optional and specified 1MB if left out I have
made the argument mandatory now and updated the man page to match.
2022-12-04 10:00:47 -08:00
Ralph Little fc77717507 scanimage: some prep clean up work.
- reduce scope of some variables
- move full_optstring to global so that scanimage_exit can clean it up
- initialize global variables. Global statics are not initialized.
- some other more minor things
2022-12-04 09:29:02 -08:00
Benoit Juin 1549f87198 handle cancel 2022-11-27 16:40:35 +01:00
Benoit Juin 2503ec8497 tweak options 2022-11-27 09:55:40 +01:00
Benoit Juin f8bd456aa5 remove useless edit 2022-11-26 22:23:28 +01:00
Benoit Juin 65c341b9d5 remove useless edit 2022-11-26 22:22:25 +01:00
Benoit Juin 6e488f3891 fix missing define 2022-11-26 22:20:26 +01:00
Benoit Juin d739ffb8f0 remove trailing whitepaces 2022-11-26 21:57:19 +01:00
Benoit Juin 185807a335 fix packet empty skip 2022-11-26 19:49:21 +01:00
Benoit Juin 0f9135def2 basic backend working 2022-11-26 15:05:49 +01:00
Benoit Juin eec401f5c3 data copy in progress 2022-11-26 08:45:57 +01:00
Benoit Juin 8efa358740 fix warnings 2022-11-26 08:16:54 +01:00
Benoit Juin 21f163e797 fix warnings 2022-11-26 08:15:11 +01:00
Benoit Juin 68d6519b6e fix packet forging 2022-11-26 07:43:23 +01:00
Benoit Juin e6cb0cf07e update packet forging 2022-11-26 07:14:45 +01:00
Benoit Juin a44127d1bc protocol implementation in progress 2022-11-26 06:36:57 +01:00
Benoit Juin d343dc963b protocol implementation in progress 2022-11-26 06:24:49 +01:00
Benoit Juin 315fe1fdf5 fix trailing whitespaces 2022-11-25 17:39:07 +01:00
Benoit Juin 51ba313173 backend in progress 2022-11-25 17:35:10 +01:00
Benoit Juin 175a8b0042 fix usb dependancies 2022-11-24 18:05:42 +01:00
Benoit Juin a9c3cfa4d7 fix usb dependancies 2022-11-24 18:01:04 +01:00
Benoit Juin ba3fd1dc4c remove new line 2022-11-24 17:36:37 +01:00
Benoit Juin 179257160b fix fedora build 2022-11-24 13:05:06 +01:00
Benoit Juin 8509c9dff4 trailing white space 2022-11-24 12:52:32 +01:00
Benoit Juin b19b324bf7 remove warnings 2022-11-24 12:49:58 +01:00
Benoit Juin ccfc476a07 Prepare backend build files 2022-11-24 12:08:29 +01:00
Zdenek Dohnal ef3e8b06ab genesys: Add VID:PID for Plustek OpticFilm 7600i and 8100 2022-11-22 10:57:24 +01:00
thierry1970 42d1143c0a pixma: add new models 2022-11-21 11:04:03 +01:00
Sam James 300b460970
acinclude.m4: fix -Wimplicit-function-declaration
-Wimplicit-function-declaration will become an error by default
in Clang 16.

Fixes errors like:
```
error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
```

Signed-off-by: Sam James <sam@gentoo.org>
2022-11-04 04:04:46 +00:00
David Ward db25c1e7eb doc/saned: Improve security warnings
The current warnings do not explain to the administrator what risks may
actually be involved by exposing saned to the network, so that they can
take the appropriate measures.

Currently the administrator is advised to restrict incoming connections
to saned (using tcpwrappers and/or firewall rules). This might not have
been the typical posture when this was written. More importantly, these
actions are not meant to protect against a loss of confidentiality, and
the administrator should not be led to believe this is the case.

Suggest the use of a secure tunnel between each client and saned, which
can be achieved without modifying the software.
2022-04-14 19:45:56 -04:00
David Ward db009d158e doc/saned: Move service configuration details out of man page
The saned(8) man page should be used to describe the behavior of saned
itself. The information about configuring inetd, xinetd, or systemd to
launch saned - while it is helpful - belongs in a separate location.
Keep in mind that distribution packages usually configure the service
automatically, and they may ship with their own specific instructions.
(For example, update-inetd can be used in Debian and its derivatives.)

This change moves this information from the man page into a new file,
making it more concise as well. Working examples are moved to separate
files that can be copied directly from the source tree to the system.
2022-04-14 19:14:50 -04:00
Ralph Little 0a3b043e8e doc: additional small changes to man pages. 2022-02-21 13:19:53 -08:00
Ralph Little d6419c2490 doc: cosmetic corrections to man pages from translator review 2022-02-20 18:23:59 -08:00
145 zmienionych plików z 36422 dodań i 18058 usunięć

Wyświetl plik

@ -6,7 +6,8 @@
# Your editor may need a plugin for this configuration to take effect.
# See http://editorconfig.org/#download for details.
root = true ; look no further
; look no further
root = true
[*]
charset = utf-8

4
.gitignore vendored
Wyświetl plik

@ -58,3 +58,7 @@ test-suite.log
# `make dist` artifacts
/sane-backends-*.tar.gz
# editor temp files
*~
\#*\#

Wyświetl plik

@ -38,8 +38,8 @@ make-dist:
- mkdir build
- cd build
- tar xzf ../sane-backends-*.tar.gz --strip-components=1
- ./configure $CONFIGURE_OPTS
- make -j2 -k $MAKE_FLAGS
- (set -x; ./configure $CONFIGURE_OPTS)
- eval "(set -x; make -j2 -k $MAKE_FLAGS)"
debian-10-full:
image: $REGISTRY_HUB:debian-buster-full
@ -87,9 +87,8 @@ alpine-3.15-musl:
image: $REGISTRY_HUB:alpine-3.15-musl
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
MAKE_FLAGS: "CFLAGS=-Werror CXXFLAGS=-Werror"
MAKE_FLAGS: "CFLAGS='-Werror -Wno-pedantic' CXXFLAGS=-Werror"
<<: *compile_definition
allow_failure: true
ubuntu-22.04-lts:
image: $REGISTRY_HUB:ubuntu-jammy-dist

Wyświetl plik

@ -24,7 +24,7 @@ Backends:
dc240: Peter Fales
dell1600n_net: Jon Chambers
dll: David Mosberger
dmc: David F. Skoll
dmc: Dianne Skoll
epjitsu: m. allan noah (*)
epson: Karl Heinz Kremer
epson2: Alessandro Zummo, Wolfram Sang (*)
@ -56,6 +56,7 @@ Backends:
kvs40xx: Panasonic Russia Ltd
leo: Frank Zago
lexmark: Fred Odendaal, Stéphane Voltz
lexmark_x2600: Benoit Juin
ma1509: Henning Geinitz
magicolor: Reinhold Kainhofer(based on epson2 backend)
matsushita: Frank Zago
@ -77,7 +78,7 @@ Backends:
Nicolas Martin
Louis Lagendijk (*)
Dennis Lou
Rolf Bensch (*)
Rolf Bensch
Povilas Kanapickas (*)
plustek: Gerhard Jaeger (*)
plustek_pp: Rick Bronson (former pp driver-code), Gerhard Jaeger (*)
@ -158,6 +159,7 @@ Andreas Czechanowski <m075@ins.uni-stuttgart.de>
Andreas Nowack <nowack.andreas@gmx.de>
Andreas Rick <andreas.rick@free.fr>
Andrew Kuchling <amk@magnet.com>
Benoit Juin <benoit.juin@gmail.com>
Bernd Schroeder <bernd@aquila.muc.de>
Bertrik Sikken <bertrik@zonnet.nl>
Brian J. Murrell <brian@interlinx.bc.ca>
@ -165,10 +167,10 @@ Chris Bagwell <cbagwell-guest@users.alioth.debian.org>
Chris Pinkham <cpinkham@corp.infi.net>
Christian Bucher <cbucher@vernetzt.at>
David Etherton <etherton@netcom.com>
David F. Skoll <dskoll@iname.com>
David Huggins-Daines <bn711@freenet.carleton.ca>
David Mosberger <David.Mosberger@acm.org>
David Stevenson <david.stevenson@zoom.co.uk>
Dianne Skoll <dianne@skoll.ca>
Didier Carlier <didier@sema.be>
Earle F. Philhower III <earle@ziplabel.com>
Eddy De Greef <eddy_de_greef at scarlet dot be>

Wyświetl plik

@ -419,7 +419,7 @@
1998-05-22 David Mosberger-Tang <David.Mosberger@acm.org>
* backend/dmc.c: Updated with David Skoll's latest patch.
* backend/dmc.c: Updated with Dianne Skoll's latest patch.
* sanei/sanei_scsi.c (sanei_scsi_find_devices): Declare missing
findtype arg for dummy sanei_scsi_find_devices().
@ -675,7 +675,7 @@
blocking mode, *len==0 implies end of scan).
* frontend/xscanimage.c: Ditto.
* doc/sane-dmc.man: New file by David Skoll.
* doc/sane-dmc.man: New file by Dianne Skoll.
* sanei/sanei_DomainOS.c: New file by Paul Walker.
@ -806,8 +806,8 @@
* doc/Makefile.in (SECT5): Ditto.
* backend/dmc.c, backend/dmc.h: Update with Feb 26 patch from
David Skoll.
* doc/dmc.man: New file by David Skoll.
Dianne Skoll.
* doc/dmc.man: New file by Dianne Skoll.
1998-02-25 David Mosberger-Tang <David.Mosberger@acm.org>
@ -862,8 +862,8 @@
* backend/coolscan-scsidef.h: Ditto.
* backend/coolscan.h: Ditto.
* backend/hp.c (sane_close): Change s to s->next (patch by David
Skoll <dskoll@chipworks.com>).
* backend/hp.c (sane_close): Change s to s->next (patch by Dianne
Skoll <dianne@skoll.ca>).
1998-02-17 David Mosberger-Tang <David.Mosberger@acm.org>

Wyświetl plik

@ -163,7 +163,7 @@
* frontend/saned.c (DBG): Remove extraneous parens around "msg".
* AUTHORS (Frontends): Update David Skoll's email address.
* AUTHORS (Frontends): Update Dianne Skoll's email address.
* frontend/saned.c (get_free_handle): Check for out of memory
situations and initialize newly allocated memory.

Plik diff jest za duży Load Diff

74
NEWS
Wyświetl plik

@ -7,6 +7,78 @@
<!--(towncrier release notes start)-->
## New with 1.3.1 (released 2024-05-22)
### Backends
- `avision`:
- Correction for ADF presence detect which caused a hang.
- Internationalised some text items in the backend to make them available for translation.
- `epsonds`:
- Some small changes to option documentation.
- Added support for models: ES-C220, DS-C330, and DS-C490.
- `escl`:
- Fix for pwf:Version item.
- Fix for crash in libjpeg when cropping image.
- Fix for issue with configured device when AVAHI not running.
- Fix for build without poppler-glib.
- `fujitsu`:
- Added support for Ricoh scanners: FI-8040, FI-70F.
- `genesys`:
- Added missing configuration for Plustek OpticFilm 7500i and Plustek OpticFilm 8100.
- `hpljm1005`:
- Fixes to maximum geometries and various cropping and geometry details specifically for the HP LaserJet M1005.
- `lexmark_X2670`:
- Added new backend for the Lexmark X26xx series of scanners.
- `pixma`:
- Fix to prevent mode change when source is selected. Mode should not change if still valid for source.
- Added support for models: TS8630 Series, XK110 Series, GX3000 Series, GX4000 Series, G3070 Series, G2070 Series, G4070 Series, G3030 Series, G2030 Series, TC-20M, TC-5200M, TR4500 Series, TS8700 series, XK120 series, GX1000 series, GX2000 series, TS6630 series, TS7700 series, TS7600i series, TS6730 series, TR7800 series, TS7700i series, TS7700A series, GX6500 series, i-SENSYS MF750 Series
- `snapscan`:
- Corrections for Agfa ARCUS 1200 scan area.
- `test`:
- Fix for a crash in the backend.
- `xerox_mfp`:
- Added support for Dell 1135n, which is a clone of the Samsung SCX-4623F.
- Added support for Xerox WorkCentre 3335.
- Added JPEG mitigation for modules that don't properly support JPEG output: Xerox WorkCentre 3225
- Fix to remove USB CLEAR HALT during initialisation which can potentially lock up devices.
- General fixes to support the SCX-4521F model.
### Frontends
- `saned`:
- Default scan buffer is now 1MB. -B option added to permit the buffersize to be set.
- Documentation fixes.
- `scanimage`:
- Fix for keyboard prompt processing
- Default scan buffer is now 1MB. --buffer-size and -B options now require an argument to be provided.
- Fix for PDF generation, missing newline in generated file.
### Build
- Fixes for clang-16 compiler
- Fixes for FreeBSD build.
- Fixes for escl build option involving poppler-glib.
- Optionally take build version from ChangeLog if not other version source is available.
- Fixes to autoconf files to remove unnecessary warnings from test logs.
- Fix for macOS builds related to threading support: SANE in macOS doesn't work for multi-process with libusb.
### Tools
- sane-find-scanner: Added some Linux SCSI device names since some later potential names are missing. Better solution in the pipeline.
### Documentation
- Fixes for a number of man pages.
- Added documentation for a number of Ricoh scanners which are rebranded products acquired from Fujitsu.
### Miscellaneous
- sanei_config: Fix for a potential crash.
- New Georgian translation added.
- Translations updated for: British English, Ukrainian, French and Simplified Chinese.
## New with 1.2.1 (released 2023-02-05)
### Backends
@ -1315,7 +1387,7 @@ There is now support for the SnapScan 310 and 600 scanner models.
New with 0.71:
* Polaroid Digital Microscope Camera (DMC) backend
Written by David Skoll <dskoll@chipworks.com>.
Written by Dianne Skoll <dianne@skoll.ca>
* Apple scanner backend
Written by Milon Firikis <milonf@isosun.ariadne-t.gr>. This backend

Wyświetl plik

@ -1,5 +1,3 @@
Last update: 2006-01-05
- Avoiding damage on flatbed scanners
Most flatbed scanners have no protection against exceeding the physical scan
@ -15,8 +13,10 @@ Last update: 2006-01-05
- Security problems with saned (SANE network scanning daemon)
saned is not intended to be exposed to the internet or other non-trusted
networks. Make sure that access is limited by tcpwrappers and/or a firewall
setup. Don't depend only on saned's own authentication. Don't run saned
as root if it's not necessary. And do not install saned as setuid root.
Read man saned(8) for details.
saned does not provide confidentiality when communicating with clients.
If saned is exposed directly on the network, other users may be able to
intercept scanned images, or learn passwords for connecting to saned,
with little effort. Client systems should connect to saned through a
secure tunnel to the server instead.
saned is not a trusted program and should not run with root privileges.

2
README
Wyświetl plik

@ -38,7 +38,7 @@ Ubuntu PPA https://launchpad.net/~sane-project/+archive/ubuntu/sane-release
sudo add-apt-repository ppa:sane-project/sane-release
sudo apt update
apt install libsane libsane-common sane-utils
sudo apt install libsane libsane-common sane-utils
Prerequisites

Wyświetl plik

@ -248,8 +248,16 @@ AC_DEFUN([SANE_CHECK_PTHREAD],
AC_DEFINE(PTHREAD_T_IS_INTEGER, 1,
[Define if pthread_t is integer.])
else
# Until the sanei_thread implementation is fixed.
use_pthread=no
case "$host_os" in
darwin*)
# Always use pthreads on macOS
use_pthread=yes
;;
*)
# Until the sanei_thread implementation is fixed.
use_pthread=no
;;
esac
fi
if test "$have_pthread" = "yes" ; then
@ -471,6 +479,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
if test "$ipv6" != "no" ; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h> ]], [[
/* AF_INET6 available check */
@ -492,6 +501,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h> ]], [[
/* test if the ss_family member exists in struct sockaddr_storage */
@ -504,6 +514,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h> ]], [[
/* test if the __ss_family member exists in struct sockaddr_storage */

Wyświetl plik

@ -2,6 +2,20 @@
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
# When repos are forked on GitLab tags aren't copied thus making
# git-version-gen producing incorrect version ("UNKNOWN") which in turn causes
# CI build failures. To workaround this reconstruct version from ChangeLogs
# files (handy updated on every release). If git describe is not working and we
# are not in dist package - take version from the top-most ChangeLog file.
if [ ! -e .tarball-version ] &&
! git describe >/dev/null 2>&1; then
ls ChangeLogs \
| sort -Vr \
| grep -m1 -P -o '(?<=ChangeLog-).*' > .tarball-version
read v < .tarball-version
echo >&2 "Package version reconstructed from ChangeLog: $v"
fi
patchdir="$srcdir/patches"
# Suppress warnings about obsolete macros if still needed (#122)

Wyświetl plik

@ -75,8 +75,8 @@ BACKEND_CONFS= abaton.conf agfafocus.conf apple.conf artec.conf \
epson.conf epsonds.conf escl.conf fujitsu.conf genesys.conf \
gphoto2.conf gt68xx.conf hp3900.conf hp4200.conf hp5400.conf \
hp.conf hpsj5s.conf hs2p.conf ibm.conf kodak.conf kodakaio.conf\
kvs1025.conf \
leo.conf lexmark.conf ma1509.conf magicolor.conf \
kvs1025.conf leo.conf lexmark.conf lexmark_x2600.conf \
ma1509.conf magicolor.conf \
matsushita.conf microtek2.conf microtek.conf mustek.conf \
mustek_pp.conf mustek_usb.conf nec.conf net.conf \
p5.conf \
@ -173,7 +173,7 @@ be_convenience_libs = libabaton.la libagfafocus.la \
libhp5400.la libhp5590.la libhpljm1005.la \
libhpsj5s.la libhs2p.la libibm.la libkodak.la libkodakaio.la\
libkvs1025.la libkvs20xx.la libkvs40xx.la \
libleo.la liblexmark.la libma1509.la libmagicolor.la \
libleo.la liblexmark.la liblexmark_x2600.la libma1509.la libmagicolor.la \
libmatsushita.la libmicrotek.la libmicrotek2.la \
libmustek.la libmustek_pp.la libmustek_usb.la \
libmustek_usb2.la libnec.la libnet.la \
@ -208,7 +208,7 @@ be_dlopen_libs = libsane-abaton.la libsane-agfafocus.la \
libsane-hpsj5s.la libsane-hs2p.la libsane-ibm.la libsane-kodak.la libsane-kodakaio.la\
libsane-kvs1025.la libsane-kvs20xx.la libsane-kvs40xx.la \
libsane-leo.la \
libsane-lexmark.la libsane-ma1509.la libsane-magicolor.la \
libsane-lexmark.la libsane-lexmark_x2600.la libsane-ma1509.la libsane-magicolor.la \
libsane-matsushita.la libsane-microtek.la libsane-microtek2.la \
libsane-mustek.la libsane-mustek_pp.la libsane-mustek_usb.la \
libsane-mustek_usb2.la libsane-nec.la libsane-net.la \
@ -1147,6 +1147,22 @@ EXTRA_DIST += lexmark.conf.in
# TODO: Why are these distributed but not compiled?
EXTRA_DIST += lexmark_models.c lexmark_sensors.c
liblexmark_x2600_la_SOURCES = lexmark_x2600.c lexmark_x2600.h
liblexmark_x2600_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=lexmark_x2600
nodist_libsane_lexmark_x2600_la_SOURCES = lexmark_x2600-s.c
libsane_lexmark_x2600_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=lexmark_x2600
libsane_lexmark_x2600_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
libsane_lexmark_x2600_la_LIBADD = $(COMMON_LIBS) \
liblexmark_x2600.la \
../sanei/sanei_init_debug.lo \
../sanei/sanei_constrain_value.lo \
../sanei/sanei_config.lo \
sane_strstatus.lo \
../sanei/sanei_usb.lo \
$(USB_LIBS) $(RESMGR_LIBS)
EXTRA_DIST += lexmark_x2600.conf.in
libma1509_la_SOURCES = ma1509.c ma1509.h
libma1509_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=ma1509

Wyświetl plik

@ -3769,7 +3769,7 @@ static SANE_Status
get_accessories_info (Avision_Scanner* s)
{
Avision_Device* dev = s->hw;
int try = 3;
int try = 1;
/* read stuff */
struct command_read rcmd;
@ -3811,47 +3811,84 @@ get_accessories_info (Avision_Scanner* s)
result [2],
adf_model[ (result[2] < adf_models) ? result[2] : adf_models ]);
dev->inquiry_adf |= result [0];
/*
* Cope with ADF presence flag being present but the device *not* reporting
* ADF capability. Maybe there are some devices that do that? [RL]
*
*/
dev->inquiry_adf_present = result [0];
/*
* Note: this feature_type check is a bit of a hack.
* Only the HP Scanjet 8200 series supports this so it is code
* specific to this family of scanners. [RL]
*
*/
if (dev->hw->feature_type & AV_ADF_FLIPPING_DUPLEX)
{
if (result[0] == 1)
{
dev->inquiry_duplex = 1;
dev->inquiry_duplex_interlaced = 0;
} else if (result[0] == 0 && result[2] != 0 && !skip_adf) {
/* Sometimes the scanner will report that there is no ADF attached, yet
* an ADF model number will still be reported. This happens on the
* HP8200 series and possibly others. In this case we need to reset the
* the adf and try reading it again. Skip this if the configuration says
* to do so, so that we don't fail out the scanner as being broken and
* unsupported if there isn't actually an ADF present.
*/
DBG (3, "get_accessories_info: Found ADF model number but the ADF-present flag is not set. Trying to recover...\n");
status = adf_reset (s);
if (status != SANE_STATUS_GOOD) {
DBG (3, "get_accessories_info: Failed to reset ADF: %s\n", sane_strstatus (status));
return status;
}
DBG (1, "get_accessories_info: Waiting while ADF firmware resets...\n");
sleep(3);
status = wait_ready (&s->av_con, 1);
if (status != SANE_STATUS_GOOD) {
DBG (1, "get_accessories_info: wait_ready() failed: %s\n", sane_strstatus (status));
return status;
}
if (try) {
try--;
goto RETRY;
}
DBG (1, "get_accessories_info: Maximum retries attempted, ADF unresponsive.\n");
return SANE_STATUS_UNSUPPORTED;
if (result[0] == 1)
{
dev->inquiry_duplex = 1;
dev->inquiry_duplex_interlaced = 0;
}
else if (result[0] == 0 && result[2] != 0 && !skip_adf)
{
/* Sometimes the scanner will report that there is no ADF attached, yet
* an ADF model number will still be reported. This happens on the
* HP8200 series and possibly others. In this case we need to reset the
* the adf and try reading it again. Skip this if the configuration says
* to do so, so that we don't fail out the scanner as being broken and
* unsupported if there isn't actually an ADF present.
*
* Note further: Some models (like the ScanJet 8300) report that they have ADF
* *capability* in the INQUIRY response but that doesn't necessarily mean that
* an ADF is plugged in. In my case it has the lightbox accessory instead and
* result[0] == FALSE.
* Trying to reset the ADF 3 times is excessive and takes an unreasonable amount
* of time on the 8300 with no ADF plugged in, so let's do it just once and if
* it fails to report presence, then don't assume it is an error, just that
* there is no ADF. [RL]
*
*/
if (!try)
{
DBG (
1,
"get_accessories_info: Maximum retries attempted, ADF unresponsive.\n");
dev->inquiry_adf_present = SANE_FALSE;
//return SANE_STATUS_UNSUPPORTED;
}
else
{
try--;
DBG(3,
"get_accessories_info: Found ADF model number but the ADF-present flag is not set. "
"Trying to reset the ADF just in case it is there but unresponsive...\n");
status = adf_reset (s);
if (status != SANE_STATUS_GOOD)
{
DBG (3, "get_accessories_info: Failed to reset ADF: %s\n", sane_strstatus (status));
return status;
}
DBG(1,"get_accessories_info: Waiting while ADF firmware resets...\n");
sleep (3);
status = wait_ready (&s->av_con, 1);
if (status != SANE_STATUS_GOOD)
{
DBG (1, "get_accessories_info: wait_ready() failed: %s\n",
sane_strstatus (status));
return status;
}
goto RETRY;
}
}
}
}
/* only honor a 1, some scanner without adapter set 0xff */
if (result[1] == 1)
dev->inquiry_light_box = 1;
dev->inquiry_light_box_present = 1;
return SANE_STATUS_GOOD;
}
@ -4336,41 +4373,82 @@ attach (SANE_String_Const devname, Avision_ConnectionType con_type,
model_num = 0;
found = 0;
/* while not at at end of list NULL terminator */
while (Avision_Device_List[model_num].real_mfg != NULL ||
Avision_Device_List[model_num].scsi_mfg != NULL)
{
int matches = 0, match_count = 0; /* count number of matches */
DBG (1, "attach: Checking model: %d\n", model_num);
if (Avision_Device_List[model_num].scsi_mfg) {
++match_count;
if (strcmp(mfg, Avision_Device_List[model_num].scsi_mfg) == 0)
++matches;
}
if (Avision_Device_List[model_num].scsi_model) {
++match_count;
if (strcmp(model, Avision_Device_List[model_num].scsi_model) == 0)
++matches;
}
/*
* Search for a matching device in the device list.
* Primarily we need two matches for SCSI devices.
* However, multiple USB device entries share the same
* SCSI info. For USB devices, we will also do a mandatory
* USB Product/Vendor check to pick the right one. Otherwise
* at the very least the device name is incorrect.
*
*/
SANE_Word usb_vendor = 0;
SANE_Word usb_product = 0;
/* we need 2 matches (mfg, model) for SCSI entries, or the ones available
for "we know what we are looking for" USB entries */
if ((attaching_hw == &(Avision_Device_List [model_num]) &&
matches == match_count) ||
matches == 2)
if (con_type == AV_USB)
{
DBG (1, "attach: Scanner matched entry: %d: \"%s\", \"%s\", 0x%.4x, 0x%.4x\n",
model_num,
Avision_Device_List[model_num].scsi_mfg,
Avision_Device_List[model_num].scsi_model,
Avision_Device_List[model_num].usb_vendor,
Avision_Device_List[model_num].usb_product);
found = 1;
break;
status = sanei_usb_get_vendor_product_byname (devname, &usb_vendor, &usb_product);
if (status != SANE_STATUS_GOOD)
{
DBG (0, "attach: Could not retrieve USB vendor nor product for USB device.\n");
status = SANE_STATUS_INVAL;
goto close_scanner_and_return;
}
}
/* while not at at end of list NULL terminator */
while (Avision_Device_List[model_num].real_mfg != NULL
|| Avision_Device_List[model_num].scsi_mfg != NULL)
{
int matches = 0, match_count = 0; /* count number of matches */
DBG (1, "attach: Checking model: %d\n", model_num);
if (Avision_Device_List[model_num].scsi_mfg)
{
++match_count;
if (strcmp (mfg, Avision_Device_List[model_num].scsi_mfg) == 0)
++matches;
}
if (Avision_Device_List[model_num].scsi_model)
{
++match_count;
if (strcmp (model, Avision_Device_List[model_num].scsi_model) == 0)
++matches;
}
/*
* Must match on USB vendor product also for USB devices.
* We will *always* know the vendor and product for USB devices.
*
*/
if (con_type == AV_USB)
{
++match_count;
if ((Avision_Device_List[model_num].usb_product == usb_product)
&& (Avision_Device_List[model_num].usb_vendor == usb_vendor))
{
++matches;
}
}
/* we need 2 matches (mfg, model) for SCSI entries, or the ones available
for "we know what we are looking for" USB entries */
if ((attaching_hw == &(Avision_Device_List[model_num]))
&& (matches == match_count))
{
DBG (
1,
"attach: Scanner matched entry: %d: \"%s\", \"%s\", 0x%.4x, 0x%.4x\n",
model_num, Avision_Device_List[model_num].scsi_mfg,
Avision_Device_List[model_num].scsi_model,
Avision_Device_List[model_num].usb_vendor,
Avision_Device_List[model_num].usb_product);
found = 1;
break;
}
++model_num;
}
++model_num;
}
if (!found) {
DBG (0, "attach: \"%s\" - \"%s\" not yet in whitelist!\n", mfg, model);
@ -4543,7 +4621,7 @@ get_double ( &(result[48] ) ));
DBG (3, "attach: [62] scanner type:%s%s%s%s%s%s\n",
BIT(result[62],7)?" Flatbed":"",
BIT(result[62],6)?" Roller (ADF)":"",
BIT(result[62],5)?" Flatbed (ADF)":"",
BIT(result[62],5)?" Flatbed (ADF/Lightbox)":"",
BIT(result[62],4)?" Roller":"", /* does not feed multiple pages, AV25 */
BIT(result[62],3)?" Film scanner":"",
BIT(result[62],2)?" Duplex":"");
@ -4643,7 +4721,7 @@ get_double ( &(result[48] ) ));
dev->inquiry_nvram_read = BIT(result[52],0);
dev->inquiry_power_save_time = BIT(result[52],1);
dev->inquiry_adf = BIT (result[62], 5);
dev->inquiry_adf_capability = BIT (result[62], 5);
dev->inquiry_duplex = BIT (result[62], 2) || BIT (result[94], 5);
dev->inquiry_duplex_interlaced = BIT(result[62],2) || BIT (result[94], 4);
/* the first avision scanners (AV3200) do not set the interlaced bit */
@ -5147,10 +5225,10 @@ additional_probe (Avision_Scanner* s)
{
add_source_mode (dev, AV_NORMAL, "Normal");
if (dev->inquiry_light_box)
if (dev->inquiry_light_box_present)
add_source_mode (dev, AV_TRANSPARENT, "Transparency");
if (dev->inquiry_adf)
if (dev->inquiry_adf_present)
add_source_mode (dev, AV_ADF, "ADF Front");
}
@ -6956,10 +7034,18 @@ init_options (Avision_Scanner* s)
memset (s->opt, 0, sizeof (s->opt));
memset (s->val, 0, sizeof (s->val));
for (i = 0; i < NUM_OPTIONS; ++ i) {
s->opt[i].size = sizeof (SANE_Word);
s->opt[i].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
}
/*
* Set defaults for all the options.
*
*/
for (i = 0; i < NUM_OPTIONS; ++i)
{
s->opt[i].name = "";
s->opt[i].desc = "";
s->opt[i].unit = SANE_UNIT_NONE;
s->opt[i].size = sizeof(SANE_Word);
s->opt[i].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
}
/* Init the SANE option from the scanner inquiry data */
@ -6989,9 +7075,7 @@ init_options (Avision_Scanner* s)
dev->speed_range.max = (SANE_Int)4;
dev->speed_range.quant = (SANE_Int)1;
s->opt[OPT_NUM_OPTS].name = "";
s->opt[OPT_NUM_OPTS].title = SANE_TITLE_NUM_OPTIONS;
s->opt[OPT_NUM_OPTS].desc = "";
s->opt[OPT_NUM_OPTS].cap = SANE_CAP_SOFT_DETECT;
s->opt[OPT_NUM_OPTS].type = SANE_TYPE_INT;
s->opt[OPT_NUM_OPTS].size = sizeof(SANE_TYPE_INT);
@ -6999,7 +7083,6 @@ init_options (Avision_Scanner* s)
/* "Mode" group: */
s->opt[OPT_MODE_GROUP].title = SANE_TITLE_SCAN_MODE;
s->opt[OPT_MODE_GROUP].desc = ""; /* for groups only title and type are valid */
s->opt[OPT_MODE_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_MODE_GROUP].cap = 0;
s->opt[OPT_MODE_GROUP].size = 0;
@ -7063,7 +7146,6 @@ init_options (Avision_Scanner* s)
/* "Geometry" group: */
s->opt[OPT_GEOMETRY_GROUP].title = "Geometry";
s->opt[OPT_GEOMETRY_GROUP].desc = ""; /* for groups only title and type are valid */
s->opt[OPT_GEOMETRY_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_GEOMETRY_GROUP].cap = SANE_CAP_ADVANCED;
s->opt[OPT_GEOMETRY_GROUP].size = 0;
@ -7111,8 +7193,8 @@ init_options (Avision_Scanner* s)
/* overscan top */
s->opt[OPT_OVERSCAN_TOP].name = "overscan-top";
s->opt[OPT_OVERSCAN_TOP].title = "Overscan top";
s->opt[OPT_OVERSCAN_TOP].desc = "The top overscan controls the additional area to scan before the paper is detected.";
s->opt[OPT_OVERSCAN_TOP].title = SANE_TITLE_OVERSCAN_TOP;
s->opt[OPT_OVERSCAN_TOP].desc = SANE_DESC_OVERSCAN_TOP;
s->opt[OPT_OVERSCAN_TOP].type = SANE_TYPE_FIXED;
s->opt[OPT_OVERSCAN_TOP].unit = SANE_UNIT_MM;
s->opt[OPT_OVERSCAN_TOP].constraint_type = SANE_CONSTRAINT_RANGE;
@ -7121,8 +7203,8 @@ init_options (Avision_Scanner* s)
/* overscan bottom */
s->opt[OPT_OVERSCAN_BOTTOM].name = "overscan-bottom";
s->opt[OPT_OVERSCAN_BOTTOM].title = "Overscan bottom";
s->opt[OPT_OVERSCAN_BOTTOM].desc = "The bottom overscan controls the additional area to scan after the paper end is detected.";
s->opt[OPT_OVERSCAN_BOTTOM].title = SANE_TITLE_OVERSCAN_BOTTOM;
s->opt[OPT_OVERSCAN_BOTTOM].desc = SANE_DESC_OVERSCAN_BOTTOM;
s->opt[OPT_OVERSCAN_BOTTOM].type = SANE_TYPE_FIXED;
s->opt[OPT_OVERSCAN_BOTTOM].unit = SANE_UNIT_MM;
s->opt[OPT_OVERSCAN_BOTTOM].constraint_type = SANE_CONSTRAINT_RANGE;
@ -7136,8 +7218,8 @@ init_options (Avision_Scanner* s)
/* background raster */
s->opt[OPT_BACKGROUND].name = "background-lines";
s->opt[OPT_BACKGROUND].title = "Background raster lines";
s->opt[OPT_BACKGROUND].desc = "The background raster controls the additional background lines to scan before the paper is feed through the scanner.";
s->opt[OPT_BACKGROUND].title = SANE_TITLE_BACKGROUND_LINES;
s->opt[OPT_BACKGROUND].desc = SANE_DESC_BACKGROUND_LINES;
s->opt[OPT_BACKGROUND].type = SANE_TYPE_INT;
s->opt[OPT_BACKGROUND].unit = SANE_UNIT_PIXEL;
s->opt[OPT_BACKGROUND].constraint_type = SANE_CONSTRAINT_RANGE;
@ -7149,8 +7231,7 @@ init_options (Avision_Scanner* s)
}
/* "Enhancement" group: */
s->opt[OPT_ENHANCEMENT_GROUP].title = "Enhancement";
s->opt[OPT_ENHANCEMENT_GROUP].desc = ""; /* for groups only title and type are valid */
s->opt[OPT_ENHANCEMENT_GROUP].title = SANE_TITLE_ENHANCEMENT;
s->opt[OPT_ENHANCEMENT_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_ENHANCEMENT_GROUP].cap = 0;
s->opt[OPT_ENHANCEMENT_GROUP].size = 0;
@ -7182,8 +7263,8 @@ init_options (Avision_Scanner* s)
/* Quality Scan */
s->opt[OPT_QSCAN].name = "quality-scan";
s->opt[OPT_QSCAN].title = "Quality scan";
s->opt[OPT_QSCAN].desc = "Turn on quality scanning (slower but better).";
s->opt[OPT_QSCAN].title = SANE_TITLE_QUALITY_SCAN;
s->opt[OPT_QSCAN].desc = SANE_DESC_QUALITY_SCAN;
s->opt[OPT_QSCAN].type = SANE_TYPE_BOOL;
s->opt[OPT_QSCAN].unit = SANE_UNIT_NONE;
s->val[OPT_QSCAN].w = SANE_TRUE;
@ -7262,8 +7343,8 @@ init_options (Avision_Scanner* s)
/* exposure */
s->opt[OPT_EXPOSURE].name = "exposure";
s->opt[OPT_EXPOSURE].title = "Exposure";
s->opt[OPT_EXPOSURE].desc = "Manual exposure adjustment.";
s->opt[OPT_EXPOSURE].title = SANE_TITLE_MANUAL_EXPOSURE;
s->opt[OPT_EXPOSURE].desc = SANE_DESC_MANUAL_EXPOSURE;
s->opt[OPT_EXPOSURE].type = SANE_TYPE_INT;
s->opt[OPT_EXPOSURE].unit = SANE_UNIT_PERCENT;
s->opt[OPT_EXPOSURE].constraint_type = SANE_CONSTRAINT_RANGE;
@ -7276,8 +7357,8 @@ init_options (Avision_Scanner* s)
/* Multi sample */
s->opt[OPT_MULTISAMPLE].name = "multi-sample";
s->opt[OPT_MULTISAMPLE].title = "Multi-sample";
s->opt[OPT_MULTISAMPLE].desc = "Enable multi-sample scan mode.";
s->opt[OPT_MULTISAMPLE].title = SANE_TITLE_MULTI_SAMPLE;
s->opt[OPT_MULTISAMPLE].desc = SANE_DESC_MULTI_SAMPLE;
s->opt[OPT_MULTISAMPLE].type = SANE_TYPE_BOOL;
s->opt[OPT_MULTISAMPLE].unit = SANE_UNIT_NONE;
s->val[OPT_MULTISAMPLE].w = SANE_FALSE;
@ -7289,9 +7370,9 @@ init_options (Avision_Scanner* s)
}
/* Infra-red */
s->opt[OPT_IR].name = "infra-red";
s->opt[OPT_IR].title = "Infra-red";
s->opt[OPT_IR].desc = "Enable infra-red scan mode.";
s->opt[OPT_IR].name = SANE_NAME_INFRARED;
s->opt[OPT_IR].title = SANE_TITLE_INFRARED;
s->opt[OPT_IR].desc = SANE_DESC_INFRARED;
s->opt[OPT_IR].type = SANE_TYPE_BOOL;
s->opt[OPT_IR].unit = SANE_UNIT_NONE;
s->val[OPT_IR].w = SANE_FALSE;
@ -7303,16 +7384,13 @@ init_options (Avision_Scanner* s)
}
/* "MISC" group: */
s->opt[OPT_MISC_GROUP].title = SANE_TITLE_SCAN_MODE;
s->opt[OPT_MISC_GROUP].desc = ""; /* for groups only title and type are valid */
s->opt[OPT_MISC_GROUP].title = SANE_TITLE_MISC_GROUP;
s->opt[OPT_MISC_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_MISC_GROUP].cap = 0;
s->opt[OPT_MISC_GROUP].size = 0;
s->opt[OPT_MISC_GROUP].constraint_type = SANE_CONSTRAINT_NONE;
/* film holder control */
if (dev->scanner_type != AV_FILM)
s->opt[OPT_FRAME].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_FRAME].name = SANE_NAME_FRAME;
s->opt[OPT_FRAME].title = SANE_TITLE_FRAME;
s->opt[OPT_FRAME].desc = SANE_DESC_FRAME;
@ -7321,22 +7399,24 @@ init_options (Avision_Scanner* s)
s->opt[OPT_FRAME].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_FRAME].constraint.range = &dev->frame_range;
s->val[OPT_FRAME].w = dev->current_frame;
if (dev->scanner_type != AV_FILM)
s->opt[OPT_FRAME].cap |= SANE_CAP_INACTIVE;
/* power save time */
if (!dev->inquiry_power_save_time)
s->opt[OPT_POWER_SAVE_TIME].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_POWER_SAVE_TIME].name = "power-save-time";
s->opt[OPT_POWER_SAVE_TIME].title = "Power save timer control";
s->opt[OPT_POWER_SAVE_TIME].desc = "Allows control of the scanner's power save timer, dimming or turning off the light.";
s->opt[OPT_POWER_SAVE_TIME].title = SANE_TITLE_POWER_SAVE_TIME;
s->opt[OPT_POWER_SAVE_TIME].desc = SANE_DESC_POWER_SAVE_TIME;
s->opt[OPT_POWER_SAVE_TIME].type = SANE_TYPE_INT;
s->opt[OPT_POWER_SAVE_TIME].unit = SANE_UNIT_NONE;
s->opt[OPT_POWER_SAVE_TIME].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_POWER_SAVE_TIME].w = 0;
if (!dev->inquiry_power_save_time)
s->opt[OPT_POWER_SAVE_TIME].cap |= SANE_CAP_INACTIVE;
/* message, like options set on the scanner, LED no. & co */
s->opt[OPT_MESSAGE].name = "message";
s->opt[OPT_MESSAGE].title = "message text from the scanner";
s->opt[OPT_MESSAGE].desc = "This text contains device specific options controlled by the user on the scanner hardware.";
s->opt[OPT_MESSAGE].title = SANE_TITLE_OPTIONS_MSG;
s->opt[OPT_MESSAGE].desc = SANE_DESC_OPTIONS_MSG;
s->opt[OPT_MESSAGE].type = SANE_TYPE_STRING;
s->opt[OPT_MESSAGE].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
s->opt[OPT_MESSAGE].size = 129;
@ -7345,44 +7425,73 @@ init_options (Avision_Scanner* s)
s->val[OPT_MESSAGE].s[0] = 0;
/* NVRAM */
s->opt[OPT_NVRAM].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
if (!dev->inquiry_nvram_read)
s->opt[OPT_NVRAM].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_NVRAM].name = "nvram-values";
s->opt[OPT_NVRAM].title = "Obtain NVRAM values";
s->opt[OPT_NVRAM].desc = "Allows access obtaining the scanner's NVRAM values as pretty printed text.";
s->opt[OPT_NVRAM].title = SANE_TITLE_NVRAM;
s->opt[OPT_NVRAM].desc = SANE_DESC_NVRAM;
s->opt[OPT_NVRAM].type = SANE_TYPE_STRING;
s->opt[OPT_NVRAM].unit = SANE_UNIT_NONE;
s->opt[OPT_NVRAM].size = 1024;
s->opt[OPT_NVRAM].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_NVRAM].s = malloc((size_t) s->opt[OPT_NVRAM].size);
s->val[OPT_NVRAM].s[0] = 0;
s->opt[OPT_NVRAM].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
if (!dev->inquiry_nvram_read)
s->opt[OPT_NVRAM].cap |= SANE_CAP_INACTIVE;
/* paper_length */
s->opt[OPT_PAPERLEN].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
if (!dev->inquiry_paper_length)
s->opt[OPT_PAPERLEN].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_PAPERLEN].name = "paper-length";
s->opt[OPT_PAPERLEN].title = "Use paper length";
s->opt[OPT_PAPERLEN].desc = "Newer scanners can utilize this paper length to detect double feeds. However some others (DM152) can get confused during media flush if it is set.";
s->opt[OPT_PAPERLEN].title = SANE_TITLE_PAPER_LENGTH;
s->opt[OPT_PAPERLEN].desc = SANE_DESC_PAPER_LENGTH;
s->opt[OPT_PAPERLEN].type = SANE_TYPE_BOOL;
s->opt[OPT_PAPERLEN].unit = SANE_UNIT_NONE;
s->opt[OPT_PAPERLEN].size = sizeof(SANE_Word);
s->opt[OPT_PAPERLEN].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_PAPERLEN].w = SANE_FALSE;
s->opt[OPT_PAPERLEN].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
if (!dev->inquiry_paper_length)
s->opt[OPT_PAPERLEN].cap |= SANE_CAP_INACTIVE;
/* ADF page flipping */
s->opt[OPT_ADF_FLIP].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_AUTOMATIC | SANE_CAP_ADVANCED;
if (!(s->hw->hw->feature_type & AV_ADF_FLIPPING_DUPLEX && s->source_mode == AV_ADF_DUPLEX))
s->opt[OPT_ADF_FLIP].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_ADF_FLIP].name = "flip-page";
s->opt[OPT_ADF_FLIP].title = "Flip document after duplex scanning";
s->opt[OPT_ADF_FLIP].desc = "Tells page-flipping document scanners to flip the paper back to its original orientation before dropping it in the output tray. Turning this off might make scanning a little faster if you don't care about manually flipping the pages afterwards.";
s->opt[OPT_ADF_FLIP].title = SANE_TITLE_FLIP_PAGE;
s->opt[OPT_ADF_FLIP].desc = SANE_DESC_FLIP_PAGE;
s->opt[OPT_ADF_FLIP].type = SANE_TYPE_BOOL;
s->opt[OPT_ADF_FLIP].unit = SANE_UNIT_NONE;
s->opt[OPT_ADF_FLIP].size = sizeof(SANE_Word);
s->opt[OPT_ADF_FLIP].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_ADF_FLIP].w = SANE_TRUE;
s->opt[OPT_ADF_FLIP].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_AUTOMATIC | SANE_CAP_ADVANCED;
if (!((s->hw->hw->feature_type & AV_ADF_FLIPPING_DUPLEX) && (s->source_mode == AV_ADF_DUPLEX)))
s->opt[OPT_ADF_FLIP].cap |= SANE_CAP_INACTIVE;
/* "Options" group: */
s->opt[OPT_OPTIONS_GROUP].title = SANE_TITLE_INSTALLED_OPTS_GROUP;
s->opt[OPT_OPTIONS_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_OPTIONS_GROUP].cap = 0;
s->opt[OPT_OPTIONS_GROUP].size = 0;
s->opt[OPT_OPTIONS_GROUP].constraint_type = SANE_CONSTRAINT_NONE;
/* ADF Installed */
s->opt[OPT_OPTION_ADF].name = "adf-installed";
s->opt[OPT_OPTION_ADF].title = SANE_TITLE_ADF_INSTALLED;
s->opt[OPT_OPTION_ADF].desc = SANE_DESC_ADF_INSTALLED;
s->opt[OPT_OPTION_ADF].type = SANE_TYPE_BOOL;
s->opt[OPT_OPTION_ADF].unit = SANE_UNIT_NONE;
s->opt[OPT_OPTION_ADF].size = sizeof(SANE_Word);
s->opt[OPT_OPTION_ADF].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_OPTION_ADF].w = dev->inquiry_adf_present;
s->opt[OPT_OPTION_ADF].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
/* Lightbox Installed */
s->opt[OPT_OPTION_LIGHTBOX].name = "lightbox-installed";
s->opt[OPT_OPTION_LIGHTBOX].title = SANE_TITLE_LIGHTBOX_INSTALLED;
s->opt[OPT_OPTION_LIGHTBOX].desc = SANE_DESC_LIGHTBOX_INSTALLED;
s->opt[OPT_OPTION_LIGHTBOX].type = SANE_TYPE_BOOL;
s->opt[OPT_OPTION_LIGHTBOX].unit = SANE_UNIT_NONE;
s->opt[OPT_OPTION_LIGHTBOX].size = sizeof(SANE_Word);
s->opt[OPT_OPTION_LIGHTBOX].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_OPTION_LIGHTBOX].w = dev->inquiry_light_box_present;
s->opt[OPT_OPTION_LIGHTBOX].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
return SANE_STATUS_GOOD;
}
@ -7411,7 +7520,6 @@ reader_process (void *data)
sigset_t sigterm_set;
sigset_t ignore_set;
struct SIGACTION act;
int old;
FILE* fp;
FILE* fp_fd = 0; /* for ADF bottom offset truncating */
@ -7691,7 +7799,10 @@ reader_process (void *data)
sigprocmask (SIG_BLOCK, &sigterm_set, 0);
#ifdef USE_PTHREAD
else
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old);
{
int old;
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old);
}
#endif
status = read_data (s, stripe_data + stripe_fill, &this_read);
@ -7700,10 +7811,12 @@ reader_process (void *data)
sigprocmask (SIG_UNBLOCK, &sigterm_set, 0);
#ifdef USE_PTHREAD
else
pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old);
{
int old;
pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old);
}
#endif
/* only EOF on the second stripe, as otherwise the rear page
is shorter */
if (status == SANE_STATUS_EOF && deinterlace == STRIPE) {
@ -8908,6 +9021,12 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
strcpy (val, s->val[option].s);
return SANE_STATUS_GOOD;
/* Boolean options. */
case OPT_OPTION_ADF:
case OPT_OPTION_LIGHTBOX:
*(SANE_Bool*) val = s->val[option].b;
return SANE_STATUS_GOOD;
} /* end switch option */
} /* end if GET_ACTION_GET_VALUE */
else if (action == SANE_ACTION_SET_VALUE)

Wyświetl plik

@ -66,6 +66,65 @@ typedef enum Avision_ConnectionType {
AV_USB
} Avision_ConnectionType;
/*
* Translatable custom options text.
*
*/
#define SANE_TITLE_MISC_GROUP SANE_I18N("Miscellaneous")
#define SANE_TITLE_INSTALLED_OPTS_GROUP SANE_I18N("Installed options")
#define SANE_TITLE_OVERSCAN_TOP SANE_I18N("Overscan top")
#define SANE_TITLE_OVERSCAN_BOTTOM SANE_I18N("Overscan bottom")
#define SANE_TITLE_BACKGROUND_LINES SANE_I18N("Background raster lines")
#define SANE_TITLE_QUALITY_SCAN SANE_I18N("Quality scan")
#define SANE_TITLE_MANUAL_EXPOSURE SANE_I18N("Exposure")
#define SANE_TITLE_MULTI_SAMPLE SANE_I18N("Multi-sample")
#define SANE_TITLE_POWER_SAVE_TIME SANE_I18N("Power save timer control")
#define SANE_TITLE_OPTIONS_MSG SANE_I18N("Message text from the scanner")
#define SANE_TITLE_NVRAM SANE_I18N("Obtain NVRAM values")
#define SANE_TITLE_PAPER_LENGTH SANE_I18N("Use paper length")
#define SANE_TITLE_FLIP_PAGE SANE_I18N("Flip document after duplex scanning")
#define SANE_TITLE_ADF_INSTALLED SANE_I18N("ADF installed")
#define SANE_TITLE_LIGHTBOX_INSTALLED SANE_I18N("Lightbox installed")
#define SANE_DESC_OVERSCAN_TOP \
SANE_I18N("The top overscan controls the additional area to scan before the "\
"paper is detected.")
#define SANE_DESC_OVERSCAN_BOTTOM \
SANE_I18N("The bottom overscan controls the additional area to scan after "\
"the paper end is detected.")
#define SANE_DESC_BACKGROUND_LINES \
SANE_I18N("The background raster controls the additional background lines to "\
"scan before the paper is feed through the scanner.")
#define SANE_DESC_QUALITY_SCAN \
SANE_I18N("Turn on quality scanning (slower but better).")
#define SANE_DESC_MANUAL_EXPOSURE \
SANE_I18N("Manual exposure adjustment.")
#define SANE_DESC_MULTI_SAMPLE \
SANE_I18N("Enable multi-sample scan mode.")
#define SANE_DESC_POWER_SAVE_TIME \
SANE_I18N("Allows control of the scanner's power save timer, dimming or "\
"turning off the light.")
#define SANE_DESC_OPTIONS_MSG \
SANE_I18N("This text contains device specific options controlled by the "\
"user on the scanner hardware.")
#define SANE_DESC_NVRAM \
SANE_I18N("Allows access obtaining the scanner's NVRAM values as pretty "\
"printed text.")
#define SANE_DESC_PAPER_LENGTH \
SANE_I18N("Newer scanners can utilize this paper length to detect double feeds. "\
"However some others (DM152) can get confused during media flush if it is set.")
#define SANE_DESC_FLIP_PAGE \
SANE_I18N("Tells page-flipping document scanners to flip the paper back to its "\
"original orientation before dropping it in the output tray. "\
"Turning this off might make scanning a little faster if you don't "\
"care about manually flipping the pages afterwards.")
#define SANE_DESC_ADF_INSTALLED \
SANE_I18N("ADF option is detected as installed.")
#define SANE_DESC_LIGHTBOX_INSTALLED \
SANE_I18N("Lightbox option is detected as installed.")
/* information needed for device access */
typedef struct Avision_Connection {
Avision_ConnectionType connection_type;
@ -336,6 +395,10 @@ enum Avision_Option
OPT_PAPERLEN, /* Use paper_length field to detect double feeds */
OPT_ADF_FLIP, /* For flipping duplex, reflip the document */
OPT_OPTIONS_GROUP,
OPT_OPTION_ADF, // ADF installed/detected?
OPT_OPTION_LIGHTBOX, // LightBox installed/detected?
NUM_OPTIONS /* must come last */
};
@ -398,8 +461,7 @@ typedef struct Avision_Device
SANE_Bool inquiry_nvram_read;
SANE_Bool inquiry_power_save_time;
SANE_Bool inquiry_light_box;
SANE_Bool inquiry_adf;
SANE_Bool inquiry_adf_capability;
SANE_Bool inquiry_duplex;
SANE_Bool inquiry_duplex_interlaced;
SANE_Bool inquiry_paper_length;
@ -419,6 +481,10 @@ typedef struct Avision_Device
SANE_Bool inquiry_light_control;
SANE_Bool inquiry_exposure_control;
// Determines from accessories query.
SANE_Bool inquiry_light_box_present;
SANE_Bool inquiry_adf_present;
int inquiry_max_shading_target;
SANE_Bool inquiry_button_control;
unsigned int inquiry_buttons;

Wyświetl plik

@ -359,6 +359,9 @@
- add support for reading the total and roller counters
v64 2022-11-18, CQ, MAN
- add complete support for imprinters on X10C (#585)
v65 2023-06-06, MAN
- fix imprinter support (#672)
- update attach_one and other init functions
SANE FLOW DIAGRAM
@ -411,7 +414,7 @@
#include "canon_dr.h"
#define DEBUG 1
#define BUILD 64
#define BUILD 65
/* values for SANE_DEBUG_CANON_DR env var:
- errors 5
@ -1007,23 +1010,19 @@ attach_one (const char *device_name, int connType)
/* this detects imprinters if they are available */
ret = init_imprinters (s);
if (ret != SANE_STATUS_GOOD) {
DBG (5, "attach_one: errors while trying to detect optional imprinters, continuing\n");
DBG (5, "attach_one: unable to init_imprinters, continuing\n");
}
/* enable/read the buttons */
ret = init_panel (s);
if (ret != SANE_STATUS_GOOD) {
disconnect_fd(s);
free (s);
DBG (5, "attach_one: model failed\n");
return ret;
DBG (5, "attach_one: unable init_panel, continuing\n");
}
/* enable/read the lifecycle counters */
ret = init_counters (s);
if (ret != SANE_STATUS_GOOD) {
DBG (5, "attach_one: unable to detect lifecycle counters, continuing\n");
return ret;
DBG (5, "attach_one: unable to init_counters, continuing\n");
}
/* sets SANE option 'values' to good defaults */
@ -1035,6 +1034,7 @@ attach_one (const char *device_name, int connType)
return ret;
}
/* sets the s->opt array to blank */
ret = init_options (s);
if (ret != SANE_STATUS_GOOD) {
disconnect_fd(s);
@ -1988,19 +1988,26 @@ init_imprinters (struct scanner *s)
{
SANE_Status ret = SANE_STATUS_GOOD;
s->has_pre_imprinter = 0;
s->has_post_imprinter = 0;
DBG (10, "init_imprinters: start\n");
/* check the pre imprinter first */
ret = detect_imprinter(s,R_PRE_IMPRINTER);
if(ret != SANE_STATUS_GOOD){
return ret;
if(ret == SANE_STATUS_GOOD){
DBG (15, "init_imprinters: preimprinter found\n");
s->has_pre_imprinter = 1;
}
ret = detect_imprinter(s,R_POST_IMPRINTER);
if(ret != SANE_STATUS_GOOD){
return ret;
/* these scanners only support one imprinter */
/* so only ask for postimp if preimp not found */
else if(ret == SANE_STATUS_UNSUPPORTED){
ret = detect_imprinter(s,R_POST_IMPRINTER);
if(ret == SANE_STATUS_GOOD){
DBG (15, "init_imprinters: postimprinter found\n");
s->has_post_imprinter = 1;
}
}
DBG (10, "init_imprinters: finish\n");
return ret;
}
@ -2018,7 +2025,6 @@ init_panel (struct scanner *s)
if(ret){
DBG (5, "init_panel: disabling read_panel\n");
s->can_read_panel = 0;
ret = SANE_STATUS_GOOD;
}
s->panel_enable_led = 1;
@ -2027,7 +2033,6 @@ init_panel (struct scanner *s)
if(ret){
DBG (5, "init_panel: disabling send_panel\n");
s->can_write_panel = 0;
ret = SANE_STATUS_GOOD;
}
DBG (10, "init_panel: finish\n");
@ -2049,7 +2054,6 @@ init_counters (struct scanner *s)
if(ret){
DBG (5, "init_counters: disabling lifecycle counters\n");
s->can_read_lifecycle_counters = 0;
return ret;
}
DBG (10, "init_counters: finish\n");
@ -5249,8 +5253,13 @@ load_imprinting_settings(struct scanner *s)
return ret;
}
/* look for a particular imprinter
* SANE_STATUS_GOOD = found
* SANE_STATUS_UNSUPPORTED = not found
* SANE_STATUS_INVAL = all other errors
*/
static SANE_Status
detect_imprinter(struct scanner *s,SANE_Int option)
detect_imprinter(struct scanner *s, SANE_Int imp_side)
{
SANE_Status ret = SANE_STATUS_GOOD;
@ -5260,12 +5269,12 @@ detect_imprinter(struct scanner *s,SANE_Int option)
unsigned char in[R_IMPRINTER_len];
size_t inLen = R_IMPRINTER_len;
DBG (10, "detect_imprinter: start %d\n", option);
DBG (10, "detect_imprinter: start %d\n", imp_side);
memset(cmd,0,cmdLen);
set_SCSI_opcode(cmd, READ_code);
set_R_datatype_code(cmd, SR_datatype_imprinters);
set_R_xfer_uid(cmd, option);
set_R_xfer_uid(cmd, imp_side);
set_R_xfer_length(cmd, inLen);
ret = do_cmd(
@ -5275,23 +5284,24 @@ detect_imprinter(struct scanner *s,SANE_Int option)
in, &inLen
);
if (ret == SANE_STATUS_GOOD || ret == SANE_STATUS_EOF) {
/* some scanners return eof for success, so we change it */
if (ret == SANE_STATUS_EOF) {
ret = SANE_STATUS_GOOD;
}
int imprinter_found = get_R_IMPRINTER_found(in);
const char* imprinter_type = "unknown";
if (option == R_PRE_IMPRINTER){
s->has_pre_imprinter = imprinter_found;
imprinter_type = "pre-imprinter";
}
else if (option == R_POST_IMPRINTER){
s->has_post_imprinter = imprinter_found;
imprinter_type = "post-imprinter";
/* failed commands are 'inval' */
if(ret){
DBG (15, "detect_imprinter: error, converting %d to invalid\n", ret);
ret = SANE_STATUS_INVAL;
}
DBG (10, "detect_imprinter: type: %s. found status bit: %d \n",imprinter_type,imprinter_found);
/* negative responses are 'unsupported' */
else if(!get_R_IMPRINTER_found(in)){
DBG (15, "detect_imprinter: not found, converting to unsupported\n");
ret = SANE_STATUS_UNSUPPORTED;
}
DBG (10, "detect_imprinter: finish %d\n", ret);
return ret;
}

Wyświetl plik

@ -1,5 +1,5 @@
/* sane - Scanner Access Now Easy.
Copyright (C) 1998 David F. Skoll
Copyright (C) 1998 Dianne Skoll
Heavily based on "hp.c" driver for HP Scanners, by
David Mosberger-Tang.

Wyświetl plik

@ -1,5 +1,5 @@
/* sane - Scanner Access Now Easy.
Copyright (C) 1998 David F. Skoll
Copyright (C) 1998 Dianne Skoll
This file is part of the SANE package.
This program is free software; you can redistribute it and/or

Wyświetl plik

@ -1774,10 +1774,16 @@ e2_ext_read(struct Epson_Scanner *s)
return status;
}
if (e2_dev_model(dev, "GT-8200") || e2_dev_model(dev, "Perfection1650")) {
/* See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597922#127 */
s->buf[buf_len] &= 0xc0;
}
/* Some scanners wrongly set FSG_STATUS_CANCEL_REQ. Mask it out.
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597922#127
* https://gitlab.com/sane-project/backends/-/issues/716
*/
if (e2_dev_model(dev, "GT-8200") || e2_dev_model(dev, "Perfection1650") ||
e2_dev_model(dev, "GT-10000") || e2_dev_model(dev, "ES-6000") ||
e2_dev_model(dev, "Perfection610") || e2_dev_model(dev, "GT-6600") ||
e2_dev_model(dev, "Perfection1200") || e2_dev_model(dev, "GT-7600") ||
e2_dev_model(dev, "Expression1600") || e2_dev_model(dev, "ES-2000"))
s->buf[buf_len] &= FSG_STATUS_FER | FSG_STATUS_NOT_READY;
if (s->buf[buf_len] & FSG_STATUS_CANCEL_REQ) {
DBG(0, "%s: cancel request received\n", __func__);

Wyświetl plik

@ -172,6 +172,7 @@ SANE_Word sanei_epson_usb_product_ids[] = {
0x08ca, /* L850 Series */
0x08cd, /* WF-R4640 Series, WF-R5690 Series */
0x08d0, /* PX-M350F, WF-M5690 Series */
0x08d1, /* L360 Series */
0x08d2, /* L365 Series, L366 Series */
0x1102, /* PX-048A Series, XP-230 Series, XP-235 Series */
0x1105, /* ET-2500 Series, L375 Series */

Wyświetl plik

@ -1259,6 +1259,9 @@ const epsonds_profile_map epsonds_models_predefined[] = {
{0x118A, "PID 118A","L3250 Series", 7},
{0x119B, "PID 119B","XP-2150 Series", 7},
{0x11B1, "PID 11B1","XP-2200 Series", 7},
{0x0193, "ES-C220","ES-C220", 5},
{0x018F, "DS-C330","DS-C330", 5},
{0x0191, "DS-C490","DS-C490", 5},
{0x00, "","", 0x00 }
};
@ -1971,6 +1974,7 @@ init_options(epsonds_scanner *s)
}
/* "Geometry" group: */
s->opt[OPT_GEOMETRY_GROUP].name = "";
s->opt[OPT_GEOMETRY_GROUP].title = SANE_I18N("Geometry");
s->opt[OPT_GEOMETRY_GROUP].desc = "";
s->opt[OPT_GEOMETRY_GROUP].type = SANE_TYPE_GROUP;
@ -2020,6 +2024,7 @@ init_options(epsonds_scanner *s)
s->val[OPT_BR_Y].w = s->hw->y_range->max;
/* "Optional equipment" group: */
s->opt[OPT_EQU_GROUP].name = "";
s->opt[OPT_EQU_GROUP].title = SANE_I18N("Optional equipment");
s->opt[OPT_EQU_GROUP].desc = "";
s->opt[OPT_EQU_GROUP].type = SANE_TYPE_GROUP;
@ -2263,6 +2268,7 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
case OPT_BR_Y:
case OPT_DEPTH:
case OPT_ADF_SKEW:
case OPT_ADF_CRP:
*((SANE_Word *) value) = sval->w;
break;

Wyświetl plik

@ -621,16 +621,20 @@ sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only)
ESCL_Device *dev = NULL;
static const SANE_Device **devlist = 0;
SANE_Status status;
SANE_Status status2;
if (device_list == NULL)
return (SANE_STATUS_INVAL);
status = sanei_configure_attach(ESCL_CONFIG_FILE, NULL,
status2 = sanei_configure_attach(ESCL_CONFIG_FILE, NULL,
attach_one_config, NULL);
if (status != SANE_STATUS_GOOD)
return (status);
escl_devices(&status);
if (status != SANE_STATUS_GOOD)
return (status);
if (status != SANE_STATUS_GOOD && status2 != SANE_STATUS_GOOD)
{
if (status2 != SANE_STATUS_GOOD)
return (status2);
if (status != SANE_STATUS_GOOD)
return (status);
}
if (devlist)
free(devlist);
devlist = (const SANE_Device **) calloc (num_devices + 1, sizeof (devlist[0]));
@ -1341,7 +1345,7 @@ sane_cancel(SANE_Handle h)
}
handler->scanner->work = SANE_FALSE;
handler->cancel = SANE_TRUE;
escl_scanner(handler->device, handler->scanner->scanJob, handler->result);
escl_scanner(handler->device, handler->scanner->scanJob, handler->result, SANE_TRUE);
free(handler->result);
handler->result = NULL;
free(handler->scanner->scanJob);
@ -1562,6 +1566,7 @@ sane_start(SANE_Handle h)
handler->decompress_scan_data = SANE_FALSE;
handler->end_read = SANE_FALSE;
if (handler->scanner->work == SANE_FALSE) {
escl_reset_all_jobs(handler->device);
SANE_Status st = escl_status(handler->device,
handler->scanner->source,
NULL,

Wyświetl plik

@ -92,7 +92,7 @@ typedef struct {
typedef struct ESCL_Device {
struct ESCL_Device *next;
double version;
char *version;
char *model_name;
int port_nb;
char *ip_address;
@ -248,7 +248,11 @@ SANE_Status escl_scan(capabilities_t *scanner,
void escl_scanner(const ESCL_Device *device,
char *scanJob,
char *result);
char *result,
SANE_Bool status);
SANE_Status escl_reset_all_jobs(ESCL_Device *device);
typedef void CURL;

Wyświetl plik

@ -72,7 +72,7 @@ convert_elements(SANE_String_Const str)
return (SANE_VALUE_SCAN_MODE_GRAY);
else if (strcmp(str, "RGB24") == 0)
return (SANE_VALUE_SCAN_MODE_COLOR);
#if(defined HAVE_POPPLER_GLIB)
#if HAVE_POPPLER_GLIB
else if (strcmp(str, "BlackAndWhite1") == 0)
return (SANE_VALUE_SCAN_MODE_LINEART);
#endif
@ -201,8 +201,10 @@ find_valor_of_array_variables(xmlNode *node, capabilities_t *scanner, int type)
{
const char *name = (const char *)node->name;
if (strcmp(name, "ColorMode") == 0) {
#ifndef HAVE_POPPLER_GLIB
const char *color = (SANE_String_Const)xmlNodeGetContent(node);
if (type == PLATEN || strcmp(color, "BlackAndWhite1"))
if (strcmp(color, "BlackAndWhite1"))
#endif
scanner->caps[type].ColorModes = char_to_array(scanner->caps[type].ColorModes, &scanner->caps[type].ColorModesSize, (SANE_String_Const)xmlNodeGetContent(node), 1);
}
else if (strcmp(name, "ContentType") == 0)
@ -231,14 +233,14 @@ find_valor_of_array_variables(xmlNode *node, capabilities_t *scanner, int type)
}
#endif
#if(defined HAVE_TIFFIO_H)
else if(type == PLATEN && !strcmp(scanner->caps[type].DocumentFormats[i], "image/tiff"))
else if(!strcmp(scanner->caps[type].DocumentFormats[i], "image/tiff"))
{
have_tiff = SANE_TRUE;
scanner->caps[type].have_tiff = i;
}
#endif
#if(defined HAVE_POPPLER_GLIB)
else if(type == PLATEN && !strcmp(scanner->caps[type].DocumentFormats[i], "application/pdf"))
#if HAVE_POPPLER_GLIB
else if(!strcmp(scanner->caps[type].DocumentFormats[i], "application/pdf"))
{
have_pdf = SANE_TRUE;
scanner->caps[type].have_pdf = i;
@ -432,7 +434,7 @@ print_xml_c(xmlNode *node, ESCL_Device *device, capabilities_t *scanner, int typ
}
if (!strcmp((const char *)node->name, "Version")&& node->ns && node->ns->prefix){
if (!strcmp((const char*)node->ns->prefix, "pwg"))
device->version = atof ((const char *)xmlNodeGetContent(node));
device->version = strdup((const char *)xmlNodeGetContent(node));
}
if (!strcmp((const char *)node->name, "MakeAndModel")){
device->model_name = strdup((const char *)xmlNodeGetContent(node));
@ -588,7 +590,6 @@ escl_capabilities(ESCL_Device *device, char *blacklist, SANE_Status *status)
strstr(header->memory, "Server: HP_Compact_Server"))
device->hack = curl_slist_append(NULL, "Host: localhost");
device->version = 0.0;
scanner->source = 0;
scanner->Sources = (SANE_String_Const *)malloc(sizeof(SANE_String_Const) * 4);
for (i = 0; i < 4; i++)

Wyświetl plik

@ -232,7 +232,13 @@ get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps)
y_off,
w,
h);
surface = malloc(w * h * cinfo.output_components);
jpeg_start_decompress(&cinfo);
if (x_off > 0 || w < cinfo.output_width)
jpeg_crop_scanline(&cinfo, &x_off, &w);
lineSize = w * cinfo.output_components;
if (y_off > 0)
jpeg_skip_scanlines(&cinfo, y_off);
surface = malloc(cinfo.output_width * cinfo.output_height * cinfo.output_components);
if (surface == NULL) {
jpeg_destroy_decompress(&cinfo);
DBG( 1, "Escl Jpeg : Memory allocation problem\n");
@ -242,12 +248,6 @@ get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps)
}
return (SANE_STATUS_NO_MEM);
}
jpeg_start_decompress(&cinfo);
if (x_off > 0 || w < cinfo.output_width)
jpeg_crop_scanline(&cinfo, &x_off, &w);
lineSize = w * cinfo.output_components;
if (y_off > 0)
jpeg_skip_scanlines(&cinfo, y_off);
pos = 0;
while (cinfo.output_scanline < (unsigned int)rh) {
rowptr[0] = (JSAMPROW)surface + (lineSize * pos); // ..cinfo.output_scanline);

Wyświetl plik

@ -46,7 +46,7 @@ struct downloading
static const char settings[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" \
"<scan:ScanSettings xmlns:pwg=\"http://www.pwg.org/schemas/2010/12/sm\" xmlns:scan=\"http://schemas.hp.com/imaging/escl/2011/05/03\">" \
" <pwg:Version>%.2f</pwg:Version>" \
" <pwg:Version>%s</pwg:Version>" \
" <pwg:ScanRegions>" \
" <pwg:ScanRegion>" \
" <pwg:ContentRegionUnits>escl:ThreeHundredthsOfInches</pwg:ContentRegionUnits>" \
@ -168,26 +168,23 @@ escl_newjob (capabilities_t *scanner, const ESCL_Device *device, SANE_Status *st
int have_tiff = scanner->caps[scanner->source].have_tiff;
int have_pdf = scanner->caps[scanner->source].have_pdf;
if ((scanner->source == PLATEN && have_pdf == -1) ||
(scanner->source > PLATEN)) {
if (have_tiff != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_tiff]);
}
else if (have_png != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_png]);
}
else if (have_jpeg != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_jpeg]);
}
if (have_pdf != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_pdf]);
}
else {
else if (have_tiff != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_pdf]);
strdup(scanner->caps[scanner->source].DocumentFormats[have_tiff]);
}
if (device->version <= 2.0)
else if (have_png != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_png]);
}
else if (have_jpeg != -1) {
scanner->caps[scanner->source].default_format =
strdup(scanner->caps[scanner->source].DocumentFormats[have_jpeg]);
}
if (atof ((const char *)device->version) <= 2.0)
{
// For eSCL 2.0 and older clients
snprintf(f_ext_tmp, sizeof(f_ext_tmp),

Wyświetl plik

@ -44,7 +44,32 @@ write_callback(void __sane_unused__*str,
* This function is called in the 'sane_cancel' function.
*/
void
escl_scanner(const ESCL_Device *device, char *scanJob, char *result)
escl_delete(const ESCL_Device *device, char *uri)
{
CURL *curl_handle = NULL;
long answer = 0;
if (uri == NULL)
return;
curl_handle = curl_easy_init();
if (curl_handle != NULL) {
escl_curl_url(curl_handle, device, uri);
curl_easy_setopt(curl_handle, CURLOPT_CUSTOMREQUEST, "DELETE");
if (curl_easy_perform(curl_handle) == CURLE_OK) {
curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &answer);
return;
}
curl_easy_cleanup(curl_handle);
}
}
/**
* \fn void escl_scanner(const ESCL_Device *device, char *result)
* \brief Function that resets the scanner after each scan, using curl.
* This function is called in the 'sane_cancel' function.
*/
void
escl_scanner(const ESCL_Device *device, char *scanJob, char *result, SANE_Bool status)
{
CURL *curl_handle = NULL;
const char *scan_jobs = "/eSCL/";
@ -70,10 +95,15 @@ CURL_CALL:
if (i >= 15) return;
}
curl_easy_cleanup(curl_handle);
if (SANE_STATUS_GOOD != escl_status(device,
PLATEN,
NULL,
NULL))
goto CURL_CALL;
char* end = strrchr(scan_cmd, '/');
*end = 0;
escl_delete(device, scan_cmd);
if (status) {
if (SANE_STATUS_GOOD != escl_status(device,
PLATEN,
NULL,
NULL))
goto CURL_CALL;
}
}
}

Wyświetl plik

@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libxml/parser.h>
@ -270,3 +271,135 @@ clean_data:
}
return (status);
}
static void
print_xml_job_finish(xmlNode *node,
SANE_Status *job)
{
while (node) {
if (node->type == XML_ELEMENT_NODE) {
if (find_nodes_s(node)) {
if (strcmp((const char *)node->name, "JobState") == 0) {
const char *state = (const char *)xmlNodeGetContent(node);
if (!strcmp(state, "Canceled")) {
*job = SANE_STATUS_GOOD;
DBG(10, "jobId Completed SANE_STATUS_GOOD\n");
}
else if (!strcmp(state, "Aborted")) {
*job = SANE_STATUS_GOOD;
DBG(10, "jobId Completed SANE_STATUS_GOOD\n");
}
else if (!strcmp(state, "Completed")) {
*job = SANE_STATUS_GOOD;
DBG(10, "jobId Completed SANE_STATUS_GOOD\n");
}
}
}
}
print_xml_job_finish(node->children, job);
node = node->next;
}
}
static void
print_xml_reset_all_jobs (xmlNode *node,
ESCL_Device *device)
{
DBG(10, "print_xml_reset_all_jobs\n");
SANE_Status status = SANE_STATUS_DEVICE_BUSY;
while (node) {
if (node->type == XML_ELEMENT_NODE) {
if (find_nodes_s(node)) {
if (strcmp((const char *)node->name, "JobUri") == 0) {
DBG(10, "print_xml_reset_all_jobs: %s\n", node->name);
if (device != NULL) {
print_xml_job_finish (node, &status);
if (status == SANE_STATUS_DEVICE_BUSY) {
char *jobUri = (char *)xmlNodeGetContent(node);
char *job = strrchr((const char *)jobUri, '/');
char *scanj = NULL;
if (job != NULL) {
if (strstr(jobUri,"ScanJobs"))
scanj = strdup("ScanJobs");
else
scanj = strdup("ScanJob");
DBG(10, "print_xml_reset_all_jobs: %s/%s\n", scanj, job);
escl_scanner(device, scanj, job, SANE_FALSE);
free(scanj);
}
DBG(10, "print_xml_reset_all_jobs: sleep to finish the job\n");
}
}
}
}
}
print_xml_reset_all_jobs (node->children,
device);
node = node->next;
}
}
/**
* \fn SANE_Status escl_reset_all_jobs (ESCL_Device *device, , char *scanJob)
* \brief Function that forces the end of jobs, using curl.
* This function is called in the 'sane_start' function.
*
* \return status (if everything is OK, status = SANE_STATUS_GOOD, otherwise, SANE_STATUS_NO_MEM/SANE_STATUS_INVAL)
*/
SANE_Status
escl_reset_all_jobs(ESCL_Device *device)
{
CURL *curl_handle = NULL;
xmlDoc *data = NULL;
xmlNode *node = NULL;
struct idle *var = NULL;
const char *scanner_status = "/eSCL/ScannerStatus";
SANE_Status status = SANE_STATUS_DEVICE_BUSY;
DBG(10, "escl_reset_all_jobs\n");
if (device == NULL)
return (SANE_STATUS_NO_MEM);
DBG(10, "1 - escl_reset_all_jobs\n");
var = (struct idle*)calloc(1, sizeof(struct idle));
if (var == NULL)
return (SANE_STATUS_NO_MEM);
DBG(10, "2 - escl_reset_all_jobs\n");
var->memory = malloc(1);
var->size = 0;
curl_handle = curl_easy_init();
escl_curl_url(curl_handle, device, scanner_status);
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, memory_callback_s);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)var);
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 3L);
CURLcode res = curl_easy_perform(curl_handle);
if (res != CURLE_OK) {
DBG( 1, "The scanner didn't respond: %s\n", curl_easy_strerror(res));
status = SANE_STATUS_INVAL;
goto clean_data1;
}
DBG(10, "3 - escl_reset_all_jobs\n");
DBG( 10, "eSCL : Status : %s.\n", var->memory);
data = xmlReadMemory(var->memory, var->size, "file.xml", NULL, 0);
if (data == NULL) {
status = SANE_STATUS_NO_MEM;
goto clean_data1;
}
node = xmlDocGetRootElement(data);
if (node == NULL) {
status = SANE_STATUS_NO_MEM;
goto clean1;
}
print_xml_reset_all_jobs (node, device);
status = SANE_STATUS_GOOD;
clean1:
xmlFreeDoc(data);
clean_data1:
xmlCleanupParser();
xmlMemoryDump();
curl_easy_cleanup(curl_handle);
free(var->memory);
free(var);
return status;
}

Wyświetl plik

@ -1,12 +1,12 @@
/* sane - Scanner Access Now Easy.
This file is part of the SANE package, and implements a SANE backend
for various Fujitsu scanners.
for various Fujitsu and Ricoh scanners.
Copyright (C) 2000 Randolph Bentson
Copyright (C) 2001 Frederik Ramm
Copyright (C) 2001-2004 Oliver Schirrmeister
Copyright (C) 2003-2022 m. allan noah
Copyright (C) 2003-2023 m. allan noah
JPEG output and low memory usage support funded by:
Archivista GmbH, www.archivista.ch
@ -616,6 +616,8 @@
v139 2022-11-15, MAN
- move updated window_gamma logic to set_window
- use internal gamma table if possible (fixes #618)
v140 2023-03-27, MAN
- add initial support for Ricoh scanners
SANE FLOW DIAGRAM
@ -665,7 +667,7 @@
#include "fujitsu.h"
#define DEBUG 1
#define BUILD 139
#define BUILD 140
/* values for SANE_DEBUG_FUJITSU env var:
- errors 5
@ -1154,7 +1156,7 @@ connect_fd (struct fujitsu *s)
}
/*
* This routine will check if a certain device is a Fujitsu scanner
* This routine will check if a certain device is a Fujitsu/Ricoh scanner
* It also copies interesting data from INQUIRY into the handle structure
*/
static SANE_Status
@ -1209,9 +1211,9 @@ init_inquire (struct fujitsu *s)
for (i = 3; s->version_name[i] == ' ' && i >= 0; i--)
s->version_name[i] = 0;
if (strcmp ("FUJITSU", s->vendor_name)) {
if (strcmp ("FUJITSU", s->vendor_name) && strcmp ("RICOH", s->vendor_name)) {
DBG (5, "The device at '%s' is reported to be made by '%s'\n", s->device_name, s->vendor_name);
DBG (5, "This backend only supports Fujitsu products.\n");
DBG (5, "This backend only supports Fujitsu and Ricoh products.\n");
return SANE_STATUS_INVAL;
}

Wyświetl plik

@ -15,10 +15,10 @@ scsi FUJITSU
# To use a specific scsi device
#scsi /dev/sg1
# For Fujitsu scanners connected via USB on a known device (kernel driver):
# For scanners connected via USB on a known device (kernel driver):
#usb /dev/usb/scanner0
# For Fujitsu scanners connected via USB using vendor and device ids (libusb):
# For scanners connected via USB using vendor and device ids (libusb):
#usb VENDORID PRODUCTID
# NOTE: if you have to add your device here- please send the id and model
@ -303,3 +303,12 @@ usb 0x04c5 0x162c
#ScanSnap iX1400
usb 0x04c5 0x1630
######################################
# Ricoh-only scanners
#fi-8040
usb 0x05ca 0x0307
#fi-70F"
usb 0x05ca 0x0308

Wyświetl plik

@ -146,6 +146,12 @@ usb 0x07b3 0x0c3a
# Plustek OpticFilm 7500i
usb 0x07b3 0x0c13
# Plustek OpticFilm 7600i
usb 0x07b3 0x0c3b
# Plustek OpticFilm 8100
usb 0x07b3 0x130c
# Plustek OpticFilm 8200i
usb 0x07b3 0x130d

Wyświetl plik

@ -83,8 +83,8 @@ gl124_init_registers (Genesys_Device * dev)
dev->reg.init_reg(0x05, 0x00);
if(dev->model->sensor_id == SensorId::CIS_CANON_LIDE_120) {
dev->reg.init_reg(0x06, 0x50);
dev->reg.init_reg(0x07, 0x00);
dev->reg.init_reg(0x06, 0x50);
dev->reg.init_reg(0x07, 0x00);
} else {
dev->reg.init_reg(0x03, 0x50 & ~REG_0x03_AVEENB);
dev->reg.init_reg(0x06, 0x50 | REG_0x06_GAIN4);

Wyświetl plik

@ -290,4 +290,4 @@ static constexpr RegAddr REG_TRUEB = 0x112;
} // namespace gl124
} // namespace genesys
#endif // BACKEND_GENESYS_GL843_REGISTERS_H
#endif // BACKEND_GENESYS_GL124_REGISTERS_H

Wyświetl plik

@ -46,16 +46,11 @@
#define BUILD 1
#include "../include/sane/config.h"
#include <math.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <netinet/in.h>
#define BACKEND_NAME hpljm1005
@ -110,10 +105,10 @@ static int cur_idx;
#define RGB 1
#define GRAY 0
#define MAX_X_H 0x350
#define MAX_X_H 0x351
#define MAX_Y_H 0x490
#define MAX_X_S 220
#define MAX_Y_S 330
#define MAX_X_S 216
#define MAX_Y_S 297
#define OPTION_MAX 9
@ -144,6 +139,12 @@ static const SANE_String_Const mode_list[] = {
#define STATUS_SCANNING 1
#define STATUS_CANCELING 2
struct buffer_s {
char *buffer;
size_t w_offset;
size_t size;
};
struct device_s
{
struct device_s *next;
@ -151,15 +152,16 @@ struct device_s
int idx; /* Index in the usbid array */
int dn; /* Usb "Handle" */
SANE_Option_Descriptor optiond[OPTION_MAX];
char *buffer;
int bufs;
struct buffer_s buf_r; /* also for gray mode */
struct buffer_s buf_g;
struct buffer_s buf_b;
int read_offset;
int write_offset_r;
int write_offset_g;
int write_offset_b;
int status;
int width;
int height;
int height_h;
int data_width; /* width + some padding 0xFF which should be ignored */
int scanned_pixels;
SANE_Word optionw[OPTION_MAX];
uint32_t conf_data[512];
uint32_t packet_data[512];
@ -186,58 +188,6 @@ round2(double x)
return (double)(x >= 0.0) ? (int)(x+0.5) : (int)(x-0.5);
}
static void
update_img_size (struct device_s *dev)
{
int dx, dy;
/* Only update the width when not scanning,
* otherwise the scanner give us the correct width */
if (dev->status == STATUS_SCANNING)
{
dev->height = -1;
return;
}
dx = dev->optionw[X2_OFFSET] - dev->optionw[X1_OFFSET];
dy = dev->optionw[Y2_OFFSET] - dev->optionw[Y1_OFFSET];
switch (dev->optionw[RES_OFFSET])
{
case 75:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 640);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 880);
break;
case 100:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 848);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 1180);
break;
case 150:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 1264);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 1775);
break;
case 200:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 1696);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 2351);
break;
case 300:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 2528);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 3510);
break;
case 600:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 5088);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 7020);
break;
case 1200:
dev->width = round2 ((dx / ((double) MAX_X_S)) * 10208);
dev->height = round2 ((dy / ((double) MAX_Y_S)) * 14025);
break;
}
DBG(2,"New image size: %dx%d\n",dev->width, dev->height);
}
/* This function is copy/pasted from the Epson backend */
static size_t
max_string_size (const SANE_String_Const strings[])
@ -721,7 +671,6 @@ sane_get_parameters (SANE_Handle h, SANE_Parameters * p)
p->last_frame = SANE_TRUE;
p->depth = 8;
update_img_size (dev);
p->pixels_per_line = dev->width;
p->lines = dev->height;
p->bytes_per_line = p->pixels_per_line;
@ -805,7 +754,7 @@ send_conf (struct device_s *dev)
dev->conf_data[21] = 0;
dev->conf_data[22] = htonl (0x491);
dev->conf_data[23] = htonl (0x352);
dev->height_h = y2 - y1;
if (dev->optionw[COLOR_OFFSET] == RGB)
{
dev->conf_data[15] = htonl (0x2);
@ -821,116 +770,151 @@ send_conf (struct device_s *dev)
sanei_usb_write_bulk (dev->dn, (unsigned char *) dev->conf_data, &size);
}
static SANE_Status
get_data (struct device_s *dev)
static SANE_Status create_buffer(struct buffer_s *buf, int buffer_size) {
if (buf->buffer)
{
free(buf->buffer);
}
buf->buffer = malloc(buffer_size);
if (!buf->buffer)
return SANE_STATUS_NO_MEM;
buf->size = buffer_size;
buf->w_offset = 0;
return SANE_STATUS_GOOD;
}
static SANE_Status create_buffers(struct device_s *dev, int buf_size) {
if (create_buffer(&dev->buf_r, buf_size) != SANE_STATUS_GOOD)
return SANE_STATUS_NO_MEM;
if (dev->optionw[COLOR_OFFSET] == RGB)
{
if (create_buffer(&dev->buf_g, buf_size) != SANE_STATUS_GOOD)
return SANE_STATUS_NO_MEM;
if (create_buffer(&dev->buf_b, buf_size) != SANE_STATUS_GOOD)
return SANE_STATUS_NO_MEM;
}
return SANE_STATUS_GOOD;
}
static SANE_Status remove_buffers(struct device_s *dev) {
if (dev->buf_r.buffer)
free(dev->buf_r.buffer);
if (dev->buf_g.buffer)
free(dev->buf_g.buffer);
if (dev->buf_b.buffer)
free(dev->buf_b.buffer);
dev->buf_r.w_offset = dev->buf_g.w_offset = dev->buf_b.w_offset = 0;
dev->buf_r.size = dev->buf_g.size = dev->buf_b.size = 0;
dev->buf_r.buffer = dev->buf_g.buffer = dev->buf_b.buffer = NULL;
dev->read_offset = 0;
return SANE_STATUS_GOOD;
}
static SANE_Status get_data (struct device_s *dev)
{
int color;
size_t size;
int packet_size;
unsigned char *buffer = (unsigned char *) dev->packet_data;
if (dev->status == STATUS_IDLE)
{
DBG(101, "STATUS == IDLE\n");
return SANE_STATUS_IO_ERROR;
}
/* first wait a standard data pkt */
do
{
size = 32;
sanei_usb_read_bulk (dev->dn, buffer, &size);
if (size)
{
size = 32;
sanei_usb_read_bulk (dev->dn, buffer, &size);
if (size)
{
if (ntohl (dev->packet_data[0]) == MAGIC_NUMBER)
{
if (ntohl (dev->packet_data[1]) == PKT_DATA)
break;
if (ntohl (dev->packet_data[1]) == PKT_END_DATA)
{
dev->status = STATUS_IDLE;
DBG(100,"End of scan encountered on device %s\n",dev->devname);
send_pkt (PKT_GO_IDLE, 0, dev);
wait_ack (dev, NULL);
wait_ack (dev, NULL);
send_pkt (PKT_UNKNOW_1, 0, dev);
wait_ack (dev, NULL);
send_pkt (PKT_RESET, 0, dev);
sleep (2); /* Time for the scanning head to go back home */
return SANE_STATUS_EOF;
}
}
}
if (ntohl (dev->packet_data[0]) == MAGIC_NUMBER)
{
if (ntohl (dev->packet_data[1]) == PKT_DATA)
break;
if (ntohl (dev->packet_data[1]) == PKT_END_DATA)
{
dev->status = STATUS_IDLE;
DBG(100,"End of scan encountered on device %s\n",dev->devname);
send_pkt (PKT_GO_IDLE, 0, dev);
wait_ack (dev, NULL);
wait_ack (dev, NULL);
send_pkt (PKT_UNKNOW_1, 0, dev);
wait_ack (dev, NULL);
send_pkt (PKT_RESET, 0, dev);
sleep (2); /* Time for the scanning head to go back home */
return SANE_STATUS_EOF;
}
}
}
while (1);
} while (1);
packet_size = ntohl (dev->packet_data[5]);
if (!dev->buffer)
{
dev->bufs = packet_size - 24 /* size of header */ ;
if (dev->optionw[COLOR_OFFSET] == RGB)
dev->bufs *= 3;
dev->buffer = malloc (dev->bufs);
if (!dev->buffer)
return SANE_STATUS_NO_MEM;
dev->write_offset_r = 0;
dev->write_offset_g = 1;
dev->write_offset_b = 2;
}
if (! dev->buf_r.buffer)
{
/*
For some reason scanner sends packets in order:
<start> R G B ... R G B R G B RRR GGG BBB <end>
To hanle the last triple portion create a triple size buffer
*/
int buf_size = (packet_size - 24) * 3; /* 24 - size of header */ ;
if (create_buffers(dev, buf_size) != SANE_STATUS_GOOD)
return SANE_STATUS_NO_MEM;
}
/* Get the "data header" */
do
{
size = 24;
sanei_usb_read_bulk (dev->dn, buffer, &size);
}
while (!size);
{
size = 24;
sanei_usb_read_bulk (dev->dn, buffer, &size);
} while (!size);
color = ntohl (dev->packet_data[0]);
packet_size -= size;
dev->width = ntohl (dev->packet_data[5]);
DBG(100,"Got data size %d on device %s. Scan width: %d\n",packet_size, dev->devname, dev->width);
dev->width = ntohl (dev->packet_data[4]);
dev->height = dev->height_h * dev->optionw[RES_OFFSET] / 100;
dev->data_width = ntohl (dev->packet_data[5]);
DBG(100,"Got data size %d on device %s. Scan width: %d, data width: %d\n",packet_size, dev->devname, dev->width, dev->data_width);
/* Now, read the data */
do
{
int ret;
do
{
int j;
int i;
int ret;
do
{
size = packet_size > 512 ? 512 : packet_size;
ret = sanei_usb_read_bulk (dev->dn, buffer, &size);
}
while (!size || ret != SANE_STATUS_GOOD);
packet_size -= size;
switch (color)
{
case RED_LAYER:
DBG(101,"Got red layer data on device %s\n",dev->devname);
i = dev->write_offset_r + 3 * size;
if (i > dev->bufs)
i = dev->bufs;
for (j = 0; dev->write_offset_r < i; dev->write_offset_r += 3)
dev->buffer[dev->write_offset_r] = buffer[j++];
break;
case GREEN_LAYER:
DBG(101,"Got green layer data on device %s\n",dev->devname);
i = dev->write_offset_g + 3 * size;
if (i > dev->bufs)
i = dev->bufs;
for (j = 0; dev->write_offset_g < i; dev->write_offset_g += 3)
dev->buffer[dev->write_offset_g] = buffer[j++];
break;
case BLUE_LAYER:
DBG(101,"Got blue layer data on device %s\n",dev->devname);
i = dev->write_offset_b + 3 * size;
if (i > dev->bufs)
i = dev->bufs;
for (j = 0; dev->write_offset_b < i; dev->write_offset_b += 3)
dev->buffer[dev->write_offset_b] = buffer[j++];
break;
case GRAY_LAYER:
DBG(101,"Got gray layer data on device %s\n",dev->devname);
if (dev->write_offset_r + (int)size >= dev->bufs)
size = dev->bufs - dev->write_offset_r;
memcpy (dev->buffer + dev->write_offset_r, buffer, size);
dev->write_offset_r += size;
break;
}
size = packet_size > 512 ? 512 : packet_size;
ret = sanei_usb_read_bulk (dev->dn, buffer, &size);
} while (!size || ret != SANE_STATUS_GOOD);
packet_size -= size;
struct buffer_s * current_buf;
char color_char;
switch (color)
{
case GRAY_LAYER:
color_char = 'g';
current_buf = &dev->buf_r;
break;
case RED_LAYER:
color_char = 'R';
current_buf = &dev->buf_r;
break;
case GREEN_LAYER:
color_char = 'G';
current_buf = &dev->buf_g;
break;
case BLUE_LAYER:
color_char = 'B';
current_buf = &dev->buf_b;
break;
default:
DBG(101, "Unknown color code: %d \n", color);
return SANE_STATUS_IO_ERROR;
}
DBG(101,"Got %c layer data on device %s\n", color_char, dev->devname);
if (current_buf->w_offset + size > current_buf->size) {
DBG(100, "buffer overflow\n");
return SANE_STATUS_IO_ERROR;
}
memcpy(current_buf->buffer + current_buf->w_offset, buffer, size);
current_buf->w_offset += size;
}
while (packet_size > 0);
return SANE_STATUS_GOOD;
}
@ -943,13 +927,8 @@ sane_start (SANE_Handle h)
size_t size;
dev->read_offset = 0;
dev->write_offset_r = 0;
dev->write_offset_g = 1;
dev->write_offset_b = 2;
free (dev->buffer);
dev->buffer = NULL;
dev->scanned_pixels = 0;
remove_buffers(dev);
send_pkt (PKT_RESET, 0, dev);
send_pkt (PKT_READ_STATUS, 0, dev);
@ -992,16 +971,12 @@ static void
do_cancel(struct device_s *dev)
{
while (get_data (dev) == SANE_STATUS_GOOD);
free (dev->buffer);
dev->buffer = NULL;
remove_buffers(dev);
}
static int
min3 (int r, int g, int b)
{
/* Optimize me ! */
g--;
b -= 2;
if (r < g && r < b)
return r;
if (b < r && b < g)
@ -1009,57 +984,83 @@ min3 (int r, int g, int b)
return g;
}
static int
min_buf_w_offset (struct device_s * dev)
{
if (dev->optionw[COLOR_OFFSET] == RGB)
return min3 (dev->buf_r.w_offset, dev->buf_g.w_offset, dev->buf_b.w_offset);
return dev->buf_r.w_offset;
}
static int is_buf_synchronized(struct device_s * dev) {
if (dev->optionw[COLOR_OFFSET] == RGB)
return dev->buf_r.w_offset == dev->buf_g.w_offset
&& dev->buf_r.w_offset == dev->buf_b.w_offset;
return 1;
}
SANE_Status
sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
{
struct device_s *dev = (struct device_s *) h;
int available;
int ret;
if (dev->optionw[COLOR_OFFSET] == RGB) {
maxlen /= 3;
}
*len = 0;
if (dev->status == STATUS_IDLE)
{
DBG(101, "STATUS == IDLE\n");
return SANE_STATUS_IO_ERROR;
if (dev->optionw[COLOR_OFFSET] == RGB)
}
while (min_buf_w_offset(dev) <= dev->read_offset)
{
ret = get_data (dev);
if (ret != SANE_STATUS_GOOD)
{
while (min3 (dev->write_offset_r, dev->write_offset_g,
dev->write_offset_b) <= dev->read_offset)
{
ret = get_data (dev);
if (ret != SANE_STATUS_GOOD)
{
if (min3 (dev->write_offset_r,
dev->write_offset_g,
dev->write_offset_b) <= dev->read_offset)
return ret;
}
}
available = min3 (dev->write_offset_r, dev->write_offset_g,
dev->write_offset_b);
if (min_buf_w_offset(dev) <= dev->read_offset) {
return ret;
}
}
else
}
available = min_buf_w_offset(dev);
int pixel_len = available - dev->read_offset;
if (pixel_len > maxlen)
pixel_len = maxlen;
int img_size = dev->width * dev->height;
for(int i=0; i<pixel_len; ++i)
{
int pos = dev->read_offset+i;
if (pos % dev->data_width >= dev->width)
continue;
if (dev->scanned_pixels >= img_size)
{
while (dev->write_offset_r <= dev->read_offset)
{
ret = get_data (dev);
if (ret != SANE_STATUS_GOOD)
if (dev->write_offset_r <= dev->read_offset)
return ret;
}
available = dev->write_offset_r;
DBG(101, "Extra pixels received.\n");
break;
}
*len = available - dev->read_offset;
if (*len > maxlen)
*len = maxlen;
memcpy (buf, dev->buffer + dev->read_offset, *len);
dev->read_offset += *len;
if (dev->read_offset == dev->bufs)
dev->scanned_pixels++;
buf[(*len)++] = dev->buf_r.buffer[pos];
if (dev->optionw[COLOR_OFFSET] == RGB)
{
free (dev->buffer);
dev->buffer = NULL;
dev->read_offset = 0;
dev->write_offset_r = 0;
dev->write_offset_g = 1;
dev->write_offset_b = 2;
buf[(*len)++] = dev->buf_g.buffer[pos];
buf[(*len)++] = dev->buf_b.buffer[pos];
}
}
DBG(101, "Moved %d pixels to buffer. Total pixel scanned: %d \n", *len, dev->scanned_pixels);
if (dev->scanned_pixels == img_size)
DBG(100, "Full image received\n");
dev->read_offset += pixel_len;
/*
If w_offset is the same in all buffers and has already been completely transferred
to the common buffer - flush buffer. It will be recreated in get_data with a reserve
for the last triple portions
*/
if (is_buf_synchronized(dev) && available == dev->read_offset)
{
remove_buffers(dev);
}
/* Special case where sane_cancel is called while scanning */
if (dev->status == STATUS_CANCELING)
@ -1082,8 +1083,7 @@ sane_cancel (SANE_Handle h)
return;
}
free (dev->buffer);
dev->buffer = NULL;
remove_buffers(dev);
}
SANE_Status

Wyświetl plik

@ -829,7 +829,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option, SANE_Action action,
case SANE_ACTION_SET_VALUE:
if (!SANE_OPTION_IS_SETTABLE (lexmark_device->opt[option].cap))
return SANE_STATUS_INVAL;
return SANE_STATUS_INVAL;
/* Make sure boolean values are only TRUE or FALSE */
if (lexmark_device->opt[option].type == SANE_TYPE_BOOL)

Plik diff jest za duży Load Diff

Wyświetl plik

@ -0,0 +1,2 @@
# X26xx series
usb 0x043d 0x011d

Wyświetl plik

@ -0,0 +1,151 @@
/* lexmark_x2600.c: SANE backend for Lexmark x2600 scanners.
(C) 2023 "Benoit Juin" <benoit.juin@gmail.com>
This file is part of the SANE package.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
As a special exception, the authors of SANE give permission for
additional uses of the libraries contained in this release of SANE.
The exception is that, if you link a SANE library with other files
to produce an executable, this does not by itself cause the
resulting executable to be covered by the GNU General Public
License. Your use of that executable is in no way restricted on
account of linking the SANE library code into it.
This exception does not, however, invalidate any other reasons why
the executable file might be covered by the GNU General Public
License.
If you submit changes to SANE to the maintainers to be included in
a subsequent release, you agree by submitting the changes that
those changes may be distributed with this exception intact.
If you write modifications of your own for SANE, it is your choice
whether to permit this exception to apply to your modifications.
If you do not wish that, delete this exception notice.
**************************************************************************/
#ifndef LEXMARK_X2600_H
#define LEXMARK_X2600_H
#define BACKEND_NAME lexmark_x2600
#include "../include/sane/config.h"
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/time.h>
#include "../include/_stdint.h"
#include "../include/sane/sane.h"
#include "../include/sane/sanei.h"
#include "../include/sane/saneopts.h"
#include "../include/sane/sanei_config.h"
#include "../include/sane/sanei_usb.h"
#include "../include/sane/sanei_backend.h"
typedef struct Read_Buffer
{
SANE_Int gray_offset;
SANE_Int max_gray_offset;
SANE_Int region;
SANE_Int red_offset;
SANE_Int green_offset;
SANE_Int blue_offset;
SANE_Int max_red_offset;
SANE_Int max_green_offset;
SANE_Int max_blue_offset;
SANE_Byte *data;
SANE_Byte *readptr;
SANE_Byte *writeptr;
SANE_Byte *max_writeptr;
size_t size;
size_t linesize;
size_t last_line_bytes_read;
SANE_Bool empty;
SANE_Int image_line_no;
SANE_Int write_byte_counter;
SANE_Int read_byte_counter;
}
Read_Buffer;
typedef enum
{
OPT_NUM_OPTS = 0,
OPT_MODE,
OPT_RESOLUTION,
OPT_PREVIEW,
OPT_GEOMETRY_GROUP,
OPT_TL_X, /* top-left x */
OPT_TL_Y, /* top-left y */
OPT_BR_X, /* bottom-right x */
OPT_BR_Y, /* bottom-right y */
/* must come last: */
NUM_OPTIONS
}
Lexmark_Options;
typedef enum
{
READ = 0,
WRITE = 1,
}
Debug_Packet;
typedef struct Lexmark_Device
{
struct Lexmark_Device *next;
SANE_Bool missing; /**< devices has been unplugged or swtiched off */
SANE_Device sane;
SANE_Option_Descriptor opt[NUM_OPTIONS];
Option_Value val[NUM_OPTIONS];
SANE_Parameters params;
SANE_Int devnum;
long data_size;
SANE_Bool initialized;
SANE_Bool eof;
SANE_Int x_dpi;
SANE_Int y_dpi;
long data_ctr;
SANE_Bool device_cancelled;
SANE_Int cancel_ctr;
SANE_Byte *transfer_buffer;
size_t bytes_read;
size_t bytes_remaining;
size_t bytes_in_buffer;
SANE_Byte *read_pointer;
Read_Buffer *read_buffer;
}
Lexmark_Device;
void debug_packet(const SANE_Byte * source, SANE_Int source_size, Debug_Packet dp);
#endif /* LEXMARK_X2600_H */

Wyświetl plik

@ -55,6 +55,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pwd.h>
#ifdef HAVE_LIBC_H
# include <libc.h> /* NeXTStep/OpenStep */
#endif
@ -311,6 +312,32 @@ add_device (const char *name, Net_Device ** ndp)
}
#endif /* NET_USES_AF_INDEP */
/* Calls getpwuid_r(). The return value must be freed by the caller. */
char* get_current_username()
{
long bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (bufsize == -1)
{
return NULL;
}
char* buf = (char*) malloc(bufsize);
if (buf == NULL)
{
return NULL;
}
struct passwd pwd;
struct passwd *result;
if (getpwuid_r(getuid(), &pwd, buf, bufsize, &result) != 0 || result == NULL)
{
return NULL;
}
/* pw_name is allocated somewhere within buf, so we use memmove() */
memmove(buf, pwd.pw_name, strlen(pwd.pw_name));
return buf;
}
#ifdef NET_USES_AF_INDEP
static SANE_Status
@ -484,12 +511,14 @@ connect_dev (Net_Device * dev)
/* exchange version codes with the server: */
req.version_code = SANE_VERSION_CODE (V_MAJOR, V_MINOR,
SANEI_NET_PROTOCOL_VERSION);
req.username = getlogin ();
req.username = get_current_username();
DBG (2, "connect_dev: net_init (user=%s, local version=%d.%d.%d)\n",
req.username, V_MAJOR, V_MINOR, SANEI_NET_PROTOCOL_VERSION);
sanei_w_call (&dev->wire, SANE_NET_INIT,
(WireCodecFunc) sanei_w_init_req, &req,
(WireCodecFunc) sanei_w_init_reply, &reply);
free(req.username);
req.username = NULL;
if (dev->wire.status != 0)
{

Wyświetl plik

@ -851,18 +851,48 @@ control_option (pixma_sane_t * ss, SANE_Int n,
case opt_source:
if ((cfg->cap & (PIXMA_CAP_ADF|PIXMA_CAP_ADFDUP|PIXMA_CAP_TPU))
&& (a == SANE_ACTION_SET_VALUE || a == SANE_ACTION_SET_AUTO))
{ /* new source selected: flatbed, ADF, TPU, ... */
/* to avoid fatal errors,
* select first entry of dynamic mode_list
* identifiers are unknown here */
OVAL (opt_mode).w = ss->mode_map[0];
{
/* new source selected: flatbed, ADF, TPU, ... */
pixma_scan_mode_t curr_mode = ss->mode_map[OVAL (opt_mode).w];
SANE_Word curr_res = OVAL (opt_resolution).w;
/* recreate dynamic lists */
create_mode_list (ss);
create_dpi_list (ss);
/* to avoid fatal errors,
* select first entry of dynamic dpi_list
* identifiers are unknown here */
OVAL (opt_resolution).w = ss->dpi_list[1];
/*
* Check to see if the mode and res are still valid.
* Replace with default mode or closest res if not.
*
*/
for (SANE_Int mode_idx = 0;; mode_idx++)
{
if (!ss->mode_list[mode_idx])
{
OVAL (opt_mode).w = 0;
break;
}
if (curr_mode == ss->mode_map[mode_idx])
{
OVAL (opt_mode).w = mode_idx;
break;
}
}
for (SANE_Int res_idx = 1;; res_idx++)
{
if (res_idx > ss->dpi_list[0])
{
OVAL (opt_resolution).w = ss->dpi_list[1];
break;
}
if (ss->dpi_list[res_idx] >= curr_res)
{
OVAL (opt_resolution).w = ss->dpi_list[res_idx];
break;
}
}
if (ss->mode_map[OVAL (opt_mode).w] == PIXMA_SCAN_MODE_LINEART)
{ /* lineart */
enable_option (ss, opt_threshold, SANE_TRUE);

Wyświetl plik

@ -118,6 +118,7 @@
#define MF260_PID 0x27f4
#define MF740_PID 0x27fb
#define MF743_PID 0x27fc
#define MF750_PID 0x2885
#define MF640_PID 0x27fe
#define MF645_PID 0x27fd
#define MF440_PID 0x2823
@ -989,6 +990,7 @@ const pixma_config_t pixma_iclass_devices[] = {
DEV ("Canon i-SENSYS MF260 Series", "MF260", MF260_PID, 600, 0, 640, 1050, PIXMA_CAP_JPEG | PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF740 Series", "MF740", MF740_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF741C/743C", "MF741C/743C", MF743_PID, 600, 300, 640, 1050, PIXMA_CAP_ADFDUP), /* ADFDUP restricted to 300dpi */
DEV ("Canon i-SENSYS MF750 Series", "MF750C", MF750_PID, 600, 300, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF640 Series", "MF642C/643C/644C", MF640_PID, 600, 0, 640, 1050, PIXMA_CAP_ADFDUP),
DEV ("Canon i-SENSYS MF645C", "MF645C", MF645_PID, 600, 0, 637, 877, PIXMA_CAP_ADFDUP), /* max. w = 216mm */
DEV ("Canon i-SENSYS MF440 Series", "MF440", MF440_PID, 600, 300, 637, 877, PIXMA_CAP_ADFDUP),

Wyświetl plik

@ -62,13 +62,6 @@
# define UNUSED(v)
#endif
/* MAC OS X does not support timeouts in darwin/libusb interrupt reads
* This is a very basic turnaround for MAC OS X
* Button scan will not work with this wrapper */
#ifdef __APPLE__
# define sanei_usb_read_int sanei_usb_read_bulk
#endif
struct pixma_io_t
{

Wyświetl plik

@ -336,6 +336,32 @@
#define TS2400_PID 0x1108
#define TS2600_PID 0x1107
#define TS8630_PID 0x18F8
#define XK110_PID 0x18F9
#define GX3000_PID 0x18F1
#define GX4000_PID 0x18F2
/* 2023 new device (untested) */
#define G3070_PID 0x18F4
#define G2070_PID 0x18F5
#define G4070_PID 0x18F3
#define G3030_PID 0x1105
#define G2030_PID 0x1106
#define TC20M_PID 0x18FC
#define TC5200M_PID 0x18FF
#define TS8700_PID 0x1118
#define XK120_PID 0x1119
#define GX1000_PID 0x110B
#define GX2000_PID 0x110D
#define TS6630_PID 0x114E
#define TS7700_PID 0x110F
#define TS7600i_PID 0x114F
#define TS6730_PID 0x1150
#define TR7800_PID 0x1151
#define TS7700i_PID 0x1152
#define TS7700A_PID 0x1111
#define GX6500_PID 0x1148
/* Generation 4 XML messages that encapsulates the Pixma protocol messages */
#define XML_START_1 \
@ -1966,6 +1992,30 @@ const pixma_config_t pixma_mp150_devices[] = {
DEVICE ("Canon PIXMA TS5400 Series", "TS5400", TS5400_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS2400 Series", "TS2400", TS2400_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS2600 Series", "TS2600", TS2600_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS8630 Series", "TS8630", TS8630_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXUS XK110 Series", "XK110", XK110_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA GX3000 Series", "GX3000", GX3000_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA GX4000 Series", "GX4000", GX4000_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA G3070", "G3070", G3070_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA G2070", "G2070", G2070_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA G4070", "G4070", G4070_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA G3030", "G3030", G3030_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA G2030", "G2030", G2030_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TC-20M", "TC-20M", TC20M_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TC-5200M", "TC-5200M", TC5200M_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS8700 series", "TS8700", TS8700_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA XK120 series", "XK120", XK120_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA GX1000 series", "GX1000", GX1000_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA GX2000 series", "GX2000", GX2000_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA TS6630 series", "TS6630", TS6630_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS7700 series", "TS7700", TS7700_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS7600i series", "TS7600i", TS7600i_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS6730 series", "TS6730", TS6730_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TR7800 series", "TR7800", TR7800_PID, 0, 600, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF | PIXMA_CAP_ADF_JPEG),
DEVICE ("Canon PIXMA TS7700i series", "TS7700i", TS7700i_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA TS7700A series", "TS7700A", TS7700A_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS),
DEVICE ("Canon PIXMA GX6500 series", "GX6500", GX6500_PID, 0, 1200, 0, 0, 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
END_OF_DEVICE_LIST
};

Wyświetl plik

@ -138,6 +138,16 @@ static const SANE_Range y_range_tpo_default =
SANE_FIX (0.0), SANE_FIX (180.0), 0
}; /* mm */
/* TPO range for the Agfa Arcus 1200 */
static const SANE_Range x_range_tpo_arcus =
{
SANE_FIX (0.0), SANE_FIX (203.0), 0
}; /* mm */
static const SANE_Range y_range_tpo_arcus =
{
SANE_FIX (0.0), SANE_FIX (254.0), 0
}; /* mm */
/* TPO range for the Agfa 1236 */
static const SANE_Range x_range_tpo_1236 =
{
@ -330,6 +340,10 @@ static void init_options (SnapScan_Scanner * ps)
x_range_tpo = x_range_tpo_3490;
y_range_tpo = y_range_tpo_3490;
break;
case ARCUS1200:
x_range_tpo = x_range_tpo_arcus;
y_range_tpo = y_range_tpo_arcus;
break;
default:
x_range_tpo = x_range_tpo_default;
y_range_tpo = y_range_tpo_default;

Wyświetl plik

@ -1432,6 +1432,43 @@ read_option (SANE_String line, SANE_String option_string,
return SANE_STATUS_GOOD;
}
static SANE_Status
read_option_str_list (SANE_String line, SANE_String option_string,
parameter_type p_type, void *value,
SANE_String_Const *string_list)
{
SANE_String new_value = NULL;
SANE_Status ret = read_option (line, option_string, p_type, &new_value);
if (ret != SANE_STATUS_GOOD)
{
if (new_value)
{
free(new_value);
}
return ret;
}
for (SANE_String_Const *option = string_list; *option; option++)
{
if (strcmp (*option, new_value) == 0)
{
if (*(SANE_String*) value)
{
free (*(SANE_String*) value);
}
*(SANE_String*) value = new_value;
return SANE_STATUS_GOOD;
}
}
return SANE_STATUS_INVAL;
}
static SANE_Status
reader_process (Test_Device * test_device, SANE_Int fd)
{
@ -1636,7 +1673,6 @@ print_options (Test_Device * test_device)
/***************************** SANE API ****************************/
SANE_Status
sane_init (SANE_Int * __sane_unused__ version_code, SANE_Auth_Callback __sane_unused__ authorize)
{
@ -1736,20 +1772,23 @@ sane_init (SANE_Int * __sane_unused__ version_code, SANE_Auth_Callback __sane_un
DBG (5, "sane_init: config file line %3d: `%s'\n",
linenumber, line);
if (read_option (line, "number_of_devices", param_int,
&init_number_of_devices) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "mode", param_string,
&init_mode) == SANE_STATUS_GOOD)
continue;
if (read_option_str_list (line, "mode", param_string,
&init_mode, mode_list) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "hand-scanner", param_bool,
&init_hand_scanner) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "three-pass", param_bool,
&init_three_pass) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "three-pass-order", param_string,
&init_three_pass_order) == SANE_STATUS_GOOD)
if (read_option_str_list (line, "three-pass-order", param_string,
&init_three_pass_order, order_list) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "resolution_min", param_fixed,
&resolution_range.min) == SANE_STATUS_GOOD)
@ -1766,11 +1805,11 @@ sane_init (SANE_Int * __sane_unused__ version_code, SANE_Auth_Callback __sane_un
if (read_option (line, "depth", param_int,
&init_depth) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "scan-source", param_string,
&init_scan_source) == SANE_STATUS_GOOD)
if (read_option_str_list (line, "scan-source", param_string,
&init_scan_source, source_list) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "test-picture", param_string,
&init_test_picture) == SANE_STATUS_GOOD)
if (read_option_str_list (line, "test-picture", param_string,
&init_test_picture, test_picture_list) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "invert-endianess", param_bool,
&init_invert_endianess) == SANE_STATUS_GOOD)
@ -1787,8 +1826,8 @@ sane_init (SANE_Int * __sane_unused__ version_code, SANE_Auth_Callback __sane_un
if (read_option (line, "read-delay-duration", param_int,
&init_read_delay_duration) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "read-status-code", param_string,
&init_read_status_code) == SANE_STATUS_GOOD)
if (read_option_str_list (line, "read-status-code", param_string,
&init_read_status_code, read_status_code_list) == SANE_STATUS_GOOD)
continue;
if (read_option (line, "ppl-loss", param_int,
&init_ppl_loss) == SANE_STATUS_GOOD)

Wyświetl plik

@ -21,6 +21,21 @@
extern int sanei_debug_xerox_mfp;
static int
xerox_need_clear_halt()
{
char *env;
int workaround = 0;
env = getenv("SANE_XEROX_USB_HALT_WORKAROUND");
if (env) {
workaround = atoi(env);
DBG(5, "xerox_need_clear_halt: workaround: %d\n", workaround);
return workaround;
}
return 0;
}
int
usb_dev_request(struct device *dev,
SANE_Byte *cmd, size_t cmdlen,
@ -70,7 +85,9 @@ usb_dev_open(struct device *dev)
dev->dn = -1;
return status;
}
sanei_usb_clear_halt(dev->dn);
if (xerox_need_clear_halt()) {
sanei_usb_clear_halt(dev->dn);
}
return SANE_STATUS_GOOD;
}
@ -92,7 +109,9 @@ usb_dev_close(struct device *dev)
ret_cancel(dev, 0);
}
sanei_usb_clear_halt(dev->dn); /* unstall for next users */
if (xerox_need_clear_halt()) {
sanei_usb_clear_halt(dev->dn); /* unstall for next users */
}
sanei_usb_close(dev->dn);
dev->dn = -1;
}

Wyświetl plik

@ -209,14 +209,16 @@ static int isSupportedDevice(struct device __sane_unused__ *dev)
#ifdef HAVE_LIBJPEG
/* Checking device which supports JPEG Lossy compression for color scanning*/
if (dev->compressionTypes & (1 << 6)) {
/* blacklist malfunctioning device(s) */
if (!strncmp(dev->sane.model, "SCX-4500W", 9) ||
!strncmp(dev->sane.model, "C460", 4) ||
!!strstr(dev->sane.model, "CLX-3170") ||
!!strstr(dev->sane.model, "4x24") ||
!!strstr(dev->sane.model, "4x28") ||
!strncmp(dev->sane.model, "M288x", 5))
return 0;
/* blacklist malfunctioning device(s) */
if (!strncmp (dev->sane.model, "SCX-4500W", 9)
|| !strncmp (dev->sane.model, "C460", 4)
|| !!strstr(dev->sane.model, "SCX-472")
|| !!strstr (dev->sane.model, "WorkCentre 3225")
|| !!strstr (dev->sane.model, "CLX-3170")
|| !!strstr (dev->sane.model, "4x24")
|| !!strstr (dev->sane.model, "4x28")
|| !strncmp (dev->sane.model, "M288x", 5))
return 0;
return 1;
} else
return 0;
@ -246,7 +248,7 @@ static void dbg_dump(struct device *dev)
for (i = 0; i < dlen; i++, dptr += 3)
sprintf(dptr, " %02x", dev->res[i]);
DBG(5, "[%lu]%s%s\n", (u_long)dev->reslen, dbuf,
DBG(5, "[%zu]%s%s\n", dev->reslen, dbuf,
(dlen < (int)dev->reslen)? "..." : "");
}
@ -273,8 +275,8 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
}
dev->state = 0;
DBG(4, ":: dev_command(%s[%#x], %lu)\n", str_cmd(cmd[2]), cmd[2],
(u_long)reqlen);
DBG(4, ":: dev_command(%s[%#x], %zu)\n", str_cmd(cmd[2]), cmd[2],
reqlen);
status = dev->io->dev_request(dev, cmd, sendlen, res, &dev->reslen);
if (status != SANE_STATUS_GOOD) {
DBG(1, "%s: dev_request: %s\n", __func__, sane_strstatus(status));
@ -289,8 +291,8 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
/* normal command reply, some sanity checking */
if (dev->reslen < reqlen) {
DBG(1, "%s: illegal response len %lu, need %lu\n",
__func__, (u_long)dev->reslen, (u_long)reqlen);
DBG(1, "%s: illegal response len %zu, need %zu\n",
__func__, dev->reslen, reqlen);
dev->state = SANE_STATUS_IO_ERROR;
return 0;
} else {
@ -306,14 +308,14 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
}
pktlen = dev->res[2] + 3;
if (dev->reslen != pktlen) {
DBG(2, "%s: illegal response len %lu, should be %lu\n",
__func__, (u_long)pktlen, (u_long)dev->reslen);
DBG(2, "%s: illegal response len %zu, should be %zu\n",
__func__, pktlen, dev->reslen);
dev->state = SANE_STATUS_IO_ERROR;
return 0;
}
if (dev->reslen > reqlen)
DBG(2, "%s: too big packet len %lu, need %lu\n",
__func__, (u_long)dev->reslen, (u_long)reqlen);
DBG(2, "%s: too big packet len %zu, need %zu\n",
__func__, dev->reslen, reqlen);
}
dev->state = 0;
@ -501,7 +503,7 @@ static SANE_String_Const doc_sources[] = {
};
static int doc_source_to_code[] = {
0x40, 0x20, 0x80
DOC_FLATBED, DOC_ADF, DOC_AUTO
};
static SANE_String_Const scan_modes[] = {
@ -701,6 +703,14 @@ static void set_parameters(struct device *dev)
}
}
/* determine if document is to be sourced from ADF */
static int sourcing_from_adf(struct device *dev)
{
return (dev->doc_source == DOC_ADF ||
(dev->doc_source == DOC_AUTO && dev->doc_loaded));
}
/* resolve all options related to scan window */
/* called after option changed and in set_window */
static int fix_window(struct device *dev)
@ -730,11 +740,10 @@ static int fix_window(struct device *dev)
dev->doc_source = doc_source_to_code[string_match_index(doc_sources, dev->val[OPT_SOURCE].s)];
/* max window len is dependent of document source */
if (dev->doc_source == DOC_FLATBED ||
(dev->doc_source == DOC_AUTO && !dev->doc_loaded))
dev->max_len = dev->max_len_fb;
else
if (sourcing_from_adf(dev))
dev->max_len = dev->max_len_adf;
else
dev->max_len = dev->max_len_fb;
/* parameters */
dev->win_y_range.max = SANE_FIX((double)dev->max_len / PNT_PER_MM);
@ -878,8 +887,9 @@ dev_inquiry(struct device *dev)
dev->res[0x3f];
dev->line_order = dev->res[0x31];
dev->compressionTypes = dev->res[0x32];
dev->doc_loaded = (dev->res[0x35] == 0x02) &&
(dev->res[0x26] & 0x03);
dev->has_adf = ((dev->res[0x26] & 0x03) != 0);
dev->doc_loaded = (dev->res[0x35] == 0x02)
&& dev->has_adf;
init_options(dev);
reset_options(dev);
@ -890,6 +900,25 @@ dev_inquiry(struct device *dev)
return SANE_STATUS_GOOD;
}
static SANE_Status
dev_inquiry_adf_status(struct device *dev)
{
if (!dev_cmd(dev, CMD_INQUIRY))
return SANE_STATUS_IO_ERROR;
dev->has_adf = ((dev->res[0x26] & 0x03) != 0);
dev->doc_loaded = (dev->res[0x35] == 0x02)
&& dev->has_adf;
DBG(3, "%s: ADF present: %s, loaded: %s\n", __func__,
(dev->has_adf ? "true" : "false"),
(dev->doc_loaded ? "true" : "false"));
return SANE_STATUS_GOOD;
}
const SANE_Option_Descriptor *
sane_get_option_descriptor(SANE_Handle h, SANE_Int opt)
{
@ -1317,7 +1346,7 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
return SANE_STATUS_EOF;
/* if there is no data to read or output from buffer */
if (!dev->blocklen && dev->datalen <= PADDING_SIZE) {
if (!dev->blocklen && (dev->datalen <= PADDING_SIZE || dev->final_block)) {
/* copying uncompressed data */
if (dev->composition == MODE_RGB24 &&
@ -1331,6 +1360,13 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
dev->total_out_size += *lenp;
return SANE_STATUS_GOOD;
}
} else if (dev->composition != MODE_RGB24) {
int diff = dev->total_img_size - dev->total_out_size;
int bufLen = (diff < maxlen) ? diff : maxlen;
if (diff > 0 && copy_plain_trim(dev, buf, bufLen, lenp) > 0) {
dev->total_out_size += *lenp;
return SANE_STATUS_GOOD;
}
}
/* and we don't need to acquire next block */
@ -1353,7 +1389,10 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
remove(encTmpFileName);
}
/* that's all */
dev_stop(dev);
/* finished receving the document; */
/* stop and release the unit, unless sourcing from ADF */
if (!sourcing_from_adf(dev))
dev_stop(dev);
return SANE_STATUS_EOF;
}
@ -1381,23 +1420,27 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
int olen; /* output len */
/* read as much data into the buffer */
datalen = DATAROOM(dev) & USB_BLOCK_MASK;
datalen = MIN(dev->blocklen, DATAROOM(dev) & USB_BLOCK_MASK);
while (datalen && dev->blocklen) {
SANE_Byte *rbuf = dev->data + DATATAIL(dev);
DBG(9, "<> request len: %lu, [%d, %d; %d]\n",
(u_long)datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
DBG(9, "<> request len: %zu, [%d, %d; %d]\n",
datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
if ((status = dev->io->dev_request(dev, NULL, 0, rbuf, &datalen)) !=
SANE_STATUS_GOOD)
return status;
dev->datalen += datalen;
dev->blocklen -= datalen;
DBG(9, "<> got %lu, [%d, %d; %d]\n",
(u_long)datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
DBG(9, "<> got %zu, [%d, %d; %d]\n",
datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
if (dev->blocklen < 0)
return ret_cancel(dev, SANE_STATUS_IO_ERROR);
datalen = DATAROOM(dev) & USB_BLOCK_MASK;
datalen = MIN(dev->blocklen, DATAROOM(dev) & USB_BLOCK_MASK);
}
if (buf && lenp) { /* read mode */
@ -1453,7 +1496,6 @@ SANE_Status
sane_start(SANE_Handle h)
{
struct device *dev = h;
DBG(3, "%s: %p\n", __func__, h);
dev->cancel = 0;
@ -1464,22 +1506,24 @@ sane_start(SANE_Handle h)
dev->blocks = 0;
if (!dev->reserved) {
if (dev->has_adf
&& (dev->doc_source == DOC_AUTO || dev->doc_source == DOC_ADF)) {
if (dev_inquiry_adf_status(dev) != SANE_STATUS_GOOD)
return dev_stop(dev);
}
if (!dev_cmd_wait(dev, CMD_RESERVE_UNIT))
return dev->state;
dev->reserved++;
if (!dev_set_window(dev) ||
(dev->state && dev->state != SANE_STATUS_DEVICE_BUSY))
return dev_stop(dev);
}
if (!dev_set_window(dev) ||
(dev->state && dev->state != SANE_STATUS_DEVICE_BUSY))
return dev_stop(dev);
if (!dev_cmd_wait(dev, CMD_OBJECT_POSITION))
return dev_stop(dev);
if (!dev_cmd(dev, CMD_READ) ||
(dev->state && dev->state != SANE_STATUS_DEVICE_BUSY))
return dev_stop(dev);
dev->scanning = 1;
dev->final_block = 0;
dev->blocklen = 0;

Wyświetl plik

@ -169,6 +169,10 @@ usb 0x04e8 0x3450
#Samsung SCX-472x Series, Samsung SCX-4729FD
usb 0x04e8 0x3453
#Samsung SCX-4729FW, network mode
# tcp HOST_NAME_OR_IP PORT
#tcp scx4729fw 9400
#Samsung CLX-6260 Series
usb 0x04e8 0x3455
@ -251,6 +255,9 @@ usb 0x0924 0x42da
#Xerox WorkCentre 3225
usb 0x0924 0x42dc
#Xerox WorkCentre 3335
usb 0x0924 0x42e2
###################
### Dell Models ###
###################
@ -260,3 +267,6 @@ usb 0x413c 0x5124
#Dell 1235cn (clone of Samsung CLX-3175)
usb 0x413c 0x5310
#Dell 1135n (clone of Samsung SCX-4623F)
usb 0x413c 0x5318

Wyświetl plik

@ -64,6 +64,7 @@ struct device {
int state; /* current state */
int reserved; /* CMD_RESERVE_UNIT */
int reading; /* READ_IMAGE is sent */
int has_adf; /* ADF is present */
SANE_Byte *data; /* postprocessing cyclic buffer 64k */
int datalen; /* how data in buffer */

Wyświetl plik

@ -117,6 +117,9 @@ SANE_CHECK_PTHREAD
SANE_CHECK_LOCKING
SANE_CHECK_GPHOTO2
dnl **************************************************************
dnl Check for V4L availability
dnl **************************************************************
AC_ARG_WITH(v4l,
AS_HELP_STRING([--with-v4l],
@ -128,23 +131,32 @@ if test "$with_v4l" != "no" ; then
PKG_CHECK_MODULES(LIBV4L, [libv4l1 >= 0.8.3], have_libv4l1=yes, have_libv4l1=no)
fi
dnl **************************************************************
dnl Check for AVAHI availability
dnl **************************************************************
AC_ARG_WITH(avahi,
AS_HELP_STRING([--with-avahi],
[enable Avahi support @<:@default=check@:>@]),
[],
[with_avahi=check])
AC_DEFINE(WITH_AVAHI,
[0], [Define to 1 if Avahi support is available])
AS_IF([test xno != "x$with_avahi"],
[PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6.24],
[AC_DEFINE([WITH_AVAHI], [1])
with_avahi=yes
[with_avahi=yes
],
[AS_IF([test xcheck != "x$with_avahi"],
[AC_MSG_ERROR([Avahi support requested but not found])])
with_avahi=no
])
])
AS_IF([test xno != "x$with_avahi"],
[AC_DEFINE(WITH_AVAHI,
[1], [Define to 1 if Avahi support is available])],
[AC_DEFINE(WITH_AVAHI,
[0], [Define to 1 if Avahi support is available])])
AM_CONDITIONAL([have_libavahi], [test x != "x$AVAHI_LIBS"])
dnl check sane to make sure we don't have two installations
@ -160,18 +172,23 @@ AC_ARG_WITH(snmp,
[enable SNMP support @<:@default=check@:>@]),
[],
[with_snmp=check])
AC_DEFINE(HAVE_LIBSNMP,
[0], [Define to 1 if libsnmp is available])
AS_IF([test xno != "x$with_snmp"],
[PKG_CHECK_MODULES(SNMP, [netsnmp >= 5.6],
[AC_DEFINE([HAVE_LIBSNMP], [1])
with_snmp=yes
[with_snmp=yes
],
[AS_IF([test xcheck != "x$with_snmp"],
[AC_MSG_ERROR([libsnmp requested but not found])])
with_snmp=no
])
])
AS_IF([test xno != "x$with_snmp"],
[AC_DEFINE(HAVE_LIBSNMP,
[1], [Define to 1 if libsnmp is available])],
[AC_DEFINE(HAVE_LIBSNMP,
[0], [Define to 1 if libsnmp is available])])
AM_CONDITIONAL([have_snmp], [test x != "x$SNMP_LIBS"])
dnl ***********************************************************************
@ -423,18 +440,23 @@ AC_ARG_WITH(libcurl,
[enable functionality that needs libcurl @<:@default=check@:>@]),
[],
[with_libcurl=check])
AC_DEFINE(HAVE_LIBCURL,
[0], [Define to 1 if libcurl is available])
AS_IF([test xno != "x$with_libcurl"],
[PKG_CHECK_MODULES(libcurl, [libcurl],
[AC_DEFINE([HAVE_LIBCURL], [1])
with_libcurl=yes
[with_libcurl=yes
],
[AS_IF([test xcheck != "x$with_libcurl"],
[AC_MSG_ERROR([libcurl requested but not found])])
with_libcurl=no
])
])
AS_IF([test xno != "x$with_libcurl"],
[AC_DEFINE(HAVE_LIBCURL,
[1], [Define to 1 if libcurl is available])],
[AC_DEFINE(HAVE_LIBCURL,
[0], [Define to 1 if libcurl is available])])
AM_CONDITIONAL([have_libcurl], [test x != "x$libcurl_LIBS"])
dnl ******************************************************************
@ -445,18 +467,23 @@ AC_ARG_WITH(poppler-glib,
[enable functionality that needs poppler-glib @<:@default=check@:>@]),
[],
[with_poppler_glib=check])
AC_DEFINE(HAVE_POPPLER_GLIB,
[0], [Define to 1 if libpoppler-glib is available])
AS_IF([test xno != "x$with_poppler_glib"],
[PKG_CHECK_MODULES(POPPLER_GLIB, [poppler-glib],
[AC_DEFINE([HAVE_POPPLER_GLIB], [1])
with_poppler_glib=yes
[with_poppler_glib=yes
],
[AS_IF([test xcheck != "x$with_poppler_glib"],
[AC_MSG_ERROR([poppler-glib requested but not found])])
with_poppler_glib=no
])
])
AS_IF([test xno != "x$with_poppler_glib"],
[AC_DEFINE(HAVE_POPPLER_GLIB,
[1], [Define to 1 if libpoppler-glib is available])],
[AC_DEFINE(HAVE_POPPLER_GLIB,
[0], [Define to 1 if libpoppler-glib is available])])
AM_CONDITIONAL([have_poppler_glib], [test x != "x$POPPLER_GLIB_LIBS"])
dnl ******************************************************************
@ -645,7 +672,7 @@ ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
dell1600n_net dmc epjitsu epson epson2 epsonds escl fujitsu \
genesys gphoto2 gt68xx hp hp3500 hp3900 hp4200 hp5400 \
hp5590 hpsj5s hpljm1005 hs2p ibm kodak kodakaio kvs1025 kvs20xx \
kvs40xx leo lexmark ma1509 magicolor \
kvs40xx leo lexmark lexmark_x2600 ma1509 magicolor \
matsushita microtek microtek2 mustek mustek_pp \
mustek_usb mustek_usb2 nec net niash pie pieusb pint \
pixma plustek plustek_pp qcam ricoh ricoh2 rts8891 s9036 \

Wyświetl plik

@ -38,7 +38,7 @@ BACKEND_5MANS = sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-as6e.5 \
sane-hp5590.5 sane-hpljm1005.5 sane-cardscan.5 sane-hp3900.5 \
sane-epjitsu.5 sane-hs2p.5 sane-canon_dr.5 sane-xerox_mfp.5 \
sane-rts8891.5 sane-coolscan3.5 sane-kvs1025.5 sane-kvs20xx.5 \
sane-kvs40xx.5 sane-p5.5 sane-magicolor.5
sane-kvs40xx.5 sane-p5.5 sane-magicolor.5 sane-lexmark_x2600.5
EXTRA_DIST += sane-abaton.man sane-agfafocus.man sane-apple.man sane-as6e.man \
sane-canon_lide70.man \
@ -64,7 +64,7 @@ EXTRA_DIST += sane-abaton.man sane-agfafocus.man sane-apple.man sane-as6e.man \
sane-cardscan.man sane-hp3900.man sane-epjitsu.man sane-hs2p.man \
sane-canon_dr.man sane-xerox_mfp.man sane-rts8891.man \
sane-coolscan3.man sane-kvs1025.man sane-kvs20xx.man sane-kvs40xx.man \
sane-p5.man sane-magicolor.man
sane-p5.man sane-magicolor.man sane-lexmark_x2600.man
man7_MANS = sane.7
EXTRA_DIST += sane.man
@ -130,6 +130,7 @@ BEDOCS += plustek/FAQ \
plustek/Plustek-PARPORT.changes plustek/Plustek-PARPORT.txt \
plustek/Plustek-USB-TODO.txt plustek/Plustek-USB.changes \
plustek/Plustek-USB.txt
BEDOCS += saned/saned.install.md
BEDOCS += sceptre/s1200.txt
BEDOCS += teco/teco1.txt teco/teco2.txt teco/teco3.txt
BEDOCS += u12/U12.changes u12/U12.todo

Wyświetl plik

@ -28,6 +28,74 @@
; Canon MFP2 conf file
;
; ---- V460 --------------------------
:model "G3070 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f4"
:status :untested
:comment "Testers needed!"
:model "G2070 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f5"
:status :untested
:comment "Testers needed!"
:model "G4070 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f3"
:status :untested
:comment "Testers needed!"
:model "G3030 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1105"
:status :untested
:comment "Testers needed!"
:model "G2030 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1106"
:status :untested
:comment "Testers needed!"
:model "TC-20M"
:interface "USB WiFi"
:usbid "0x04a9" "0x18fc"
:status :untested
:comment "Testers needed!"
:model "TC-5200M"
:interface "USB WiFi"
:usbid "0x04a9" "0x18ff"
:status :untested
:comment "Testers needed!"
; ---- V450 --------------------------
:model "TS8630 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f8"
:status :untested
:comment "Testers needed!"
:model "XK110 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f9"
:status :untested
:comment "Testers needed!"
:model "GX3000 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f1"
:status :untested
:comment "Testers needed!"
:model "GX4000 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f2"
:status :untested
:comment "Testers needed!"
; ---- V440 --------------------------
:model "TS2400 series"

Wyświetl plik

@ -15,13 +15,13 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4003"
:comment "CIS scanner based on the GT6816 chip. Apparently all other devices are re-badged Artec scanners."
:comment "CIS scanner based on the GT6816 chip. Apparently all other devices are re-badged Artec scanners. Needs firmware 'Artec48.usb'"
:model "E+ Pro"
:status :minimal
:interface "USB"
:usbid "0x05d8" "0x4004"
:comment "Works up to 600dpi, but not 1200. Needs better calibration. See bug #310490"
:comment "Works up to 600dpi, but not 1200. Needs better calibration. See bug #310490. Needs firmware '1200.usb'"
:mfg "Medion/Lifetec/Tevion/Cytron"
@ -32,17 +32,19 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4003"
:comment "Needs firmware 'Artec48.usb'"
:model "MD9705"
:status :good
:interface "USB"
:usbid "0x05d8" "0x4003"
:comment "Needs firmware 'Artec48.usb'"
:model "MD4394"
:status :good
:interface "USB"
:usbid "0x05d8" "0x4003"
:comment "Only scanners with product id 0x4003 will work; try the gt68xx backend, if your scanner has product id 0x4002 "
:comment "Only scanners with product id 0x4003 will work; try the gt68xx backend, if your scanner has product id 0x4002 . Needs firmware 'Artec48.usb'"
:mfg "Trust"
@ -52,12 +54,13 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4006"
:comment "Needs firmware 'Artec48.usb'"
:model "240H Easy Webscan Gold"
:status :basic
:interface "USB"
:usbid "0x05d8" "0x4007"
:comment "Works up to 600 dpi"
:comment "Works up to 600 dpi. Needs firmware 'Artec48.usb'"
:mfg "Memorex"
@ -67,6 +70,7 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4005"
:comment "Needs firmware 'Artec48.usb'"
:mfg "Microstar"
@ -76,6 +80,7 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4003"
:comment "Needs firmware 'Artec48.usb'"
:mfg "UMAX"
@ -90,11 +95,13 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4009"
:comment "Needs firmware 'Artec48.usb'"
:model "AstraSlim 1200 SE"
:status :good
:interface "USB"
:usbid "0x05d8" "0x4010"
:comment "Needs firmware '1200.usb'"
:mfg "Yakumo"
@ -104,3 +111,4 @@
:status :good
:interface "USB"
:usbid "0x05d8" "0x4011"
:comment "Needs firmware 'Artec48.usb'"

Wyświetl plik

@ -10,7 +10,7 @@
;
:backend "canon_lide70" ; name of backend
:new :yes
:new :no
:url "http://www.juergen-ernst.de/info_sane.html"
:version "0" ; version of backend
:manpage "sane-canon_lide70" ; name of manpage (if it exists)

Wyświetl plik

@ -26,46 +26,46 @@
:interface "USB"
:status :good
:usbid "0x04c5" "0x10c7"
:comment "A6-size flatbed. Hardware provides 150/200/300/400/600 dpi in color. Software creates other resolutions, plus grayscale and binary modes. Hardware grayscale mode is not used due to poor calibration."
:comment "A6-size flatbed. Hardware provides 150/200/300/400/600 dpi in color. Software creates other resolutions, plus grayscale and binary modes. Hardware grayscale mode is not used due to poor calibration. Needs firmware '60f_0A00.nal'"
:model "ScanSnap S300"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1156"
:comment "Letter-size ADF. Hardware provides duplex, 150/225/300/600 dpi in color on AC or USB power. Software creates other resolutions, plus grayscale and binary modes. All buttons and sensors are exposed. Scanner always scans in _triplex_ color, fast USB required."
:comment "Letter-size ADF. Hardware provides duplex, 150/225/300/600 dpi in color on AC or USB power. Software creates other resolutions, plus grayscale and binary modes. All buttons and sensors are exposed. Scanner always scans in _triplex_ color, fast USB required. Needs firmware '300_0C00.nal'"
:model "ScanSnap S300M"
:interface "USB"
:status :good
:usbid "0x04c5" "0x117f"
:comment "Same as S300, with different usb id"
:comment "Same as S300, with different usb id. Needs firmware '300M_0C00.nal'"
:model "fi-65F"
:interface "USB"
:status :good
:usbid "0x04c5" "0x11bd"
:comment "Same as fi-60f, with different usb id. Button support untested."
:comment "Same as fi-60f, with different usb id. Button support untested. Needs firmware '65f_0A01.nal'"
:model "ScanSnap S1300"
:interface "USB"
:status :good
:usbid "0x04c5" "0x11ed"
:comment "Same as S300, with different usb id"
:comment "Same as S300, with different usb id. Needs firmware '1300_0C26.nal'"
:model "ScanSnap S1100"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1200"
:comment "Letter-size ADF. Hardware provides simplex, 300/600 dpi in color on USB power. Software creates other resolutions, plus grayscale and binary modes. All buttons and sensors are exposed. Scanner always scans in _triplex_ color, fast USB required."
:comment "Letter-size ADF. Hardware provides simplex, 300/600 dpi in color on USB power. Software creates other resolutions, plus grayscale and binary modes. All buttons and sensors are exposed. Scanner always scans in _triplex_ color, fast USB required. Needs firmware '1100_0B00.nal'"
:model "ScanSnap S1300i"
:interface "USB"
:status :good
:usbid "0x04c5" "0x128d"
:comment "Same as S300, with different usb id"
:comment "Same as S300, with different usb id. Needs firmware '1300i_0D12.nal'"
:model "ScanSnap S1100i"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1447"
:comment "Same as S1100, with different usb id"
:comment "Same as S1100, with different usb id. Needs firmware '1100i_0A00.nal'"

Wyświetl plik

@ -1055,6 +1055,11 @@
:status :complete
:comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one"
:model "L360 Series"
:interface "USB"
:usbid "0x04b8" "0x08d1"
:status :complete
:model "L365 Series"
:interface "USB"
:usbid "0x04b8" "0x08d2"
@ -1724,7 +1729,7 @@
:model "Perfection 610" ; command spec
:interface "USB"
:usbid "0x04b8" "0x0103"
:status :basic
:status :complete
:comment "overseas version of the GT-6600U"
:model "Perfection 636S"

Wyświetl plik

@ -358,3 +358,18 @@
:interface "USB"
:usbid "0x04b8" "0x11b1"
:status :complete
:model "ES-C220"
:interface "USB"
:usbid "0x04b8" "0x0193"
:status :complete
:model "DS-C330"
:interface "USB"
:usbid "0x04b8" "0x018f"
:status :complete
:model "DS-C490"
:interface "USB"
:usbid "0x04b8" "0x0191"
:status :complete

Wyświetl plik

@ -23,6 +23,11 @@
:status :good
:comment "All resolutions supported."
:model "MFC-J453DW"
:interface "Ethernet WiFi"
:status :good
:comment "All resolutions supported, Flatbed and ADF supported."
:model "MFC-J985DW"
:interface "Ethernet WiFi"
:status :good
@ -146,6 +151,16 @@
:status :good
:comment "All resolutions supported."
:model "PIXMA TS5100"
:interface "WiFi"
:status :good
:comment "All resolutions supported."
:model "PIXMA TS5150"
:interface "WiFi"
:status :good
:comment "All resolutions supported."
:model "PIXMA TS5350 Series"
:interface "WiFi"
:status :good
@ -199,6 +214,11 @@
:status :good
:comment "All resolutions supported."
:model "XP-4200 Series"
:interface "WiFi"
:status :good
:comment "All resolutions supported, Flatbed only supported."
:model "XP-6100"
:interface "WiFi"
:status :good

Wyświetl plik

@ -11,13 +11,14 @@
:backend "fujitsu" ; name of backend
:version "139" ; version of backend
:version "140" ; version of backend
:manpage "sane-fujitsu" ; name of manpage (if it exists)
:comment "Backend updated for SANE release 1.1.2, see sane-fujitsu manpage"
:comment "This backend supports most Fujitsu and Ricoh fi-series and similar scanners. See manpage for details."
:devicetype :scanner ; start of a list of devices....
; other types: :stillcam, :vidcam,
; :meta, :api
;==================================================
:mfg "Fujitsu" ; name a manufacturer
:url "http://www.fujitsu.com/"
:url "https://fujitsuscanners.com/"
@ -676,3 +677,150 @@
:interface "USB"
:status :good
:usbid "0x04c5" "0x162e"
;==================================================
:mfg "Ricoh" ; name a manufacturer
:url "http://www.ricoh.com/"
:model "fi-70F"
:interface "USB"
:status :untested
:usbid "0x05ca" "0x0308"
:model "fi-400F"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x151e"
:model "fi-800R"
:interface "USB"
:status :good
:usbid "0x04c5" "0x15fc"
:comment "Both feed methods are supported."
:model "fi-7300NX"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1575"
:comment "Ethernet and WiFi not supported."
:model "fi-7460"
:interface "USB"
:status :good
:usbid "0x04c5" "0x14be"
:model "fi-7480"
:interface "USB"
:status :good
:usbid "0x04c5" "0x14b8"
:model "fi-7600"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1521"
:model "fi-7700"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1520"
:model "fi-7700S"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x1522"
:model "fi-7800"
:interface "USB"
:status :good
:usbid "0x04c5" "0x160b"
:model "fi-7900"
:interface "USB"
:status :good
:usbid "0x04c5" "0x160a"
:model "fi-8040"
:interface "USB"
:status :untested
:usbid "0x05ca" "0x0307"
:model "fi-8150"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1601"
:comment "Ethernet not supported."
:model "fi-8150U"
:interface "USB"
:status :good
:usbid "0x04c5" "0x162d"
:model "fi-8170"
:interface "USB"
:status :good
:usbid "0x04c5" "0x15ff"
:comment "Ethernet not supported."
:model "fi-8190"
:interface "USB"
:status :good
:usbid "0x04c5" "0x15fd"
:comment "Ethernet not supported."
:model "fi-8250"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1602"
:comment "Ethernet not supported."
:model "fi-8250U"
:interface "USB"
:status :good
:usbid "0x04c5" "0x162e"
:model "fi-8270"
:interface "USB"
:status :good
:usbid "0x04c5" "0x1600"
:comment "Ethernet not supported."
:model "fi-8290"
:interface "USB"
:status :good
:usbid "0x04c5" "0x15fe"
:comment "Ethernet not supported."
:model "N7100"
:interface "USB Ethernet"
:status :untested
:usbid "0x04c5" "0x146f"
:model "ScanSnap iX100"
:interface "USB WiFi"
:status :good
:usbid "0x04c5" "0x13f4"
:comment "WiFi not supported."
:model "ScanSnap iX1300"
:interface "USB WiFi"
:status :good
:usbid "0x04c5" "0x162c"
:comment "WiFi not supported."
:model "ScanSnap iX1400"
:interface "USB"
:status :untested
:usbid "0x04c5" "0x1630"
:model "ScanSnap iX1600"
:interface "USB WiFi"
:status :good
:usbid "0x04c5" "0x1632"
:comment "WiFi not supported."
:model "ScanSnap SV600"
:interface "USB"
:status :unsupported
:usbid "0x04c5" "0x128e"
:comment "Also has a second USB VID 0x13ba. Will require some gymnastics to support."

Wyświetl plik

@ -71,6 +71,12 @@
:status :complete
:comment "900, 1800, 3600 and 7200 dpi resolutions are supported in both regular transparency and infrared modes"
:model "OpticFilm 8200i"
:interface "USB"
:usbid "0x07b3" "0x1825"
:status :unsupported
:comment "GL128 based"
; -----------------------------------------------------------------------------
:mfg "Medion/Lifetec/Tevion/Cytron"
@ -253,7 +259,7 @@
:status :complete
:comment "300, 600, 1200 dpi resolutions supported in flatbed scanning mode; 300, 600, 1200, 2400, 4800 dpi resolutions are supported in transparency and infrared transparency scanning modes"
:model "CanoScan 700F"
:model "CanoScan LiDE 700F"
:interface "USB"
:usbid "0x04a9" "0x1907"
:status :basic

Wyświetl plik

@ -14,7 +14,7 @@
:interface "USB"
:usbid "0x05d8" "0x4002"
:status :good
:comment "Works, only product id 0x4002 is supported"
:comment "Works, only product id 0x4002 is supported. Needs firmware 'Gt680xfw.usb'"
:model "Ultima 2000 e+"
:interface "USB"
@ -52,17 +52,19 @@
:interface "USB"
:usbid "0x0458" "0x201e"
:status :untested
:comment "Untested but should work."
:comment "Untested but should work. Needs firmware 'Cis3r5b1.fw'"
:model "Colorpage SF600"
:model "ColorPage SF600"
:interface "USB"
:usbid "0x0458" "0x2021"
:status :basic
:comment "Needs firmware 'cism216.fw'"
:model "Colorpage Vivid3x"
:interface "USB"
:usbid "0x0458" "0x2011"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "Colorpage Vivid3 V2"
:interface "USB"
@ -74,35 +76,42 @@
:interface "USB"
:usbid "0x0458" "0x2017"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "Colorpage Vivid4"
:model "ColorPage Vivid 4"
:usbid "0x0458" "0x2014"
:interface "USB"
:status :good
:comment "Needs firmware 'ccd68861.fw'"
:model "Colorpage Vivid4x"
:usbid "0x0458" "0x201b"
:interface "USB"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "Colorpage Vivid4xe"
:usbid "0x0458" "0x201a"
:interface "USB"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "Colorpage Vivid 1200 X"
:interface "USB"
:usbid "0x0458" "0x201d"
:status :good
:comment "Needs firmware 'ccd569.fw'"
:model "Colorpage Vivid 1200 XE"
:interface "USB"
:usbid "0x0458" "0x201f"
:status :good
:comment "Needs firmware 'ccd569.fw'"
; -----------------------------------------------------------------------------
:mfg "Googlegear"
:model "2000"
:interface "USB"
:usbid "0x05d8" "0x4002"
@ -123,7 +132,7 @@
:interface "USB"
:usbid "0x043d" "0x002d"
:status :good
:comment "Works, some resolutions fail at 16 bit, same as X70"
:comment "Works, some resolutions fail at 16 bit, same as X70. Needs firmware 'OSLO3071b2.usb'"
; -----------------------------------------------------------------------------
@ -177,22 +186,25 @@
:interface "USB"
:usbid "0x05d8" "0x4002"
:status :good
:comment "Needs firmware 'PS1fw.usb'"
:model "BearPaw 1200 CU Plus"
:model "Bearpaw 1200 CU Plus"
:interface "USB"
:usbid "0x055f" "0x021b"
:status :good
:comment "Needs firmware 'PS1Gfw.usb'"
:model "BearPaw 1200 CU Plus"
:model "Bearpaw 1200 CU Plus"
:interface "USB"
:usbid "0x055f" "0x021c"
:status :good
:comment "Needs firmware 'PS1Dfw.usb'"
:model "BearPaw 1200 TA"
:interface "USB"
:usbid "0x055f" "0x021e"
:status :good
:comment "Transparency adapter supported"
:comment "Transparency adapter supported. Needs firmware 'A1fw.usb'"
:model "BearPaw 1248 CU"
:interface "USB"
@ -216,24 +228,25 @@
:interface "USB"
:usbid "0x05d8" "0x4002"
:status :basic
:comment "Works, but is slow"
:comment "Works, but is slow. Needs firmware 'PS2fw.usb'"
:model "BearPaw 2400 CU Plus"
:interface "USB"
:usbid "0x055f" "0x021d"
:status :good
:comment "Needs firmware 'PS2Dfw.usb'"
:model "BearPaw 2400 TA"
:interface "USB"
:usbid "0x055f" "0x0218"
:status :good
:comment "Transparency adapter supported"
:comment "Transparency adapter supported. Needs firmware 'A2fw.usb'"
:model "BearPaw 2400 TA Plus"
:interface "USB"
:usbid "0x055f" "0x0219"
:status :good
:comment "Transparency adapter supported"
:comment "Transparency adapter supported. Needs firmware 'A2Dfw.usb'"
:model "BearPaw 2448 CS Plus"
:interface "USB"
@ -245,7 +258,7 @@
:interface "USB"
:usbid "0x055f" "0x021a"
:status :basic
:comment "Slow. Transparency adapter supported. Slow. Brightness depends on resolution?"
:comment "Slow. Transparency adapter supported. Slow. Brightness depends on resolution?. Needs firmware 'A2Nfw.usb'"
:model "Plug-n-Scan 2400 MT"
:interface "USB"
@ -263,23 +276,25 @@
:interface "USB"
:usbid "0x05d8" "0x4002"
:status :good
:comment "Needs firmware 'SBfw.usb'"
:model "ScanExpress 1248 UB"
:interface "USB"
:usbid "0x055f" "0x021f"
:status :complete
:comment "Needs firmware 'SBSfw.usb'"
:model "ScanExpress 2400 USB"
:interface "USB"
:usbid "0x05d8" "0x4002"
:status :minimal
:comment "Should be detected but may need some more work in the code. Testers welcome. Please contact me if you own this scanner."
:comment "Should be detected but may need some more work in the code. Testers welcome. Please contact me if you own this scanner. Needs firmware 'P9fw.usb'"
:model "ScanExpress A3 USB"
:interface "USB"
:usbid "0x055f" "0x0210"
:status :basic
:comment "Still some vertical stripes."
:comment "Still some vertical stripes. Needs firmware 'A32fw.usb'"
:model "ScanMagic 1200 UB Plus"
:interface "USB"
@ -349,16 +364,19 @@
:interface "USB"
:usbid "0x07b3" "0x0400"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "OpticPro 1248U"
:interface "USB"
:usbid "0x07b3" "0x0401"
:status :good
:comment "Needs firmware 'ccd548.fw'"
:model "OpticPro U16B"
:interface "USB"
:usbid "0x07b3" "0x0402"
:status :good
:comment "Needs firmware 'ccd68861.fw'"
:model "OpticPro U16B+"
:interface "USB"
@ -375,13 +393,13 @@
:interface "USB"
:usbid "0x07b3" "0x040b"
:status :good
:comment "Product ID 0x040b only."
:comment "Product ID 0x040b only. Needs firmware 'ccd548.fw'"
:model "OpticPro S24"
:interface "USB"
:usbid "0x07b3" "0x040e"
:status :good
:comment "Product ID 0x040e only. Is reported to work."
:comment "Product ID 0x040e only. Is reported to work. Needs firmware 'ccd569.fw'"
:model "OpticPro ST12"
:interface "USB"
@ -393,12 +411,13 @@
:interface "USB"
:usbid "0x07b3" "0x0413"
:status :good
:comment "Needs firmware 'cism216.fw'"
:model "OpticSlim 2400"
:interface "USB"
:usbid "0x07b3" "0x0422"
:status :good
:comment "Works up to 1200 dpi."
:comment "Works up to 1200 dpi. Needs firmware 'cis3R5B1.fw'"
:model "OpticSlim 2400 plus"
:interface "USB"
@ -406,24 +425,24 @@
:status :good
:comment "Same as OpticSlim 2400."
:model "OpticSlim 500 plus"
:model "OpticSlim 500 Plus"
:interface "USB"
:usbid "0x07b3" "0x046e"
:status :good
:comment "Need firmware from windows driver. Image is upside down because hardware in this model is upside down. Buttons not tested."
:comment "Image is upside down because hardware in this model is upside down. Buttons not tested. Needs firmware 'cis3R5B1.fw'"
:model "Iriscan Express 2"
:interface "USB"
:usbid "0x07b3" "0x045f"
:status :complete
:comment "Works up to 1200 dpi. Calibration with external calibration sheet supported"
:comment "Works up to 1200 dpi. Calibration with external calibration sheet supported. Needs firmware 'cism216.fw'"
; -----------------------------------------------------------------------------
:model "OpticSlim M12"
:interface "USB"
:usbid "0x07b3" "0x0412"
:status :complete
:comment "Works up to 1200 dpi. Calibration with external calibration sheet supported"
:comment "Works up to 1200 dpi. Calibration with external calibration sheet supported. Needs firmware 'cism216.fw'"
; -----------------------------------------------------------------------------
:mfg "RevScan"
@ -473,6 +492,6 @@
:interface "USB"
:usbid "0x04a7" "0x0444"
:status :good
:comment "Works up to 1200 dpi and 12 bits/color."
:comment "Works up to 1200 dpi and 12 bits/color. Needs firmware 'Cis3r5b1.fw'"
; -----------------------------------------------------------------------------

Wyświetl plik

@ -0,0 +1,32 @@
;
; SANE Backend specification file
;
; It's basically emacs-lisp --- so ";" indicates comment to end of line.
; All syntactic elements are keyword tokens, followed by a string or
; keyword argument, as specified.
;
; ":backend" *must* be specified.
; All other information is optional (but what good is the file without it?).
:backend "lexmark_x2600" ; name of backend
:version "1.0-0" ; version of backend (or "unmaintained")
:manpage "sane-lexmark_x2600" ; name of manpage (if it exists)
:url "https://gitlab.com/sane-project/backends/"
; backend's web page
:new :yes
:comment "This backend supports lexmark x2600 series scanners."
; comment about the backend
:devicetype :scanner ; start of a list of devices....
; other types: :stillcam, :vidcam,
; :meta, :api
:mfg "Lexmark" ; name a manufacturer
:url "http://www.lexmark.com/" ; manufacturer's URL
:model "X2670"
:interface "USB"
:usbid "0x043d" "0x011d"
:status :good
:comment "Supports 75, 150, 300, 600 dpi"

Wyświetl plik

@ -136,12 +136,24 @@
:status :untested
:comment "Testers needed!"
:model "G2030 series"
:interface "USB"
:usbid "0x04a9" "0x1106"
:status :untested
:comment "Testers needed!"
:model "PIXMA G2060"
:interface "USB"
:usbid "0x04a9" "0x18c1"
:status :untested
:comment "Testers needed!"
:model "G2070 series"
:interface "USB"
:usbid "0x04a9" "0x18f5"
:status :untested
:comment "Testers needed!"
:model "PIXMA G2100"
:interface "USB"
:usbid "0x04a9" "0x1795"
@ -166,12 +178,24 @@
:status :untested
:comment "Testers needed!"
:model "G3030 series"
:interface "USB"
:usbid "0x04a9" "0x1105"
:status :untested
:comment "Testers needed!"
:model "PIXMA G3060"
:interface "USB"
:usbid "0x04a9" "0x18c3"
:status :untested
:comment "Testers needed!"
:model "G3070 series"
:interface "USB"
:usbid "0x04a9" "0x18f4"
:status :untested
:comment "Testers needed!"
:model "PIXMA G4000 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x181d"
@ -184,6 +208,12 @@
:status :untested
:comment "Testers needed!"
:model "G4070 series"
:interface "USB"
:usbid "0x04a9" "0x18f3"
:status :untested
:comment "Testers needed!"
:model "PIXMA G4511"
:interface "USB WiFi"
:usbid "0x04a9" "0x183d"
@ -226,12 +256,42 @@
:status :untested
:comment "Testers needed!"
:model "PIXMA GX1000 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x110b"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX2000 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x110d"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX3000 Series"
:interface "USB"
:usbid "0x04a9" "0x18f1"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX4000"
:interface "USB"
:usbid "0x04a9" "0x18f2"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX6000 Series"
:interface "USB Ethernet WiFi"
:interface "USB"
:usbid "0x04a9" "0x18a6"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX6500 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1148"
:status :untested
:comment "Testers needed!"
:model "PIXMA GX7000"
:interface "USB"
:usbid "0x04a9" "0x18a8"
@ -935,6 +995,18 @@
:status :complete
:comment "Flatbed and ADF scan. All resolutions supported (up to 4800DPI)"
:model "TC-20M"
:interface "USB"
:usbid "0x04a9" "0x18fc"
:status :untested
:comment "Testers needed!"
:model "TC-5200M"
:interface "USB"
:usbid "0x04a9" "0x18ff"
:status :untested
:comment "Testers needed!"
:model "PIXMA TR4500 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1854"
@ -977,6 +1049,12 @@
:status :untested
:comment "Testers needed!"
:model "PIXMA TR7800 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1151"
:status :untested
:comment "Testers needed!"
:model "PIXMA TR8500 Series"
:interface "USB Ethernet WiFi"
:usbid "0x04a9" "0x1823"
@ -1163,6 +1241,18 @@
:status :good
:comment "All resolutions supported (up to 1200DPI). WiFi not tested by Pixma as yet."
:model "PIXMA TS6630 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x114e"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS6730 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1150"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS7330 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x188f"
@ -1193,6 +1283,30 @@
:status :untested
:comment "Testers needed!"
:model "PIXMA TS7600i series"
:interface "USB WiFi"
:usbid "0x04a9" "0x114f"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS7700 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x110f"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS7700A series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1111"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS7700i series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1152"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS8000 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1800"
@ -1265,6 +1379,18 @@
:status :untested
:comment "Testers needed!"
:model "PIXMA TS8630 Series"
:interface "USB"
:usbid "0x04a9" "0x18f8"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS8700 series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1118"
:status :untested
:comment "Testers needed!"
:model "PIXMA TS9000 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x179f"
@ -1337,6 +1463,18 @@
:status :untested
:comment "Testers needed!"
:model "PIXUS XK110 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18f9"
:status :untested
:comment "Testers needed!"
:model "PIXUS XK120 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x1119"
:status :untested
:comment "Testers needed!"
:model "PIXUS XK500 Series"
:interface "USB WiFi"
:usbid "0x04a9" "0x18df"
@ -1505,6 +1643,12 @@
:status :complete
:comment "Flatbed and ADF scan. All resolutions supported (up to 600DPI)."
:model "i-SENSYS MF750 Series"
:interface "USB Ethernet WiFi"
:usbid "0x04a9" "0x2885"
:status :untested
:comment "Testers needed!"
:model "i-SENSYS MF810/820"
:interface "USB Ethernet"
:usbid "0x04a9" "0x27a6"

Wyświetl plik

@ -17,12 +17,12 @@
:mfg "Ricoh" ; name a manufacturer
:url "http://www.ricoh.com/"
:model "Ricoh IS50" ; name models for above-specified mfg.
:model "IS50" ; name models for above-specified mfg.
:interface "SCSI"
:status :basic
;:comment "?"
:model "Ricoh IS60" ; name models for above-specified mfg.
:model "IS60" ; name models for above-specified mfg.
:interface "SCSI"
:status :basic
;:comment "?"

Wyświetl plik

@ -12,7 +12,7 @@
:backend "template" ; name of backend
:version "0.42" ; version of backend (or "unmaintained")
:new :yes ; Is the backend new to this SANE release?
:new :no ; Is the backend new to this SANE release?
; :yes or :no
:manpage "sane-template" ; name of manpage (if it exists)
:url "http://www.luser.com/temp/" ; backend's web page

Wyświetl plik

@ -43,6 +43,12 @@
:usbid "0x0924" "0x42dc"
:status :good
:model "WorkCentre 3335"
:interface "USB"
:usbid "0x0924" "0x42e2"
:status :basic
:comment "When scanning from automatic feeder, only the first page is scanned"
:mfg "Dell"
:url "http://www.dell.com/"
@ -56,6 +62,11 @@
:usbid "0x413c" "0x5310"
:status :good
:model "Dell 1135n"
:interface "USB Ethernet"
:usbid "0x413c" "0x5318"
:status :good
:mfg "Samsung"
:url "http://www.samsung.com"

Wyświetl plik

@ -84,7 +84,7 @@ support dynamic loading).
.SH ENVIRONMENT
.TP
.B SANE_CONFIG_DIR
This environment variable is list of directories where SANE looks
This environment variable is a list of directories where SANE looks
for the configuration file. On *NIX systems, directory names are
separated by a colon (`:'), under OS/2 by a semi-colon (`;').
If SANE_CONFIG_DIR is not set, SANE defaults to
@ -177,7 +177,6 @@ bugs.
We know we have a GUI bug when a parameter is not showing up when it
should (active) or vice versa. Finding out which parameters are active
across various Apple modes and models from the documentation
.I ftp://ftpdev.info.apple.com/devworld/Technical_Documentation/Peripherals_Documentation/
is an interesting exercise. I may have missed some dependencies. For example
of the threshold parameter the Apple Scanners Programming Guide says
nothing. I had to assume it is valid only in LineArt mode.
@ -238,7 +237,8 @@ looks like, goto to
.I apple.h
and #define the
.B NEUTRALIZE_BACKEND
macro. You can select the scanner model through the APPLE_MODEL_SELECT
macro. You can select the scanner model through the
.B APPLE_MODEL_SELECT
macro. Available options are
.BR APPLESCANNER ,
.BR ONESCANNER ,
@ -246,7 +246,9 @@ and
.BR COLORONESCANNER .
.PP
If you encounter a SCSI bus error or trimmed and/or displaced images please
set the environment variable SANE_DEBUG_SANEI_SCSI to 255 before sending me
set the environment variable
.B SANE_DEBUG_SANEI_SCSI
to 255 before sending me
the report.
.SH TODO
@ -257,12 +259,12 @@ Make
a non blocking backend. Properly support
.BR sane_set_io_mode ()
and
.BR sane_get_select_fd ()
.BR sane_get_select_fd ().
.TP
.B Scan
Make scanning possible for all models in all supported modes.
.PP
Add other missing functionality
Add other missing functionality.
.SH "SEE ALSO"
.BR sane (7),
@ -274,4 +276,4 @@ The
backend was written not entirely from scratch by
Milon Firikis. It is mostly based on the
.BR sane\-mustek (5)
backend from David Mosberger and Andreas Czechanowski
backend from David Mosberger and Andreas Czechanowski.

Wyświetl plik

@ -50,7 +50,9 @@ find the firmware file under
.SH CONFIGURATION
The contents of the
.I artec_eplus48u.conf
file is a list of usb lines containing vendor and product ids that correspond
file is a list of
.I usb
lines containing vendor and product ids that correspond
to USB scanners. The file can also contain option lines. Empty lines and
lines starting with a hash mark (#) are ignored. The scanners are
autodetected by
@ -59,7 +61,9 @@ statements which are already included into
.I artec_eplus48u.conf .
"vendor_id" and "product_id" are hexadecimal numbers that identify the scanner.
.PP
Every usb section can have additional options.
Every
.I usb
section can have additional options.
.TP
.B artecFirmwareFile @DATADIR@/sane/artec_eplus48u/Artec48.usb
The path to the firmware file. This option is required.

Wyświetl plik

@ -89,7 +89,7 @@ compression is disabled and the image is delivered in a
frame.
.TP
.B \-\-mode lineart|halftone [lineart]
Selects the scan mode (e.g., lineart,monochrome, or color).
Selects the scan mode (e.g., lineart, monochrome, or color).
.TP
.B \-\-resolution 200|240|300dpi [200]
Sets the resolution of the scanned image. Each scanner model supports
@ -148,7 +148,8 @@ Bottom-right y position of scan area.
.B \-\-source Automatic Document Feeder|Manual Feed Tray [Automatic Document Feeder]
Selects the scan source (such as a document feeder). This option is provided
to allow multiple image scans with
.BR xsane (1); it has no other purpose.
.BR xsane (1);
it has no other purpose.
.TP
.B \-\-batch[=(yes|no)] [no]
Enable/disable batch mode scanning. Batch mode allows scanning at maximum throughput
@ -171,7 +172,7 @@ Sets the timeout in seconds for semi-automatic feeder. The value 0 specifies
the hardware default value which varies based on the scanner model.
.TP
.B \-\-check\-adf[=(yes|no)] [no]
Check ADF Status prior to starting scan using the OBJECT POSITION command.
Check ADF status prior to starting scan using the OBJECT POSITION command.
Note that this feature requires RSC firmware level 1.5 or higher and dip
switch 4 must be in the on position. NOTE: This option has not been tested
extensively and may produce undesirable results.
@ -381,7 +382,7 @@ with a hash mark (#) are ignored.
.SH OPTIONS
The following options can be specified in the
.I bh.conf
file.
file:
.TP
.B disable\-optional\-frames
This option prevents the backend from sending any optional frames. This
@ -544,7 +545,9 @@ prior to initiating the last scan command. Currently, there is no mechanism
available for the frontend to pass this knowledge to the backend.
If batch mode is enabled and the
.B \-\-end\-count
terminates a scanadf session,
terminates a
.BR scanadf (1)
session,
an extra page will be pulled through the scanner, but is neither read
nor delivered to the frontend. The issue can be avoided by specifying
.B \-\-batch=no
@ -556,7 +559,7 @@ with revision 1.2 or higher that is faster and more reliable than the
standard Bar/Patch code decoder. This is not currently supported.
.SH BUGS
This is a new backend; detailed bug reports are welcome -- and expected ;)
Detailed bug reports are welcome -- and expected ;)
.PP
If you have found something that you think is a bug, please attempt to
recreate it with the

Wyświetl plik

@ -68,30 +68,28 @@ The supported options are currently
and
.BR force_nibble
Option
.B ieee1284
.IR port-name
defines which port to use. The format of port-name is OS dependent, based on
the names presented by libieee1284. Please only have one of these lines, or
.TP
.B ieee1284 port-name
Defines which port to use. The format of port-name is OS dependent, based on
the names presented by
.BR libieee1284 (3).
Please only have one of these lines, or
all but one will be ignored.
Option
.B calibrate
.IR cal-file
.IR [port-name]
defines which calibration file to use on a per-port basis. If you only have
.TP
.B calibrate cal-file [port-name]
Defines which calibration file to use on a per-port basis. If you only have
one parport, the port-name argument may be omitted \- but be careful as this
will cause problems on multi-scanner systems. You may have as many of these
lines as you like, as long as each has a unique port name. The tilde (`~')
character is acceptable and will be expanded to the value of the HOME
environment.
character is acceptable and will be expanded to the value of the
.B HOME
environment variable.
Option
.B init_mode
.IR <AUTO|FB620P|FB630P>
.IR [portname]
defines which initialisation (wake-up) mode to use on a per-port basis.
If you only have one parport, the portname argument may be omitted \- but
.TP
.B init_mode <AUTO|FB620P|FB630P> [port-name]
Defines which initialisation (wake-up) mode to use on a per-port basis.
If you only have one parport, the port-name argument may be omitted \- but
be careful as this may cause problems on multi-scanner systems.
You may have as many of these lines as you like, as long as each has a unique
port name. The valid initialisation modes are FB620P (which strobes 10101010
@ -100,10 +98,11 @@ on the data pins) and AUTO, which will try FB630P mode first then FB620P mode
second. The FB620P mode is also used by the FB320P. The FB630P mode is used
by the FB330P, N340P, and N640P.
Option
.TP
.B force_nibble
forces the driver to use nibble mode even if ECP mode is reported to work by
libieee1284. This works-around the rare issue of ECP mode being reported to
Forces the driver to use nibble mode even if ECP mode is reported to work by
.BR libieee1284 (3).
This works-around the rare issue of ECP mode being reported to
work by the library, then not working.
.SH TIPS
@ -174,7 +173,9 @@ one returned during calibration) will be loaded.
.PP
.B Communication Problems
.PP
ECP mode in libieee1284 doesn't always work properly, even with new hardware.
ECP mode in
.BR libieee1284 (3)
doesn't always work properly, even with new hardware.
We believe that this is a ppdev problem. If you change the configuration file
to include
.B force_nibble

Wyświetl plik

@ -123,9 +123,9 @@ Eject the film strip or mounted slide when using the slide loader.
.TP
.B \-\-reset
Reset scanner. The scanner will perform the same action as when power is
turned on: it will eject the film strip (with the SF\-200 bulk feeder)
turned on: it will eject the slide (with the SF\-200 bulk feeder)
and calibrate itself. Use this whenever the scanner refuses to load
a film strip properly, as a result of
a slide properly, as a result of
which
.B \-\-eject
does not work.

Wyświetl plik

@ -82,7 +82,9 @@ unit is mm).
If set to "yes", the scanner will read the infrared channel, thus allowing
defect removal in software. The infrared image is read during a second scan,
with no options altered. The backend must not be restarted between the scans.
If you use scanimage, perform a batch scan with
If you use
.BR scanimage (1),
perform a batch scan with
.B \-\-batch\-count=2
to obtain the IR information.
.TP
@ -120,9 +122,9 @@ Eject the film strip or mounted slide when using the slide loader.
.TP
.B \-\-reset
Reset scanner. The scanner will perform the same action as when power is
turned on: it will eject the film strip (with the SF\-200 bulk loader)
turned on: it will eject the slide (with the SF\-200 bulk loader)
and calibrate itself. Use this
whenever the scanner refuses to load a film strip properly, as a result of
whenever the scanner refuses to load a slide properly, as a result of
which
.B \-\-eject
does not work.

Wyświetl plik

@ -49,7 +49,9 @@ This image is a 1599-by-1200 pixel full-color image constructed by filtering
and interpolating the "raw" image. The filtering and interpolation is
done in software, so this mode is very slow. Also, this mode places
restrictions on how the image is read which means that the "preview" mode
of xscanimage does not work in Super Resolution mode.
of
.BR xscanimage (1)
does not work in Super Resolution mode.
.RB ( xcam (1)
and the non-preview modes of
.BR scanimage (1)
@ -146,8 +148,8 @@ like.
.BR sane\-scsi (5)
.SH AUTHOR
David F. Skoll
Dianne Skoll <dianne@skoll.ca>
.PP
The backend is derived from
.BR sane\-hp (5)
by David Mosberger
by David Mosberger.

Wyświetl plik

@ -2,7 +2,7 @@
.IX sane\-epjitsu
.SH NAME
sane\-epjitsu \- SANE backend for Epson-based Fujitsu USB scanners.
sane\-epjitsu \- SANE backend for Epson-based Fujitsu USB scanners
.SH DESCRIPTION
The
@ -35,12 +35,12 @@ Selects the source for the scan. Options may include "Flatbed", "ADF Front", "AD
Selects the mode for the scan. Options may include "Lineart", "Gray", "Color".
.RE
.PP
.B resolution, y\-resolution
.BR resolution , " y\-resolution"
.RS
Controls scan resolution. Setting
.B \-\-resolution
also sets
.B \-\-y\-resolution,
.BR \-\-y\-resolution ,
though this behavior is overridden by some frontends.
.RE
.PP

Wyświetl plik

@ -5,12 +5,12 @@ sane\-epson \- SANE backend for EPSON scanners
.SH DESCRIPTION
The
.B sane\-epson
library implements a SANE Scanner Access Now Easy) backend that
library implements a SANE (Scanner Access Now Easy) backend that
provides access to Epson flatbed scanners. Some functions of this
backend should be considered
.B beta-quality
software! Most functions have been stable for a long time, but of
course new development can not and often times will not function properly from
course new development can not and often will not function properly from
the very first day. Please report any strange behavior to the
maintainer of the backend.
.PP
@ -255,8 +255,9 @@ The parallel interface can be configured in two ways: An integer value starting
at the beginning of a line will be interpreted as the IO address of the parallel
port. To make it clearer that a configured IO address is a parallel port the
port address can be preceded by the string "PIO". The PIO connection does not
use a special device file in the /dev directory. The IO address can be specified
in hex mode (prefixed with "0x").
use a special device file in the
.I /dev
directory. The IO address can be specified in hex mode (prefixed with "0x").
.TP
.I USB
A device file that is preceded by the string "USB" is treated as a scanner

Wyświetl plik

@ -266,7 +266,7 @@ will ignore this option.
The
.B \-\-bay
option selects which bay to scan
option selects which bay to scan.
The
.B \-\-eject

Wyświetl plik

@ -15,7 +15,7 @@ BROTHER DCP-J772DW, DCP-L2530DW
.br
BROTHER HL-L2590DW
.br
BROTHER MFC-J985DW, MFC-J1300DW
BROTHER MFC-J4540DW, MFC-J985DW, MFC-J1300DW
.br
CANON IR C3520
.br
@ -31,13 +31,13 @@ CANON PIXMA TS3100, TS3150, TS3151, TS3152, TS3300, TS3350
.br
CANON PIXMA TS3351, TS3352, TS3450, TS3451, TS3452, TS5350
.br
CANON PIXMA TS5351, TS6150, TS8050, TS8350, TS9100
CANON PIXMA TS5351, TS5150, TS6150, TS8050, TS8350, TS9100
.br
EPSON ET-2750, ET-3750, ET-4750
.br
EPSON EcoTank L3160
.br
EPSON XP-6100
EPSON XP-4200, XP-6100
.br
HP DESKJET 2710, DESKJET 2723, DESKJET 3760
.br

Wyświetl plik

@ -1,16 +1,16 @@
.TH sane\-fujitsu 5 "15 Nov 2022" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.TH sane\-fujitsu 5 "24 Mar 2023" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane\-fujitsu
.SH NAME
sane\-fujitsu \- SANE backend for Fujitsu flatbed and ADF scanners
sane\-fujitsu \- SANE backend for Fujitsu and Ricoh fi series scanners
.SH DESCRIPTION
The
.B sane\-fujitsu
library implements a SANE (Scanner Access Now Easy) backend which provides
access to most Fujitsu flatbed and ADF scanners.
access to most Fujitsu flatbed and ADF scanners, and the subsequent Ricoh models.
This document describes backend version 139, which initially shipped with SANE 1.1.2.
This document describes backend version 140.
.SH SUPPORTED HARDWARE
This version supports every known model which speaks the Fujitsu SCSI and
@ -20,14 +20,14 @@ supported. Please see the list at
.I http://www.sane\-project.org/sane\-supported\-devices.html
for details.
This backend may support other Fujitsu scanners. The best
This backend may support other Fujitsu or newer Ricoh scanners. The best
way to determine level of support is to test the scanner directly,
or to collect a trace of the windows driver in action.
Please contact the author for help or with test results.
.SH UNSUPPORTED HARDWARE
The following scanners are known NOT to work with this backend,
either because they have a non\-Fujitsu chipset, or an unsupported
either because they have an unsupported chipset, or an unsupported
interface type. Some of these scanners may be supported by another
backend.
.PP
@ -152,7 +152,7 @@ specify one. Probably should not be used with the other "scsi" line above.
.RS
Requests backend to search all usb buses in the system for a device
which uses that vendor and product id. The device will then be queried
to determine if it is a Fujitsu scanner.
to determine if it is a supported scanner.
.RE
.PP
"usb /dev/usb/scanner0" (or other device file)

Wyświetl plik

@ -48,7 +48,8 @@ GL841, GL843, GL847 or GL124 chipset, you can try to add it to the backend.
.SH "CALIBRATION"
To give correct image quality, sheet fed scanners need to be calibrated using the
calibration sheet sold with the scanner. To do calibration, you must insert this target
in the feeder then start calibration either by passing the \-\-calibrate option to scanimage
in the feeder then start calibration either by passing the \-\-calibrate option to
.BR scanimage (1)
or by clicking on the available 'calibrate' button in the 'advanced options' in a graphical
frontend. The result of the calibration is stored in a file in the home directory of the user doing it.
If you plug the scanner in another machine or use it with another account, calibration
@ -100,7 +101,7 @@ Disable use of a software adaptive algorithm to generate lineart and rely on har
.TP
.B \-\-color-filter None|Red|Green|Blue
When using gray or lineart this option selects the used color. Using a color filter
will give a monochrome scan. CIS based scanners can to true gray when no filter (None value) is
will give a monochrome scan. CIS based scanners can do true gray when no filter (None value) is
selected.
.TP
@ -123,7 +124,7 @@ users.
.B \-\-expiration\-time
Specify the time (in minutes) a cached calibration is considered valid. If older than the given value, a new
calibration is done. A value of -1 means no expiration and cached value are kept forever unless cleared by
userwith the calibration clear option. A value of 0 means cache is disabled.
user with the calibration clear option. A value of 0 means cache is disabled.
.PP
Additionally, several 'software' options are exposed by the backend. These
@ -248,9 +249,7 @@ Syscan/Ambir DocketPORT 467/485/487/665/685
Xerox Travel Scanner 100, Onetouch 2400
.RE
.TP
cncsolutions
.RI ( http://www.cncsolutions.com.br )
sponsored and supported the work on the Panasonic KV-SS080.
cncsolutions sponsored and supported the work on the Panasonic KV-SS080.
.br
.TP
Brian Paavo from Benthic Science Limited for donating a Canoscan LiDE 700F.
@ -298,7 +297,8 @@ due to the way image sensors are built.
.PP
This backend will be much slower if not using libusb\-1.0. So be sure that sane\-backends is built with
the
.B \-\-enable-libusb_1_0 option.
.B \-\-enable-libusb_1_0
option.
.SH "BUGS"
For the LiDE 200, the scanned data at 4800 dpi is obtained "as is" from sensor.

Wyświetl plik

@ -32,7 +32,7 @@ through the gphoto2 interface. Valid ports and cameras can be obtained
by
.I "gphoto2 \-\-list\-cameras"
and
.I "gphoto2 \-\-list\-ports".
.IR "gphoto2 \-\-list\-ports" .
.PP
The
.B dumpinquiry
@ -122,9 +122,9 @@ Set to 1, 2, or 3, to enable various levels of debugging within the
gphoto2 libraries.
.SH "SEE ALSO"
.BR sane (7) ,
.BR scanimage (1) ,
.BR xscanimage (1) ,
.BR sane (7),
.BR scanimage (1),
.BR xscanimage (1),
.BR libgphoto2 (3)
.SH AUTHOR

Wyświetl plik

@ -45,19 +45,18 @@ and
.IR http://penguin-breeder.org/kernel/download/ .
.PP
Support for models 5200C/62X0C/63X0C connected to the USB require
the kernel scanner driver or libusb. See
Support for models 5200C/62X0C/63X0C connected to USB requires
libusb. See
.BR sane\-usb (5)
for more details.
.PP
The
.B sane\-hp
backend no longer supports OfficeJet multi-function peripherals.
For these devices use the external "hpoj" backend in version 0.90 and later of
the "HP OfficeJet Linux driver", available at
.br
.IR http://hpoj.sourceforge.net
.
For these devices use the external "hplip" packages available at:
.IR https://developers.hp.com/hp\-linux\-imaging\-and\-printing/ .
For information about the previous hpoj driver, see:
.IR http://hpoj.sourceforge.net/ .
.PP
Because Hewlett-Packard does no longer produce scanners that support
SCL (beside the OfficeJets), the above list of supported scanners is
@ -70,7 +69,7 @@ You can also watch the sane\-devel mailing list at
.IR http://www.sane\-project.org/mailing\-lists.html .
.PP
More details about the hp backend can be found on its homepage
.IR http://www.kirchgessner.net/sane.html .
.IR http://web.archive.org/web/20070206115546/http://www.kirchgessner.net/sane.html .
.PP
.SH "DEVICE NAMES"
This backend expects device names of the form:
@ -220,8 +219,9 @@ levels reduce verbosity.
.TP
.B SANE_HOME_HP
Only used for OS/2 and along with use of HP PhotoSmart PhotoScanner.
Must be set to the directory where the directory .sane is located.
Is used to save and read the calibration file.
Must be set to the directory where the directory
.I .sane
is located. Is used to save and read the calibration file.
.TP
.B SANE_HP_KEEPOPEN_SCSI
.TP

Wyświetl plik

@ -0,0 +1,62 @@
.TH "sane\-lexmark_x2600" "5" "23 Dec 2023" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane\-lexmark_x2600
.SH "NAME"
sane\-lexmark_x2600 \- SANE backend for Lexmark X2600 Series scanners
.SH "DESCRIPTION"
The
.B sane\-lexmark
library implements a SANE (Scanner Access Now Easy) backend that
provides access to the scanner part of Lexmark X2600 AIOs.
.PP
The scanners that should work with this backend are:
.PP
.RS
.ft CR
.nf
Vendor Model status
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-
Lexmark X2670 good
.fi
.ft R
.RE
The options the backend supports can either be selected through
command line options to programs like
.BR scanimage (1)
or through GUI elements in
.BR xscanimage (1)
,
.BR xsane (1).
or
.BR simple-scan (1).
.br
If you notice any strange behavior, please report to the backend
maintainer or to the SANE mailing list.
.SH "FILES"
.TP
.I @LIBDIR@/libsane\-lexmark_x2600.a
The static library implementing this backend.
.TP
.I @LIBDIR@/libsane\-lexmark_x2600.so
The shared library implementing this backend (present on systems that
support dynamic loading).
.SH "ENVIRONMENT"
.TP
.B SANE_DEBUG_LEXMARK_X2600
If the library was compiled with debug support enabled, this
environment variable controls the debug level for this backend. E.g.,
a value of 255 requests all debug output to be printed. Smaller levels
reduce verbosity.
.SH "AUTHOR"
.TP
The backend was originally written by Benoit Juin.
.RI < benoit.juin@gmail.com >
.SH "CREDITS"
.TP
Many thanks go to:
@skelband aka Ralph Little who help me to dive in the sane-backencode and
reviewed the sources.

Wyświetl plik

@ -27,14 +27,14 @@ backend:
.ft R
.RE
.PP
(*) WARNING: None of the advanced options of these scanners are available (ie no color, no high resolution, no automatic cropping). Basically, the driver does no more than what it does for the KV-SS25. I don't have access to such scanners, and thus cannot add these options.
(*) WARNING: None of the advanced options of these scanners are available (i.e. no color, no high resolution, no automatic cropping). Basically, the driver does no more than what it does for the KV-SS25. I don't have access to such scanners, and thus cannot add these options.
Other Panasonic high speed scanners may or may not work with that backend.
Valid command line options and their syntax can be listed by using
Valid command line options and their syntax can be listed by using:
.RS
.PP
scanimage \-\-help \-d matsushita
.I scanimage \-\-help \-d matsushita
.RE
.TP
@ -58,13 +58,13 @@ selects the number of pages to scan (one or until the tray is empty).
.TP
.B \-\-paper\-size A4|...|Legal|Letter [A4]
options selects the area to scan. It adjust the
selects the area to scan. It adjusts the
.B \-l \-t \-x \-y
options accordingly. It does not need to be the real size of the paper.
.TP
.B \-l \-t \-x \-y
control the scan area: \-l sets the top left x coordinate, \-t the top
controls the scan area: \-l sets the top left x coordinate, \-t the top
left y coordinate, \-x selects the width and \-y the height of the scan
area. All parameters are specified in millimeters. It is possible to use
the option
@ -85,28 +85,28 @@ controls the contrast of the acquired image. Some models do not support that opt
automatically sets brightness, contrast, white level, gamma, noise reduction and image emphasis. These options are not available when automatic\-threshold is in use.
.TP
.B \-\-halftone\-pattern
option sets the tonal gradation for the halftone mode. Pattern downloading is not implemented by the backend.
sets the tonal gradation for the halftone mode. Pattern downloading is not implemented by the backend.
.TP
.B \-\-autoseparation
provides automatic separation of text and images.
.TP
.B \-\-white\-level
option indicate the source of the white base.
indicates the source of the white base.
.TP
.B \-\-noise\-reduction
reduces the isolated dot noise. This option is not supported by all scanners.
.TP
.B \-\-image\-emphasis
option sets the image emphasis. Some selection are not available on all scanners.
sets the image emphasis. Some selection are not available on all scanners.
.TP
.B \-\-gamma
options set the gamma curve. It is only valid for Gray modes, and is not available on all scanners. Gamma downloading is not implemented by the backend.
sets the gamma curve. It is only valid for Gray modes, and is not available on all scanners. Gamma downloading is not implemented by the backend.
.SH CONFIGURATION FILE
The configuration file
.I @CONFIGDIR@/matsushita.conf
supports the device name to use (eg
supports the device name to use (e.g.
.IR /dev/scanner )
and the SCSI option to auto-detect the scanners supported.

Wyświetl plik

@ -104,7 +104,7 @@ ignored. A sample configuration file is shown below:
The configuration file may also contain the special tokens
.I norealcal
or
.I noprecal.
.IR noprecal .
.I norealcal
will disable the use of magic, undocumented scanner calibration commands
which are known to work on the E6, but may not work with other models.

Wyświetl plik

@ -7,9 +7,7 @@ The
library implements a SANE (Scanner Access Now Easy) backend that
provides access to Microtek scanners with a SCSI-2 command set.
This backend can be considered alpha to beta. Some scanner models are reported
to work well, others not. New development versions of this backend can be
obtained from
.IR http://karstenfestag.gmxhome.de .
to work well, others not.
.PP
There exists a different backend for Microtek scanners with SCSI-1 command
set.
@ -17,7 +15,7 @@ Refer to
.BR sane\-microtek (5)
for details.
.PP
And there is work in progress for the ScanMaker 3600.
And there is partial progress for the ScanMaker 3600.
See
.IR http://sourceforge.net/projects/sm3600 .
.PP
@ -155,7 +153,9 @@ The configuration file may also contain options. Global options that are valid
for all devices are placed above the device names. Device-specific options
are
placed under the device name. Note that, except for option dump <n> and
option strip-height <n>, the entry in the microtek2.conf file only enables
option strip-height <n>, the entry in the
.I microtek2.conf
file only enables
the corresponding option for being showed in the frontend. There, in the
frontend, you can switch the options on and off.
Currently the following options are supported:

Wyświetl plik

@ -181,7 +181,9 @@ is 128. Because of double buffering the buffer actually sent to the scanner
is half the size of this value. Try to increase this value to achieve higher
scan speeds. Note that some ScanExpress scanners don't like buffer sizes above
64 kb (buffersize = 128). If your sg driver can't set SCSI buffer sizes at
runtime you may have to change that value, too. See sane\-scsi(5) for details.
runtime you may have to change that value, too. See
.BR sane\-scsi (5)
for details.
.PP
Option
.B blocksize
@ -312,7 +314,7 @@ I/O ports. Thus, either make frontends such as
.BR scanimage (1)
and
.BR xscanimage (1)
setuid root (generally not recommended for safety reasons) or, alternatively,
setuid root (generally not recommended for security reasons) or, alternatively,
access this backend through the network daemon
.BR saned (8).
.PP

Wyświetl plik

@ -100,7 +100,7 @@ Note that the backend needs to run as root or has to have appropriate access
rights to
.I /dev/parport*
if libieee1284 support is compiled in. To allow user
access to the scanner run the backend through the network interface (See
access to the scanner run the backend through the network interface (see
.BR saned (8)
and
.BR sane\-net (5)).
@ -109,15 +109,12 @@ Note also that the backend
support
.IR "parport sharing" ,
i.e. if you try printing while scanning, your computer may crash. To enable
parport sharing, you have to enable libieee1284 at compile time. This backend
also conflicts with the
.BR sane\-musteka4s2 (5)
backend. You can only enable one of them in your
parport sharing, you have to enable
.BR libieee1284 (3)
at compile time.
You may also have to enable the backend explicitly in your
.IR dll.conf .
However, you have
to enable the backend explicitly in your
.IR dll.conf ,
just remove the hash mark in the line "mustek_pp".
Just remove the hash mark in the line "mustek_pp".
.SH "DEVICE DEFINITION"
This backend allows multiple devices being defined and configured via the

Wyświetl plik

@ -86,7 +86,7 @@ Instead of using the device name, the scanner can be autodetected by
statements which are already included into
.IR mustek_usb.conf .
This is only supported with Linux 2.4.8 and higher and all systems that
support libsub. "vendor_id" and "product_id" are hexadecimal numbers that
support libusb. "vendor_id" and "product_id" are hexadecimal numbers that
identify the scanner. If this doesn't work, a device name and the option
specifying the scanner type must be placed in
.I mustek_usb.conf

Wyświetl plik

@ -93,10 +93,8 @@ are contacted in addition to the hosts listed above.
For this backend to function properly, it is also necessary to define the
.B sane\-port
service in
.IR /etc/services .
The
.B sane
service should be defined using a line of the following form:
.I /etc/services
using a line of the following form:
.PP
.RS
sane\-port 6566/tcp # SANE network scanner daemon

Wyświetl plik

@ -28,7 +28,7 @@ This backend expects device names of the form:
.RE
.PP
Where
\fBvalue\fR is :
\fBvalue\fR is:
.RS
.TP
@ -151,7 +151,9 @@ your
.IR @CONFIGDIR@/dll.conf .
If your scanner isn't detected, make sure you've defined the right port address, or the
correct device
in your p5.conf.
in your
.I p5.conf
file.
.TP
.I the name of your scanner/vendor
also a worthy information. Please also include the optical resolution and lamp type of your

Wyświetl plik

@ -19,9 +19,9 @@ Currently, the following models work with this backend:
.RS
PIXMA E410, E510, E4500
.br
PIXMA G600, G2000, G2010, G2100, G4000, G4511
PIXMA G600, G2000, G2010, G2030, G2070, G2100, G3030, G3070, G4000, G4070, G4511
.br
PIXMA GX6000, GX7000
PIXMA GX1000, GX2000, GX3000, GX4000, GX6000, GX6500, GX7000
.br
PIXMA MG2100, MG2200, MG2400, MG2500, MG2900, MG3000, MG3100
.br
@ -55,13 +55,15 @@ PIXMA MX410, MX420, MX470, MX510, MX520, MX530, MX700, MX720
.br
PIXMA MX850, MX860, MX870, MX882, MX885, MX890, MX920, MX7600
.br
PIXMA TC-20M, TC-5200M
.br
PIXMA TR4500, TR4600, TR4700
.br
PIXMA TS2400, TS2600, TS3100, TS3300, TS3450, TS3451, TS3452
.br
PIXMA TS3500, TS5000, TS5100, TS5350i, TS5400, TS6100, TS6200
.br
PIXMA TS7530, TS7450i ,TS8000, TS8530, TS8200
PIXMA TS7530, TS7450i ,TS8000, TS8200, TS8530, TS8630, TS8630
.br
PIXUS MP10
.br
@ -123,25 +125,27 @@ PIXMA MX320, MX390, MX430, MX450, MX490, MX710
.br
PIXMA G3000, G3010, G4010, G6000, G6080, G7000, GM4000, GM4080
.br
PIXMA TR7500, TR7530, TR7600, TR8500, TR8530, TR8580, TR8600
PIXMA TR7500, TR7530, TR7600, TR7800, TR8500, TR8530, TR8580 TR8600
.br
PIXMA TR8630, TR9530
.br
PIXMA TS3400, TS5100, TS6000, TS6130, TS6180, TS6230, TS6280, TS6300
.br
PIXMA TS6330, TS6330, TS6380, TS6400, TS7330, TS7400, TS7430, TS8100
PIXMA TS6330, TS6330, TS6380, TS6400, TS6630, TS6730, TS7330, TS7400,
.br
PIXMA TS8130, TS8180, TS8230, TS8280, TS8300, TS8330, TS8380, TS9000
PIXMA TS7430, TS7600i, TS7700, TS7700A, TS7700i, TS8100, TS8130
.br
PIXMA TS8180, TS8230, TS8280, TS8300, TS8330, TS8380, TS8700, TS9000
.br
PIXMA TS9100, TS9180, TS9500, TS9580
.br
PIXUS MP5, XK50, XK60, XK70, XK80, XK90, XK100, XK500
PIXUS MP5, XK50, XK60, XK70, XK80, XK90, XK100, XK110, XK120, XK500
.br
imageCLASS MF720, MF810/820, MF5630, MF5650, MF5750, MF8170c
.br
imageCLASS MPC190, D550
.br
i-SENSYS MF110, MF220, MF260, MF410, MF420, MF510, MF520, MF740
i-SENSYS MF110, MF220, MF260, MF410, MF420, MF510, MF520, MF740, MF750
.br
i-SENSYS MF5880dn, MF5900, MF6680dn, MF8500C
.br
@ -167,7 +171,7 @@ The backend supports:
.br
* a custom gamma table,
.br
* Automatic Document Feeder, Simplex and Duplex.
* Automatic Document Feeder, Simplex and Duplex,
.br
* Transparency Unit, 24 or 48 bits depth. Infrared channel on certain models.
.RE
@ -183,7 +187,7 @@ where aaaa is the scanners model and bbbb is the hostname or ip-adress.
Example: pixma:MF4800_192.168.1.45 is a MF4800 Series multi-function peripheral.
.PP
This backend, based on cloning original Canon drivers protocols, is in
a production stage. Designed has been carried out without any applicable
a production stage. Design has been carried out without any applicable
manufacturer documentation, probably never available. However, we have tested
it as well as we could, but it may not work in all situations. You will find
an up-to-date status at the project homepage. (See below).
@ -235,8 +239,8 @@ backward compatibility reasons.
.TP
.I button\-1 button\-2
(read only) These options will return the value of the respective buttons.
value 0 means that the button was not pressed, 1 is returned when the button
was pressed. Some scanners with more than two buttons send the button number
Value 0 means that the button was not pressed, 1 is returned when the button
was pressed. Some scanners, with more than two buttons, send the button number
as target.
.TP
.I original
@ -293,7 +297,7 @@ only scanners that cannot be auto-detected because they are on a different
subnet shall be listed here. If you do not use Linux and your OS does not allow enumeration of
interfaces (i.e. it does not support the
.BR getifaddrs ()
qfunction) you also may need
function) you also may need
to add your scanner here as well.
.PP
Scanners shall be listed in the configuration file as follows:
@ -302,48 +306,56 @@ Scanners shall be listed in the configuration file as follows:
.I <method>://<host>[:port][/timeout=<value>]
.RE
.PP
where method indicates the protocol used (bjnp is used for inkjet multi-functionals
and mfnp is used for laser multi-functionals).
.PP
host is the hostname or IP address of the scanner, e.g. bjnp://10.0.1.4
for IPv4, bjnp://[2001:888:118e:18e2:21e:8fff:fe36:b64a] for a literal
IPv6-address or bjnp://myscanner.mydomain.org for a hostname.
.PP
The port number is optional and in normally implied by the method.
.TP
.B method
indicates the protocol used.
.I bjnp
is used for inkjet multi-functionals and
.I mfnp
is used for laser multi-functionals).
.TP
.B host
is the hostname or IP address of the scanner, e.g.
.I bjnp://10.0.1.4
for IPv4,
.I bjnp://[2001:888:118e:18e2:21e:8fff:fe36:b64a]
for a literal IPv6-address or
.I bjnp://myscanner.mydomain.org
for a hostname.
.TP
.B port
is optional and is normally implied by the method.
Port 8610 is the standard port for mfnp, 8612 for bjnp.
.TP
.B timeout
scanner-specific timeout value for the network protocol. The value is in ms.
.PP
A scanner specific timeout value for the network protocol can be set using the
bjnp-timeout parameter. The value is in ms.
Define each scanner each on a separate line.
.PP
Define scanners each on a new line.
.PP
More globally applicable timeouts can be set using the bjnp-timeout parameter as follows:
More globally-applicable timeouts can be set using the bjnp-timeout parameter as follows:
.PP
.RS
.I bjnp-timeout=<value>
.RE
.PP
A timeout defined using bjnp-timeout will apply to the following scanner definitions
in the file. If required the bjnp-timeout setting
in the file. If required, the bjnp-timeout setting
can be defined multiple times, where each setting will apply only to the scanners that
follow the setting. The last setting is used for the auto discovered scanners.
follow the setting. The last setting is used for auto-discovered scanners.
If not explicitly set, the default 1000ms setting will apply.
.PP
Setting timeouts should only be required in exceptional cases.
.PP
.RE
.PP
If so desired networking can be disabled as follows:
If so desired, networking can be disabled as follows:
.RS
.IP -
If the first non-commented line contains
.B networking=no
all networking will be disabled.
This will cause all further statements in the configuration file to be ignored.
.IP -
A line that contains
.B auto_detection=no
will cause auto-detection to be skipped. Explicitly defined network scanners will still be probed.
.IP \fInetworking=no\FR
If the first non-commented line contains this entry all networking will be disabled.
All further statements in the configuration file will be ignored.
.IP \fIauto_detection=no\fR
This line will cause auto-detection to be skipped.
Explicitly defined network scanners will still be probed.
.SH USB SUPPORT
USB scanners will be auto-detected and require no configuration.
.SH NETWORKING SUPPORT
@ -446,7 +458,7 @@ the verbosity and includes the information printed at the lower levels.
.RE
.TP
.B PIXMA_EXPERIMENT
Setting to a non-zero value will enable the support for experimental models.
Setting to a non-zero value will enable experimental support for further models.
You should also set SANE_DEBUG_PIXMA to 11.
.TP
.B SANE_CONFIG_DIR

Wyświetl plik

@ -411,7 +411,9 @@ means autocalibration.
.RE
.PP
See the plustek.conf file for examples.
See the
.I plustek.conf
file for examples.
.PP
.B Note:
.br
@ -475,7 +477,7 @@ export SANE_DEBUG_PLUSTEK=10
.BR sane\-usb (5),
.BR sane\-u12 (5),
.BR sane\-gt68xx (5),
.BR sane-\mustek_pp (5),
.BR sane\-mustek_pp (5),
.BR sane\-find\-scanner (1),
.BR scanimage (1)
.br
@ -486,24 +488,20 @@ Please send any information and bug-reports to:
.br
.B SANE Mailing List
.PP
Additional info and hints can be obtained from our
.br
Mailing-List archive at:
.br
.I http://www.sane\-project.org/mailing\-lists.html
Additional info and hints can be obtained from our mailing-List archive at:
.IR http://www.sane\-project.org/mailing\-lists.html .
.PP
To obtain debug messages from the backend, please set the
environment-variable
.B SANE_DEBUG_PLUSTEK
before calling your favorite scan-frontend (i.e.
.BR scanimage (1)), i.e.:
.br
before calling your favorite SANE frontend (e.g.
.BR scanimage (1)):
.PP
.I export SANE_DEBUG_PLUSTEK=20 ; scanimage
.PP
The value controls the verbosity of the backend. Please note, that
values greater than 24 force the backend to output raw data files,
which could be rather large. The ending of these files is ".raw".
The value controls the verbosity of the output. Please note that
values greater than 24 force the backend to output raw data files
which could be rather large. The suffix of these files is ".raw".
For problem reports it should be enough the set the verbosity to
13.

Wyświetl plik

@ -291,21 +291,18 @@ Please send any information and bug-reports to:
.br
.B SANE Mailing List
.PP
Additional info and hints can be obtained from our
.br
Mailing-List archive at:
.br
.I http://www.sane\-project.org/mailing\-lists.html
Additional info and hints can be obtained from our mailing-List archive at:
.IR http://www.sane\-project.org/mailing\-lists.html .
.PP
To obtain debug messages from the backend, please set the
environment-variable
.B SANE_DEBUG_PLUSTEK_PP
before calling your favorite scan-frontend (i.e.
.BR xscanimage (1)), i.e.:
.br
before calling your favorite SANE frontend (e.g.
.BR xscanimage (1)):
.PP
.I export SANE_DEBUG_PLUSTEK_PP=20 ; xscanimage
.PP
The value controls the verbosity of the backend.
The value controls the verbosity of the output.
.PP
.SH "KNOWN BUGS & RESTRICTIONS"

Wyświetl plik

@ -44,7 +44,7 @@ is the SCSI vendor string,
.I MODEL
is the SCSI model string,
.I TYPE
is type SCSI device type string,
is the SCSI device type string,
.I BUS
is the SCSI bus number (named "host" in
.IR /proc/scsi/scsi ),
@ -195,7 +195,7 @@ maximum buffer size can be changed at program run time, and there is no restrict
version 2.2.7 on. If the new SG driver is available some backends
(e.g.
.BR sane\-umax (5),
.BR sane\-mustek (5) ,
.BR sane\-mustek (5),
.BR sane\-sharp (5))
automatically request larger SCSI
buffers. If a backend does not automatically request a larger SCSI buffer, set
@ -204,9 +204,9 @@ the environment variable
to the desired buffer size in bytes. It is not recommended to use more
than 1 MB, because for large values the probability increases that the
SG driver cannot allocate the necessary buffer(s). For ISA cards, even
1 MB might be a too large value. For a detailed discussion of memory
issues of the SG driver, see
.I http://www.torque.net/sg.
1 MB might be a too large value.
For a detailed discussion of the Linux SG SCSI driver see:
.IR https://tldp.org/HOWTO/SCSI-Generic-HOWTO .
.PP
For Linux kernels before version 2.2.7 the size of the buffer is only 32KB.
This works, but for many cheaper scanners this causes scanning to be slower by
@ -299,7 +299,7 @@ of the form ``restart (ncr dead ?)'' in your
.I /var/log/messages
file or on the system console, it's an indication that the timeout is too short.
In this case, find the line ``if (np->latetime>10)'' in file
.I ncr53c8xx.
.I ncr53c8xx.c
(normally in directory
.IR /usr/src/linux/drivers/scsi )
and change the constant 10 to, say, 60 (one minute).
@ -329,7 +329,7 @@ and with target-id 0 would be called
.IR /dev/sg0a ,
and the device with target-id 1 on that same bus would be
called
.IR /dev/sg0b,
.IR /dev/sg0b ,
and so on.
.SH ENVIRONMENT

Wyświetl plik

@ -98,7 +98,7 @@ default selection.
.TP
.B \-\-custom\-gamma
Custom Gamma This option determines whether a builtin or a custom
Custom Gamma. This option determines whether a builtin or a custom
gamma table is used. Possible settings are:
.I yes
(enables custom gamma tables) or
@ -197,7 +197,7 @@ This option is only available in scan mode
.TP
.B \-\-threshold-red
Sets the threshold for the red component of a pixel in
Sets the threshold for the red component of a pixel
in lineart color scan mode. Possible values are 1..255.
The default value is 128.
This option is only available in scan mode color
@ -205,7 +205,7 @@ This option is only available in scan mode color
.TP
.B \-\-threshold-green
Sets the threshold for the green component of a pixel in
Sets the threshold for the green component of a pixel
in lineart color scan mode. Possible values are 1..255.
The default value is 128.
This option is only available in scan mode color
@ -213,7 +213,7 @@ This option is only available in scan mode color
.TP
.B \-\-threshold-blue
Sets the threshold for the blue component of a pixel in
Sets the threshold for the blue component of a pixel
in lineart color scan mode. Possible values are 1..255.
The default value is 128.
This option is only available in scan mode color
@ -321,11 +321,11 @@ stops.
Stops of the carriage can be caused by the following reasons:
.PP
.RS
\- too much "traffic" on the SCSI bus
\- too much "traffic" on the SCSI bus,
.br
\- slow responses by the backend to the scanner,
.br
\- a program which processes the data acquired by the backend too slow.
\- a program which processes the data acquired by the backend is too slow.
.PP
.RE
Too much "traffic" on the SCSI bus: This happens for example, if hard disks
@ -409,12 +409,12 @@ backend. At present, the scanner must power off and on to stop this
annoying behaviour.
.RE
2. Threshold level does not work (only JX-610)
2. Threshold level does not work (only JX\-610)
.PP
3. The maximum resolution is limited to 600 dpi(JX-610 supported
to 1200 dpi) resp. 400 dpi (JX-250)
3. The maximum resolution is limited to 600 dpi (JX\-610 supported
to 1200 dpi) resp. 400 dpi (JX\-250)
.PP
4. If the JX250 is used with an ADF, the following situation can occur: After
4. If the JX\-250 is used with an ADF, the following situation can occur: After
several scans, the scanner moves, after loading a new sheet of paper, the
carriage to the idle position, and then back to the position used for ADF
scans. This happens for
@ -436,8 +436,8 @@ tested.
Kazuya Fukuda, Abel Deuring
.SH CREDITS
The Sharp backend is based on the Canon backend written by Helmut Koeberle
The Sharp backend is based on the Canon backend written by Helmut Koeberle.
.PP
Parts of this man page are a plain copy of
.BR sane\-mustek (5)
by David Mosberger-Tang, Andreas Czechanowski and Andreas Bolsch
by David Mosberger-Tang, Andreas Czechanowski and Andreas Bolsch.

Wyświetl plik

@ -82,7 +82,7 @@ scanimage \-\-help \-d stv680
.TP
.B \-\-mode
selects the basic mode of operation of the webcams valid choices.
selects the basic mode of operation of the webcam's valid choices.
The read resolution mode is 8 bits, output resolution is 24 bits.
Selects the resolution for a scan.
@ -113,7 +113,7 @@ value loaded into the scanner. Scale \-32 .. 0 .. +32 in steps of 1.
.TP
.B \-\-white\-level\-g \-32..+32
Selects what green radiance level should be
considered "white", when scanning some sheets by changing the calibration i
considered "white", when scanning some sheets by changing the calibration
value loaded into the scanner. Scale \-32 .. 0 .. +32 in steps of 1.
.TP

Wyświetl plik

@ -94,7 +94,7 @@ For
a restricted set of resolutions are available.
.B Note:
All values with ydpi > 300 (300 x 600) or 600 (600 x 1200) result in
All values with vertical resolution in dpi > 300 (300 x 600) or 600 (600 x 1200) result in
a wrong proportion for the scan. The proportion can be adjusted with
the following
.BR convert (1)

Wyświetl plik

@ -235,7 +235,7 @@ constraint. Minimum is 4, maximum 192, and quant is 2.
.PP
Option
.B int\-constraint\-array\-constraint\-word\-list
(6/7) is an int test option with unit percent and using an array a word list
(6/7) is an int test option with unit percent and using an array or word list
constraint.
.PP
Option
@ -258,7 +258,7 @@ set. Minimum is \-42.17, maximum 32767.9999, and quant is 2.0.
.PP
Option
.B fixed\-constraint\-word\-list
(3/3) is a Fixed test option with no unit and constraint word list set.
(3/3) is a fixed test option with no unit and constraint word list set.
.PP
.SH STRING TEST OPTIONS

Wyświetl plik

@ -167,20 +167,15 @@ Please send any information and bug-reports to:
.br
.B SANE Mailing List
.PP
Additional info and hints can be obtained from our
.br
Mailing-List archive at:
.br
.I http://www.sane\-project.org/mailing\-lists.html
Additional info and hints can be obtained from our mailing-List archive at:
.IR http://www.sane\-project.org/mailing\-lists.html .
.PP
To obtain debug messages from the backend, please set the
environment-variable
.B SANE_DEBUG_U12
before calling your favorite scan-frontend (i.e.
.BR xscanimage (1)),
i.e.:
.br
before calling your favorite SANE frontend (e.g.
.BR xscanimage (1)):
.PP
.I export SANE_DEBUG_U12=20 ; xscanimage
.PP
The value controls the verbosity of the backend.

Wyświetl plik

@ -55,15 +55,15 @@ if you have a kernel with ppdev support.
.PP
Note that if you don't use the ppdev character device, the backend
needs to run as root. To allow user access to the scanner
run the backend through the network interface (See
run the backend through the network interface (see
.BR saned (8)
and
.BR sane\-net (5)).
A more relaxed solution (security wise) is to add suid bit to the frontend
(See
(see
.BR chmod (1)).
The backend drop root privileges as soon as it can, right after gaining direct
access to IO ports, which lessen risks when being root.
The backend drops root privileges as soon as it can, right after gaining direct
access to I/O ports, which lessen risks of being root.
.SH "DEVICE NAMES"
This backend expects device names of the form:
@ -73,7 +73,7 @@ This backend expects device names of the form:
.RE
.PP
Where
\fBvalue\fR is :
\fBvalue\fR is:
.RS
.TP
@ -102,8 +102,8 @@ have to use
.TP
0x378
does direct hardware access on the given
address. Usual values are 0x378, 0x278, 0x3BC
In this case, you have to run the scanner as
address. Usual values are 0x378, 0x278, 0x3BC.
In this case, you have to run the backend as
root (*BSD and Linux), or with 'IOPL=yes' on
OS/2
.PP
@ -166,8 +166,7 @@ user provided values.
.PP
Options
.B red\-offset
,
.BR red\-offset ,
.B green\-offset
and
.B blue\-offset

Some files were not shown because too many files have changed in this diff Show More