[sane-devel] Need help with Epson scanner problems-Fedora 20

2014-12-31 Thread Terry Duell

Hello All,
I have a problem that has existed for some time, not exactly sure how long  
as I don't use the scanner on a regular basis. I may have had the problem  
for a year, maybe more.
The scanner is an Epson Perfection 3490 Photo, and I have been using it  
without problem for many years on Fedora Linux (I have been using  
Redhat/Fedora since 2000).
Sorry if the following is a bit long winded, but it may help to explain  
the problem.
I keep Fedora up to date, and for some years now have been doing a clean  
install at each new release.
I am reluctant to say my memory is 100% accurate on what I do to migrate  
the scanner to each new Fedora system, so I may have missed something when  
moving from Fedora 19 to Fedora 20...but I do use a scripted process to  
capture the installed packages prior to installing the new system, then  
get a package list from new system and then extract a list of missing  
package names which are then installed. This process has worked OK for  
many years.
The sane related packages that are installed are (this list from Fedora  
17, but the same for 20);

sane-backends-drivers-scanners 1.0.23-4.fc17 x86_64
sane-backends-libs 1.0.23-4.fc17 x86_64
xsane-gimp 0.998-12.fc17 x86_64
xsane-common 0.998-12.fc17 x86_64
sane-backends 1.0.23-4.fc17 x86_64
xsane 0.998-12.fc17 x86_64

For each system upgrade I install the Epson firmware (esfw52.bin) in  
/usr/share/sane/snapscan/ and ensure that path is in  
/etc/sane.d/snapscan.conf.


Now, finally, to the specifics of the problem.
I can start Gimp and select File - Create:XSane dialog and the XSane  
windows appear OK. I can select Preview and get a preview scan OK, but  
when Scan is selected I get an error Failed to start scanner: Error  
during device IO.
If I reboot, and repeat the process, usually the XSane preview window  
appears blank, and this can be remedied by closing the XSane windows and  
Gimp, deleting my ~/.sane dir and restarting Gimp and XSane, and either  
one preview or a normal scan can be obtained but when attempting a second  
I get the Failed to start scanner: Error during device IO error.
I also run Windows 8.1 in Virtualbox and can successfully do multiple  
scans using the Epson supplied Windows software, which rules out scanner  
or USB cable problems.


I have raised the problem in the Fedora forum of Linux Questions and it  
was suggested I ask here, although I have a feeling that there may be more  
to explore/test that is purely Linux related.


Does anyone have any experience of a problem like this, and what might be  
causing it?

Any ideas welcomed.

Cheers,
--
Regards,
Terry Duell

--
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] Network connected scanner, i/o error if scanner is idle for longer then 40sec

2014-12-31 Thread Paul Newall

On 30/12/14 17:26, Paul Newall wrote:

On 30/12/14 10:18, Louis Lagendijk wrote:

On Tue, 2014-12-30 at 10:09 +, Paul Newall wrote:

I have been digging down into the code, and adding extra debug output.
In my network read function kodakaio_net_read it seems that 
poll(...) is

indicating that there is data to read, but sanei_ tcp_read(..) then
returns zero bytes.
If there was no data I'd expect poll to timeout, and if there was some
data, sanei_ tcp_read should return it?
But this is the only network read code I have ever written in c so I am
not too confident it is correct.

Paul

A read returning 0 bytes when the fd is ready indicates that the other
side closed the TCP-connection. you probably need to send some form of
keep-alive or close/ the connection when you don't need it and re-open
the connection later.
Louis



Thank you Louis, that was very helpful.
It seems that the scanner initiates keep-alive exchanges every 3 
seconds for around 27 seconds, then it closes the connection.


I had assumed the normal thing would be to open the connection in 
sane_open, and close it in sane_close,
but perhaps it's better to open the connection in sane_start, and 
close it in sane_cancel.


Or I could leave things more or less as they  are, but detect the loss 
of connection and reopen it if required.


Paul



I have now made the changes to open the connection in sane_start, and close
it in sane_cancel. And that seems to have solved the problem without breaking 
anything else.

Paul







--
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