[sane-devel] Samsung SCX4100 Works with Sane but not with Saned?

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 29 May 2005 11:11:49 +0200


On Sat, May 28, 2005 at 10:23:02PM +0100, Calum Polwart wrote:
> I have a Samsung SCX-4100 Multifunction Printer / Scanner which seems to 
> be using sane following installation of the scanner using the samsung 
> disks.  It is running on Fedora Core3, and I can scan using xsane.
> I am trying to configure it to run on the network.  The server side 
> (saned) seems to be up and running OK.  No problems reported in syslog 
> and I can telnet to it on port 6566 and obtain a connection from local 
> machine ( and remote machine (

Maybe the Samsung programmers haven't even tested if networking works.
Quite some bugs in backends are only noticed hwen networking is used.

> However I get an error message on the scanimage -L command from the 
> remote machine (which relates to the second last line below) :'( .
> I have enclosed the output of debug_net from the remote machine in the 
> hope someone can suggest what needs fixed.  I hope to get this working 
> on Win XP as well but figure its easier to stick with sane before trying 
> to do sane and TWAIN ;-)

You can also do tests with networking on one single machine (put
localhost in net.conf).

> *[sanei_wire] sanei_w_array: DECODE: maximum amount of allocated memory 
> exceeded (limit: 1048576, new allocation: 3180390528, total: 3181439104 
> bytes)*

This is a safety measure to avoid that the server can allocate big
amounts of memory on the client (e.g. for options). The limit is more
or less arbitrary, but 1 MB "should be enough for everyone". 3 GB
seems to be a bit excessive anyway.

So I guess there is a bug in the Samsung backend. To find out more
details, you could enable debugging on the server.

> [net] sane_get_devices: ignoring rpc-returned status Unknown SANE status 
> code 1768846189

Looks like the transmission got corrupted somehow.

> Segmentation fault

Well, that shouldn't happen. To find out why the segfault happens, you
could run scanimage in gdb.

To find out what actually happens on the server, disable the automatic
start of saned in (x)inetd.conf and start it manually (saned -d128).
This way it runs in debug mode and prints more details. It must be
restarted after every connection. If the samsung backends supports
debug messages something like this may work:

SANE_DEBUG_SAMSUNG=255 saned -d128