Re: [sane-devel] Cannot get hp scanjet 8200 working

2017-03-17 Thread David Niklas
On Mon, 30 Jan 2017 17:02:29 -0800
Dave Platt  wrote:

> > Sorry for not getting back, I could not get the package manager
> > (portage), to accept that I would build the package.
> > I ended up creating en ebuild file and manually inserted it into
> > the package repository, which is hackish, but it works.  
> 
> > I looked at your patches and they seem quite clean.
> > Sadly, my scanner still does not work, but I think that the reasons
> > are unrelated. I'm inserting some of the debug info below.
> > If it makes any difference, my scanner's light was on.  
> 
> > [avision] wrote 10 bytes
> > [avision] avision_usb_status: timeout 15000, 1 retries
> > [avision] ==> (bulk read) going down ...
> > [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
> > [sanei_usb] 000
> > 00  . [sanei_usb]
> > sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes [avision] <== (bulk
> > read) got: 1, status: 0 [avision] get_accessories_info: Maximum
> > retries attempted, ADF unresponsive. [avision] sane_open: additional
> > probe failed: Operation not supported scanimage: open of device
> > avision:libusb:004:005 failed: Operation not supported  
> 
> This looks like one of the problems that my patches were intended to
> correct.
> 
> In order to take advantage of my fix, you have to add a new option to
> the avision.conf file in your SANE configuration directory.  You'd have
> to check the patch, but I think it's
> 
>option ignore-adf
> 
> That will tell the driver to trust the "No, there is no ADF here"
> status from the device, rather than trying repeatedly to reset the ADF
> and giving up when it can't.
> 



I got it working, I'm going to have to apply the patches every time sane
rebuilds, but it works!

Thank you
Thank you
Thank you

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2017-01-30 Thread David Niklas
On Tue, 22 Nov 2016 20:54:55 -0800
Dave Platt  wrote:
> Attached, for your consideration, are three patches I've worked up.
> 
> The first one adds support for a new "option skip-adf" in the
> /etc/sane.d/avision.conf file.  If you add this option, it should
> prevent the "unsupported operation" error which is preventing
> your scanner from working.
> 
> The second patch adds proper support for the "-source Transparency"
> back-light recognition, so the backend doesn't spend 90 seconds
> waiting unnecessarily for the lamp to warm up.
> 
> The third adds the ability to cancel a scan during the lamp
> warmup period.
> 
> To apply, cd into a directory holding a copy of the current
> sane-backends git tree, and then "patch -p1 < avision-1.patch"
> (and similarly for the other two).  Then, configure, make, and
> install.
> 
> Please let me know if these work for you, or if you notice any
> undesirable side effects.
> 

Sorry for not getting back, I could not get the package manager
(portage), to accept that I would build the package.
I ended up creating en ebuild file and manually inserted it into
the package repository, which is hackish, but it works.

I looked at your patches and they seem quite clean.
Sadly, my scanner still does not work, but I think that the reasons are
unrelated. I'm inserting some of the debug info below.
If it makes any difference, my scanner's light was on.

Thanks,
David

[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 28 00 69 00 0A 0D 00 00 04 00   (.i...  
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] try to read 4 bytes
[sanei_usb] sanei_usb_read_bulk: trying to read 4 bytes
[sanei_usb] 000 00 00 02 40 ...@
[sanei_usb] sanei_usb_read_bulk: wanted 4 bytes, got 4 bytes
[avision] read 4 bytes
[avision] avision_usb_status: timeout 1, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] adf_reset: raw data:
[avision]   [0] b   0o   0d  0x
[avision]   [1] b   0o   0d  0x
[avision]   [2] 0010b   2o   2d  2x
[avision]   [3] 0100b 100o  64d 40x
[avision] get_accessories_info: Waiting while ADF firmware resets...
[avision] wait_ready: sending TEST_UNIT_READY
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 3, read: 15000, status: 15000
[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 00 00 00 00 00 00 00 00 00 00   ..  
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] avision_usb_status: timeout 15000, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] get_accessories_info: Maximum retries attempted, ADF unresponsive.
[avision] sane_open: additional probe failed: Operation not supported
scanimage: open of device avision:libusb:004:005 failed: Operation not supported
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `avision's exit function
[avision] sane_exit:
[dll] sane_exit: finished

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-27 Thread Wolf Drechsel
Am Sonntag, den 27.11.2016, 16:25 +0900 schrieb Olaf Meeuwissen:
> Hi Wolf,
> 
> Wolf Drechsel writes:
> 
> > Allright, tried to follow this instruction set:
> > 
> > https://wiki.ubuntuusers.de/SANE/Kompilieren/
> > 
> 
>  1) run ./configure --without-api-spec

OK, I did this:
BACKENDS="avision" ./configure --without-api-spec

Compile and install went through.

Then I got:

BACKENDS="avision" ./configure --without-api-spec

Then

> sudo ldconfig -v | grep libsane
> /sbin/ldconfig.real: »stat()« kann nicht für »/lib/i686-linux-gnu«
> aufgerufen werden: Datei oder Verzeichnis nicht gefunden
> /sbin/ldconfig.real: »stat()« kann nicht für »/usr/lib/i686-linux-
> gnu« aufgerufen werden: Datei oder Verzeichnis nicht gefunden
> /sbin/ldconfig.real: Pfad »/usr/lib/nvidia-375« mehrfach angegeben
> /sbin/ldconfig.real: Pfad »/usr/lib32/nvidia-375« mehrfach angegeben
> /sbin/ldconfig.real: Pfad »/usr/local/lib« mehrfach angegeben
> /sbin/ldconfig.real: Pfad »/lib/x86_64-linux-gnu« mehrfach angegeben
> /sbin/ldconfig.real: Pfad »/usr/lib/x86_64-linux-gnu« mehrfach
> angegeben
> /sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.24.so is the dynamic
> linker, ignoring
> 
>   libsane.so.1 -> libsane.so.1.0.26
> /sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.24.so is the dynamic
> linker, ignoring
> 
>   libsane.so.1 -> libsane.so.1.0.25
> /sbin/ldconfig.real: Es ist nicht möglich, den Status (stat()) der
> Datei /usr/lib32/nvidia-375/libOpenGL.so zu lesen: Datei oder
> Verzeichnis nicht gefunden
> /sbin/ldconfig.real: /lib32/ld-2.24.so is the dynamic linker,
> ignoring
> 
> /sbin/ldconfig.real: /lib/ld-lsb.so.3 is the dynamic linker, ignoring
> 

So I'm not certain whether the compiling process was successful in the
end. 

The first SANE_USB_WORKAROUND=1 scanimage -L was successful, a second
try did not deliver any results.

Debugging attempt delivers as follows.
Hope that says something.
Wolf



> wd@Simux:~/src/sane-backends$ SANE_DEBUG_AVISION=8
> SANE_DEBUG_SANEI_USB=5 scanimage -L
> [sanei_debug] Setting debug level of avision to 8.
> [avision] sane_init:(Version: 1.0 Build: 297)
> [sanei_debug] Setting debug level of sanei_usb to 5.
> [sanei_usb] sanei_usb_init: Looking for libusb devices
> usb_set_debug: Setting debugging level to 255 (on)
> [sanei_usb] sanei_usb_scan_devices: marking existing devices
> [sanei_usb] libusb_scan_devices: Looking for libusb devices
> usb_os_find_busses: Found 002
> usb_os_find_busses: Found 001
> usb_os_find_devices: Found 005 on 002
> usb_os_find_devices: couldn't get connect info
> usb_os_find_devices: Found 004 on 002
> skipped 1 class/vendor specific interface descriptors
> usb_os_find_devices: Found 003 on 002
> skipped 1 class/vendor specific interface descriptors
> skipped 1 class/vendor specific interface descriptors
> usb_os_find_devices: Found 002 on 002
> usb_os_find_devices: couldn't get connect info
> usb_os_find_devices: Found 001 on 002
> error obtaining child information: Inappropriate ioctl for device
> error obtaining child information: Operation not permitted
> error obtaining child information: Inappropriate ioctl for device
> error obtaining child information: Operation not permitted
> usb_os_find_devices: couldn't get connect info
> usb_os_find_devices: Found 003 on 001
> usb_os_find_devices: couldn't get connect info
> usb_os_find_devices: Found 001 on 001
> error obtaining child information: Operation not permitted
> error obtaining child information: Operation not permitted
> [sanei_usb] libusb_scan_devices: found libusb device (0x03f0/0x0801)
> interface 0  at libusb:002:005
> [sanei_usb] store_device: add dn 0 with libusb:002:005
> [sanei_usb] libusb_scan_devices: device 0x046d/0xc018, interface 0
> doesn't look like a scanner (0/3)
> [sanei_usb] libusb_scan_devices: device 0x046d/0xc018: no suitable
> interfaces
> [sanei_usb] libusb_scan_devices: device 0x413c/0x2011, interface 0
> doesn't look like a scanner (0/3)
> [sanei_usb] libusb_scan_devices: device 0x413c/0x2011, interface 1
> doesn't look like a scanner (0/3)
> [sanei_usb] libusb_scan_devices: device 0x413c/0x2011: no suitable
> interfaces
> [sanei_usb] libusb_scan_devices: device 0x413c/0x1005, interface 0
> doesn't look like a scanner (9/9)
> [sanei_usb] libusb_scan_devices: device 0x413c/0x1005: no suitable
> interfaces
> [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0001, interface 0
> doesn't look like a scanner (9/9)
> [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0001: no suitable
> interfaces
> [sanei_usb] libusb_scan_devices: device 0x0bda/0x0151, interface 0
> doesn't look like a scanner (0/8)
> [sanei_usb] libusb_scan_devices: device 0x0bda/0x0151: no suitable
> interfaces
> [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0002, interface 0
> doesn't look like a scanner (9/9)
> [sanei_usb] libusb_scan_devices: device 0x1d6b/0x0002: no suitable
> interfaces
> [avision] sane_reload_devices: parsing config line ""
> [avision] sane_reload_devices: config file line 1: ignoring 

Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-26 Thread Olaf Meeuwissen
Hi Wolf,

Wolf Drechsel writes:

> Allright, tried to follow this instruction set:
>
> https://wiki.ubuntuusers.de/SANE/Kompilieren/
>
> Works nicely, but in the end at "make" I get:
>
>> kpathsea: Running mktexmf ptmr7t
>> ! I can't find file `ptmr7t'.
>> <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr7t
>>
>> Please type another input file name
>> ! Emergency stop.
>> <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr7t
>>
>> Transcript written on mfput.log.
>> grep: ptmr7t.log: Datei oder Verzeichnis nicht gefunden
>> mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode;
>> input ptmr7t' failed to make ptmr7t.tfm.
>> kpathsea: Appending font creation commands to missfont.log.
>> Makefile:965: die Regel für Ziel „sane.ind“ scheiterte
>> make[1]: *** [sane.ind] Fehler 1
>> make[1]: Verzeichnis „/home/wd/src/sane-backends/doc“ wird verlassen
>> Makefile:542: die Regel für Ziel „all-recursive“ scheiterte
>> make: *** [all-recursive] Fehler 1

That's where the build is converting the SANE API specification to
PostScript and/or PDF.  It's bombing because it cannot find the desired
font files.

If you just want to use your scanner (as opposed to writing a SANE
backend or frontend), you don't need the spec.

> Found the google hit to install texlive-latex-base - but my system says
> it's already installed.
>
> So what now?

You have two options:

 1) run ./configure --without-api-spec
 2) install the texlive-fonts-recommended package (and maybe other
texlive-fonts-* packages)

If I were you, I'd go with 1).

Hope this helps,
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Softwarehttps://my.fsf.org/donate
 Join the Free Software Foundation  https://my.fsf.org/join

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-25 Thread David Niklas
On Tue, 11/22/2016 14:16 Dave Platt 
> >> It seems the avision backend is unmaintained again. You could try
> >> upgrading to a more recent version of sane, or one of our git
> >> snapshots, that sometimes helps.
> >> 
> >> allan  
> > 
> > 
> > I installed the latest git snapshot, the problem persists.
> > Where do I go from here?  
> 
> Hi, David.  I just ran into a similar problem with an HP 8300 I
> purchased (used).  I've written up a patch for it (and another for an
> additional problem) and I can send them to you this evening.  You will,
> unfortunately, have to build the SANE backends from source in order to
> use this - as far as I can tell there's no way to work around the
> problem without a fix to the Avision backend.
> 
> This is apparently a problem which has been reported for several years,
> but a fix has never made it into the main SANE source distribution.
> 
> The problem is this: the 8200 family can report an inconsistent status
> when queried about their "accessories" (the transparency backlight and
> the ADF).  If there's no ADF attached, the 8200 and 8300 will report an
> "ADF present" flag of 0 (meaning "none present") but also send an ADF
> type code of 1 (an "Oodles" ADF).
> 
> There's some code in the backend which interprets this as "Oh, there's
> actually an ADF there, but it's not working properly and needs to be
> reset".  The code makes several attempts to reset the ADF (to get an
> ADF-present code of 1) and when it fails, bails out with a "not
> supported" error.  That's what you're seeing.
> 
> It's possible to just disable the retry loop in the Avision back-end
> source code (which is what I did last night).  Once this is done, my
> 8300 was able to scan... it worked at 300, 600, and 1200 dpi.  Haven't
> been able to do a 4800 dpi scan yet (I'm getting an I/O error).
> 
> The patch I came up with, adds another override option to the
> "avision.conf" file.  If you add a "skip-adf" override, the backend will
> accept the "ADF not present" status and will not try to repeatedly
> reset the ADF.  It should still be able to use an ADF if one is present
> and is reported properly.
> 
> The other fix I'm working on has to do with the transparency/slide
> backlight.  If you select this (via "-source Transparency") the backend
> will scan once.  During subsequent scans, it gets confused as to whether
> the lamp is on or not, and just sits there for 90 seconds (I think it'll
> still scan after that but it's an annoying wait).  My patch should be
> able to adjust the lamp-polling code to recognize the "transparency
> backlight lamp is on" status properly.
> 
> I'm planning to submit these patches to the SANE master branch once I
> test 'em out a bit further.
> 
Thanks (got your cc'ed patches), I had been planning to create a patch
myself either next week or the following. In lieu of that I will look at
yours.
I know how to write C but am not familiar with the sane or any other
deice controlling code, so I will need to get up to speed (and put my
other projects aside :) . Please don't be surprised if you do not hear
from me soon, I tend to be a slow learner and fairly methodical when
coding or reading code.

Thanks,
David

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-25 Thread Wolf Drechsel
Am Freitag, den 25.11.2016, 08:27 -0500 schrieb m. allan noah:
> This sounds like the typical linux usb3 problems. If you use a
> sane-backends git snapshot, the problem may go away. If not, that
> version also has another option: you can try to invoke your scanning
> program with an additional env var: SANE_USB_WORKAROUND=1
> 

I don't have any USB3 hardware in my machines, and the xhci module is
not involved.
Anyway, I can give it a try.

Shall i try this version: http://www.sane-project.org/snapshots/sane-ba
ckends-git20161125.tar.gz
And are these instructions o.k. ?

Cheers,
Wolf-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-25 Thread m. allan noah
This sounds like the typical linux usb3 problems. If you use a
sane-backends git snapshot, the problem may go away. If not, that
version also has another option: you can try to invoke your scanning
program with an additional env var: SANE_USB_WORKAROUND=1


allan

On Fri, Nov 25, 2016 at 3:57 AM, Wolf Drechsel  wrote:
> Hello Dave,
>
> great you're taking care for me.
> A few days ago I filed a bug report which contains most of your requested
> info:
>
> https://bugs.launchpad.net/bugs/1643544
>
> The test you asked for have already been carried out:
>
>
> -  Test the scanner with the current Ubuntu/SANE distribution on
>another PC.  If it scans OK there, this would rather rule out the
>scanner itself as the problem.
>
>
> On my laptop, running ubuntu 16.04, the problem occurs as well.
> And: On my desktop, with fedora 24 - the problem ALSO EXISTS
>
> -  Test your PC's USB setup with some non-scanner high-speed transfers.
>One way would be to plug in a USB hard driver or data stick, and then
>"dd if=/dev/sdB bs=$((1024*1024)) of=/dev/null" (substitute the
>correct device identifier) and see if the transfer works successfully
>or if it triggers the USB hang.
>
>(Based on what you report, I've got a nasty feeling that your
> motherboard host controller may be ill... works OK for low-speed
> transfers, but hangs up somehow during sustained high-speed
> transfers.  The fact that it times out and leaves the bus hung
> is troubling.)
>
>
> Last days, I copied 3 250GB USB hard disks via USB. No problems.
>
> -  Boot up a different Linux distribution on your laptop (e.g. Knoppix)
>and see if you can get the scanner to work reliably.  If so it might
>point to a recent change in your normal kernel and/or libusb as
>being responsible.
>
>
> With a debian 8.6, kernel 3.2 (or so), booted for an external USB hdd - NO
> PROBLEM AT ALL. Multiple pages, high resolutions - everything fine.
>
> My conclusions from these experiments:
>
> * scanner is o.k.
> * desktop is o.k.
> * kernel 4.X causes problems, distro-independently
>
> Let me know if I can provide further information.
>
> Cheers,
> Wolf
>
>
> --
>
> --
> sane-devel mailing list: sane-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>  to sane-devel-requ...@lists.alioth.debian.org



-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-25 Thread Wolf Drechsel
Hello Dave,

great you're taking care for me.
A few days ago I filed a bug report which contains most of your
requested info:

https://bugs.launchpad.net/bugs/1643544

The test you asked for have already been carried out:

> 
> -  Test the scanner with the current Ubuntu/SANE distribution on
>another PC.  If it scans OK there, this would rather rule out the
>scanner itself as the problem.
> 

On my laptop, running ubuntu 16.04, the problem occurs as well.
And: On my desktop, with fedora 24 - the problem ALSO EXISTS

> -  Test your PC's USB setup with some non-scanner high-speed transfers.
>One way would be to plug in a USB hard driver or data stick, and then
>"dd if=/dev/sdB bs=$((1024*1024)) of=/dev/null" (substitute the
>correct device identifier) and see if the transfer works successfully
>or if it triggers the USB hang.
> 
>(Based on what you report, I've got a nasty feeling that your
> motherboard host controller may be ill... works OK for low-speed
> transfers, but hangs up somehow during sustained high-speed
> transfers.  The fact that it times out and leaves the bus hung
> is troubling.)
> 

Last days, I copied 3 250GB USB hard disks via USB. No problems.

> -  Boot up a different Linux distribution on your laptop (e.g. Knoppix)
>and see if you can get the scanner to work reliably.  If so it might
>point to a recent change in your normal kernel and/or libusb as
>being responsible.
> 

With a debian 8.6, kernel 3.2 (or so), booted for an external USB hdd -
NO PROBLEM AT ALL. Multiple pages, high resolutions - everything fine. 

My conclusions from these experiments:

* scanner is o.k.
* desktop  is o.k.
* kernel 4.X causes problems, distro-independently

Let me know if I can provide further information.

Cheers,
Wolf


-- -- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-24 Thread Dave Platt
On 11/23/2016 09:16 PM, Wolf Drechsel wrote:
> Hello Dave,
> 
> I'm suffering from "avision" trouble as well (you may have read my
> recent posts to this list).
> I'd like to offer my ubuntu 16.10 / hp7400c setup for further testing. I
> sent my log files to this list on Nov 7th, maybe they can be useful.

Hi, Wolf!  I read through your messages and glanced at the logs.  If I
understand correctly, your situation seems to be a "nothing much had
changed, but it no longer works" problem?

The Avision backend hasn't changed in some time (early 2015 was the
last release, I think), which rather points the problem elsewhere.
Unfortunately there are at least four possible culprits:

-  Kernel changes
-  libusb changes
-  Problems in the scanner itself
-  Problems in your PC.

To pin this down I'd suggest a classic "change one part at a time"
elimination test sequence.  What you might try:

-  Test the scanner with the current Ubuntu/SANE distribution on
   another PC.  If it scans OK there, this would rather rule out the
   scanner itself as the problem.

-  Test your PC's USB setup with some non-scanner high-speed transfers.
   One way would be to plug in a USB hard driver or data stick, and then
   "dd if=/dev/sdB bs=$((1024*1024)) of=/dev/null" (substitute the
   correct device identifier) and see if the transfer works successfully
   or if it triggers the USB hang.

   (Based on what you report, I've got a nasty feeling that your
motherboard host controller may be ill... works OK for low-speed
transfers, but hangs up somehow during sustained high-speed
transfers.  The fact that it times out and leaves the bus hung
is troubling.)

-  Boot up a different Linux distribution on your laptop (e.g. Knoppix)
   and see if you can get the scanner to work reliably.  If so it might
   point to a recent change in your normal kernel and/or libusb as
   being responsible.




-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-23 Thread Wolf Drechsel
Hello Dave,

I'm suffering from "avision" trouble as well (you may have read my
recent posts to this list).
I'd like to offer my ubuntu 16.10 / hp7400c setup for further testing.
I sent my log files to this list on Nov 7th, maybe they can be useful.

Cheers,
Wolf-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-22 Thread Dave Platt

>> It seems the avision backend is unmaintained again. You could try
>> upgrading to a more recent version of sane, or one of our git
>> snapshots, that sometimes helps.
>> 
>> allan
> 
> 
> I installed the latest git snapshot, the problem persists.
> Where do I go from here?

Hi, David.  I just ran into a similar problem with an HP 8300 I
purchased (used).  I've written up a patch for it (and another for an
additional problem) and I can send them to you this evening.  You will,
unfortunately, have to build the SANE backends from source in order to
use this - as far as I can tell there's no way to work around the
problem without a fix to the Avision backend.

This is apparently a problem which has been reported for several years,
but a fix has never made it into the main SANE source distribution.

The problem is this: the 8200 family can report an inconsistent status
when queried about their "accessories" (the transparency backlight and
the ADF).  If there's no ADF attached, the 8200 and 8300 will report an
"ADF present" flag of 0 (meaning "none present") but also send an ADF
type code of 1 (an "Oodles" ADF).

There's some code in the backend which interprets this as "Oh, there's
actually an ADF there, but it's not working properly and needs to be
reset".  The code makes several attempts to reset the ADF (to get an
ADF-present code of 1) and when it fails, bails out with a "not
supported" error.  That's what you're seeing.

It's possible to just disable the retry loop in the Avision back-end
source code (which is what I did last night).  Once this is done, my
8300 was able to scan... it worked at 300, 600, and 1200 dpi.  Haven't
been able to do a 4800 dpi scan yet (I'm getting an I/O error).

The patch I came up with, adds another override option to the
"avision.conf" file.  If you add a "skip-adf" override, the backend will
accept the "ADF not present" status and will not try to repeatedly
reset the ADF.  It should still be able to use an ADF if one is present
and is reported properly.

The other fix I'm working on has to do with the transparency/slide
backlight.  If you select this (via "-source Transparency") the backend
will scan once.  During subsequent scans, it gets confused as to whether
the lamp is on or not, and just sits there for 90 seconds (I think it'll
still scan after that but it's an annoying wait).  My patch should be
able to adjust the lamp-polling code to recognize the "transparency
backlight lamp is on" status properly.

I'm planning to submit these patches to the SANE master branch once I
test 'em out a bit further.


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot get hp scanjet 8200 working

2016-11-09 Thread David Niklas
On 09/19/2016(Mon) 12:37 "m. allan noah"  wrote:
> On Sat, Sep 17, 2016 at 7:43 PM, David Niklas  wrote:
> > I hate to be a pest but it's been two weeks, should I send this
> > somewhere else.
> >  
> >> Hello,
> >> I bought an hp scanjet 8200 from amazon and I can't get it to work.
> >> Here is a list of commands run and output lightly edited for brevity.
> >> Feel free to snip non relevant details.
> >> Thanks, in advance.
> >>
> >> % scanimage --version
> >> scanimage (sane-backends) 1.0.24; backend version 1.0.24
> >>
> >> % equery l PACKAGE
> >> media-gfx/sane-backends-1.0.24-r6
> >> media-gfx/sane-frontends-1.0.14
> >> media-gfx/xsane-0.999-r1
> >> media-gfx/simple-scan-3.18.2
> >>
> >> % uname -a
> >> Linux ulgy_thing 4.1.15-gentoo-r1-nopreempt-dav2 #1 SMP x86_64
> >> Intel(R) Pentium(R) CPU 2117U @ 1.80GHz GenuineIntel GNU/Linux
> >>
> >> % scanimage -v -d avision:libusb:004:029 > aa.pnm
> >> scanimage: open of device avision:libusb:004:029 failed: Operation
> >> not supported
> >>
> >> # In system log
> >> [scanimage] protocol/discovery/mdns.c 122: unable to add to multicast
> >> group: No such device_
> >>
> >> % sane-find-scanner
> >> found USB scanner (vendor=0x03f0 [hp], product=0x0b01 [hp scanjet
> >> 8200]) at libusb:004:029
> >>
> >> DEBUG INFO
> >> avision   == 128
> >> sanei_usb == 128
> >> dll  Looked at, but not needed as there was no problem here
> >> AFAIK.
> >>
> >>
> >> # DEBUG ~50 lines
> >> ### [avision] try to
> >> write src, count: 2. [sanei_usb] sanei_usb_write_bulk: trying to
> >> write 2 bytes [sanei_usb] 000 00
> >> 00   .. [sanei_usb]
> >> sanei_usb_write_bulk: wanted 2 bytes, wrote 2 bytes [avision] wrote 2
> >> bytes [avision] avision_usb_status: timeout 1, 1 retries
> >> [avision] ==> (bulk read) going down ...
> >> [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
> >> [sanei_usb] 000
> >> 00  . [sanei_usb]
> >> sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes [avision] <== (bulk
> >> read) got: 1, status: 0 [avision] adf_reset: write 2 complete.
> >> [avision] Timeouts: write: 3, read: 3, status: 1
> >> [avision] try to write cmd, count: 10.
> >> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> >> [sanei_usb] 000 28 00 69 00 0A 0D 00 00 04 00
> >> (.i... [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote
> >> 10 bytes [avision] wrote 10 bytes
> >> [avision] try to read 4 bytes
> >> [sanei_usb] sanei_usb_read_bulk: trying to read 4 bytes
> >> [sanei_usb] 000 00 00 02
> >> 40 ...@ [sanei_usb]
> >> sanei_usb_read_bulk: wanted 4 bytes, got 4 bytes [avision] read 4
> >> bytes [avision] avision_usb_status: timeout 1, 1 retries
> >> [avision] ==> (bulk read) going down ...
> >> [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
> >> [sanei_usb] 000
> >> 00  . [sanei_usb]
> >> sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes [avision] <== (bulk
> >> read) got: 1, status: 0 [avision] adf_reset: raw data:
> >> [avision]   [0] b   0o   0d  0x
> >> [avision]   [1] b   0o   0d  0x
> >> [avision]   [2] 0010b   2o   2d  2x
> >> [avision]   [3] 0100b 100o  64d 40x
> >> [avision] get_accessories_info: Waiting while ADF firmware resets...
> >> [avision] wait_ready: sending TEST_UNIT_READY
> >> [avision] filling command to have a length of 10, was: 6
> >> [avision] Timeouts: write: 3, read: 15000, status: 15000
> >> [avision] try to write cmd, count: 10.
> >> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> >> [sanei_usb] 000 00 00 00 00 00 00 00 00 00
> >> 00   .. [sanei_usb] sanei_usb_write_bulk:
> >> wanted 10 bytes, wrote 10 bytes [avision] wrote 10 bytes
> >> [avision] avision_usb_status: timeout 15000, 1 retries
> >> [avision] ==> (bulk read) going down ...
> >> [sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
> >> [sanei_usb] 000
> >> 00  . [sanei_usb]
> >> sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes [avision] <== (bulk
> >> read) got: 1, status: 0 [avision] get_accessories_info: Maximum
> >> retries attempted, ADF unresponsive. [avision] sane_open: additional
> >> probe failed: Operation not supported scanimage: open of device
> >> avision:libusb:004:029 failed: Operation not supported [avision]
> >> sane_exit:
> >>
> >> ### DEBUG 27 lines scanimage -h -d avision:libusb:004:029
> >> ### [sanei_usb] sanei_usb_read_bulk: trying to read 1
> >> bytes [sanei_usb] 000
> >> 00  . [sanei_usb]
> >> sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes [avision] <== (bulk
> >> read) got: 1, status: 0 [avision] adf_reset: raw data:
> >> [avision]   [0] b   0o   0d  0x
> >> [avision]  

[sane-devel] Cannot get hp scanjet 8200 working

2016-09-02 Thread David Niklas
Hello,
I bought an hp scanjet 8200 from amazon and I can't get it to work.
Here is a list of commands run and output lightly edited for brevity.
Feel free to snip non relevant details.
Thanks, in advance.

% scanimage --version
scanimage (sane-backends) 1.0.24; backend version 1.0.24

% equery l PACKAGE
media-gfx/sane-backends-1.0.24-r6
media-gfx/sane-frontends-1.0.14
media-gfx/xsane-0.999-r1
media-gfx/simple-scan-3.18.2

% uname -a
Linux ulgy_thing 4.1.15-gentoo-r1-nopreempt-dav2 #1 SMP x86_64 Intel(R)
Pentium(R) CPU 2117U @ 1.80GHz GenuineIntel GNU/Linux

% scanimage -v -d avision:libusb:004:029 > aa.pnm
scanimage: open of device avision:libusb:004:029 failed: Operation not
supported

# In system log
[scanimage] protocol/discovery/mdns.c 122: unable to add to multicast
group: No such device_

% sane-find-scanner
found USB scanner (vendor=0x03f0 [hp], product=0x0b01 [hp scanjet 8200])
at libusb:004:029

DEBUG INFO
avision   == 128
sanei_usb == 128
dll  Looked at, but not needed as there was no problem here AFAIK.


# DEBUG ~50 lines 
###
[avision] try to write src, count: 2.
[sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes
[sanei_usb] 000 00 00   ..  
[sanei_usb] sanei_usb_write_bulk: wanted 2 bytes, wrote 2 bytes
[avision] wrote 2 bytes
[avision] avision_usb_status: timeout 1, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] adf_reset: write 2 complete.
[avision] Timeouts: write: 3, read: 3, status: 1
[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 28 00 69 00 0A 0D 00 00 04 00   (.i...  
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] try to read 4 bytes
[sanei_usb] sanei_usb_read_bulk: trying to read 4 bytes
[sanei_usb] 000 00 00 02 40 ...@
[sanei_usb] sanei_usb_read_bulk: wanted 4 bytes, got 4 bytes
[avision] read 4 bytes
[avision] avision_usb_status: timeout 1, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] adf_reset: raw data:
[avision]   [0] b   0o   0d  0x
[avision]   [1] b   0o   0d  0x
[avision]   [2] 0010b   2o   2d  2x
[avision]   [3] 0100b 100o  64d 40x
[avision] get_accessories_info: Waiting while ADF firmware resets...
[avision] wait_ready: sending TEST_UNIT_READY
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 3, read: 15000, status: 15000
[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 00 00 00 00 00 00 00 00 00 00   ..  
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes
[avision] avision_usb_status: timeout 15000, 1 retries
[avision] ==> (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] get_accessories_info: Maximum retries attempted, ADF unresponsive.
[avision] sane_open: additional probe failed: Operation not supported
scanimage: open of device avision:libusb:004:029 failed: Operation not supported
[avision] sane_exit:

### DEBUG 27 lines scanimage -h -d avision:libusb:004:029 
###
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] 000 00  .   
[sanei_usb] sanei_usb_read_bulk: wanted 1 bytes, got 1 bytes
[avision] <== (bulk read) got: 1, status: 0
[avision] adf_reset: raw data:
[avision]   [0] b   0o   0d  0x
[avision]   [1] b   0o   0d  0x
[avision]   [2] 0010b   2o   2d  2x
[avision]   [3] 0100b 100o  64d 40x
[avision] get_accessories_info: Waiting while ADF firmware resets...
[avision] wait_ready: sending TEST_UNIT_READY
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 3, read: 15000, status: 15000
[avision] try to write cmd, count: 10.
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 000 00 00 00 00 00 00 00 00 00 00   ..  
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[avision] wrote 10 bytes