SULDR Forums Supported Printers Printing Questions Scanning Questions General Questions Samsung Installer

Scan to PC in Linux (Development)

Started by angelnu, December 20, 2012, 07:00:41

Previous topic - Next topic


03-14-14 15:00:20 stdout       INFO     Newly registered server 'Storage-Blue' with UniqueID '5cbcd3015823ba0a' has got
03-14-14 15:00:20 stdout       INFO         InstanceID '4'.
03-14-14 15:00:20 stdout       INFO     At program termination unregistering server with:
03-14-14 15:00:20 stdout       INFO         <function unregisterServer at 0x200e770>
03-14-14 15:00:20 stdout       INFO     Init SANE ...
03-14-14 15:00:20 stdout       INFO     Connecting to scanner ...
03-14-14 15:00:24 stdout       INFO     Connected to scanner.
03-14-14 15:00:24 stdout       INFO     Waiting for scan job ...
03-14-14 15:02:13 stdout       INFO         Got it!
03-14-14 15:02:13 stdout       INFO     Waiting for user selection ...
03-14-14 15:02:23 stdout       INFO         Got it!
03-14-14 15:02:23 root         ERROR    Something awful happened! Waiting 10 seconds before trying again.
Traceback (most recent call last):
  File "/usr/bin/", line 1502, in <module>
  File "/usr/bin/", line 375, in scannWorker
    user_selection = queryUserOptions()
  File "/usr/bin/", line 292, in queryUserOptions
AttributeError: 'NoneType' object has no attribute 'attrib'
03-14-14 15:02:33 stdout       INFO     Waiting for scan job ...

There is no "Color" in the answer of queryUserOptions().
The Answer is: <?xml version="1.0" encoding="UTF-8"?><root><S2PC_Select><AppIndex Value="3"/><FileFormat Value="FORMAT_JPEG"/><FileName Value=""/></S2PC_Select></root>
The printer seems to only send these 3 attributes, no matter if i change preset values on the panel or not.
Using CLX-4195N with FW V4.00.01.30 and current repository version of samsungScannerServer.


03-14-14 17:26:38 stdout       INFO     MODE: Color - 16 Million Colors
03-14-14 17:26:38 stdout       INFO     DPI: 300
03-14-14 17:26:38 stdout       INFO     SIZE: A4
03-14-14 17:26:38 stdout       INFO     Scanning ...
03-14-14 17:26:39 stderr       INFO     Whoops! Problem scanning (maybe version Samsung device driver >= 4.1 and multi-scan?):
03-14-14 17:26:39 stderr       INFO     Traceback (most recent call last):
03-14-14 17:26:39 stderr       INFO       File "/usr/bin/", line 501, in scanAndSave
03-14-14 17:26:39 stderr       INFO         for im in imgs:
03-14-14 17:26:39 stderr       INFO       File "/usr/lib/python2.7/dist-packages/", line 113, in next
03-14-14 17:26:39 stderr       INFO         raise
03-14-14 17:26:39 stderr       INFO     TypeError: exceptions must be old-style classes or derived from BaseException, not str

Exceptions from seem not to be cought correctly there.


Guys, thanks a lot.

I can confirm I just installed everything from the repo and it all worked smoothly.

This is on Ubuntu GNOME 14.04 + GNOME 3.12 (Staging PPA).



Hello Everyone,

I saw this document and i'm very interessed in this.
But can anyone tell me how to install SANE on a linux device.
I Can't figure it out in the README.linux.

Thanks a lot.

Melis Dekker


SANE is probably available as a package (such as "libsane") through your package manager, if by "device" you mean some sort of computer.

If you mean something like an Android device, I'm not sure whether or not SANE works.


Hello bchemnet.

Thank you for your reply.
It's a Medion Nas Server. It's accessable via SSH Shell. Can you prefer a good package manager?
I use uwsiteloader, but can't find SANE in it. If you know one, please can you tell me where to find it, and a little help with how to use it?

Thanks a lot.


As far as I can tell, nobody is providing a sane-backends or equivalent package for that type of device.  You might be able to compile it from source, but I have no personal experience that would be helpful to you.


Hi Guys,

I have a synology nas server. And i would like to have my samsung clx 3305 scanner working on it. I found out i have to use the xerox mfp driver.

But is there someone that can me provide a step by step manual to install the NETWORK scanner on the synology.

Thanks a lot.



I got today my new Samsung Multi-Printer Xpress 1860FW. I installed the Server from the packages here using Kubuntu Raring, but I get the following error:

Using circumvention for PDF save because you use pillow 2.0.0
INFO:stdout:# Initiating version 0.4.5
INFO:stdout:At program termination joining log listener process with:
INFO:stdout:    <function exitListener at 0x93e517c>
INFO:stdout:Used '/etc/samsungScannerServer.conf' as configuration file.
INFO:stdout:Below is what was configured with it.
INFO:stdout:CONFIG: SERVER_NAME='adweso-laptop'
INFO:stdout:CONFIG: OWNER='adweso'
INFO:stdout:CONFIG: OUTPUT_PREFIX='${homedir}/Scans/SCAN_${date}__${uid}'
INFO:stdout:CONFIG: def contrastFilter(im):
INFO:stdout:CONFIG:     return ImageOps.autocontrast(im,10)
INFO:stdout:CONFIG:     {'name':'Gray-M_PDF-300' ,'color':'COLOR_GRAY','resolution':'DPI_300','format':'FORMAT_M_PDF','size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG:     {'name':'Color-M_PDF-300','color':'COLOR_TRUE','resolution':'DPI_300','format':'FORMAT_M_PDF','size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG:     {'name':'Gray-JPEG-300'  ,'color':'COLOR_GRAY','resolution':'DPI_300','format':'FORMAT_JPEG' ,'size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG:     {'name':'Color-JPEG-300' ,'color':'COLOR_TRUE','resolution':'DPI_300','format':'FORMAT_JPEG' ,'size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG:     {'name':'Gray-M_PDF-75'  ,'color':'COLOR_GRAY','resolution':'DPI_75' ,'format':'FORMAT_M_PDF','size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG:     {'name':'Gray-S_PDF-75'  ,'color':'COLOR_GRAY','resolution':'DPI_75' ,'format':'FORMAT_S_PDF','size':'SIZE_A4','output':OUTPUT_PREFIX, 'filters':[]},
INFO:stdout:CONFIG: ]
INFO:stdout:CONFIG: MODES2SANE={'COLOR_MONO':'Black and White - Line Art', 'COLOR_GRAY':'Grayscale - 256 Levels','COLOR_TRUE':'Color - 16 Million Colors'}
INFO:stdout:CONFIG: LOG_NAME="/var/log/samsungScannerServer.log"
INFO:stdout:The following was automatically configured.
INFO:stdout:AUTOCONFIG: HOME_DIR = '/home/adweso'
INFO:stdout:Newly registered server 'adweso-laptop' with UniqueID '2176ad6d8bafe09e' has got
INFO:stdout:    InstanceID '4'.
INFO:stdout:At program termination unregistering server with:
INFO:stdout:    <function unregisterServer at 0x93ca304>
INFO:stdout:Init SANE ...
INFO:stdout:Connecting to scanner ...
INFO:stderr:Error while trying to configure scanning options:
INFO:stderr:    ValueError: SIZE2SANE dictionary must not be empty!
INFO:stderr:You should manually configure SIZE2SANE in '/etc/samsungScannerServer.conf'.
INFO:stdout:Unregistered server 'adweso-laptop' with UniqueID '2176ad6d8bafe09e'.

I uncommented one of the two SIZE2SANE lines in the config file, but the result is the same ?

scanimage -help gives:

Options specific to device `smfp:usb;04e8;346b;0796BJEG700143V':                                                                                                                                         
    --preview[=(yes|no)] [no]                                                                                                                                                                             
        Request a preview-quality scan                                                                                                                                                                   
  Image Quality:                                                                                                                                                                                         
    --mode Color - 16 Million Colors|Grayscale - 256 Levels|Black and White - Halftone|Black and White - Line Art [Color - 16 Million Colors]
        Set the color composition mode of the scanned image
    --resolution 75|100|150|200|300|600|1200dpi [300]
        Set the resolution of the scanned image
  Scan Area:
    --doc-source Flatbed|ADF Simplex [Flatbed]
        Select source of the document to be scanned
    --page-format Statement|Statement(Rotated)|A5|A5(Rotated)|B5(JIS)|Executive|A4|Letter|Custom [A4]
        Set the paper format of the scanned page
    -l 0..215mm

  •         Set left position of the scan area
        -t 0..297mm

  •         Set top position of the scan area
        -x 0..215mm [210]
            Width of scan-area.
        -y 0..297mm [297]
            Height of scan-area.

    How I can fix this ?

    best regards



Hi guys,

First of all, thank you for this awesome work. Unfortunately it doesn't work with my printer c1860 series, and I suspect a tiny detail to be the source of this trouble.

Here is what show the logs :

Traceback (most recent call last):
  File "/usr/bin/", line 1439, in <module>
    SERVER_INSTANCE_ID = registerServer()
  File "/usr/bin/", line 208, in registerServer
    raise NameError("Error registering server: "+result)
NameError: Error registering server: <HTML>

<B>The document has moved</B><BR>


I am not at all into programming but I had a look into /usr/bin/
On line 201 (v. 0.4.5) I saw something strange "c:\IDS.XML" which looks like a Windows path to me (but again I am not a programmer, and this may have non incidence at all).

Anyway, I don't think this is the problem as I tried to debug on a machine running Windows.

1°) First /IDS/CAP.XML is called and received from the printer
2°) then an exchange is made from the GNU machine towards the printer with /IDS/ScanFaxToPC.cgi

So basically, this is all good.

So I wanted to debug the exchanges on GNU/Linux with ssldump on port 443 as https is forced by the printer either through the Samsung programs on Windows or through a simple browser. Surprise, no packets were intercepted. With tcpdump I discovered only http exchanges are made between my GNU box and the printer.

So I think the problem lays here. For registration, the printer forces the client to use https while the script keeps calling on http as it is unable to switch. I have no idea how to change that.

Eureka !! I changed two lines in /usr/bin/ :

Line 154: h = http_client.HTTPSConnection(host, 443)
and line 388: capxmlfile = urllib2.urlopen('https://%s/IDS/CAP.XML' % REAL_SCANNER_IP)

It's not elegant but now registration works.

I then encountered the problem described by Metafa666. So I went to /etc/samsungScannerServer.conf and uncommented the first line. No more SIZE2SANE error.

But unfortunately this is the end of the road for me, as when I try to scan to my Ubuntu server I encounter an error previously exposed by Secret :

02-28-16 04:26:05 root         ERROR    Something awful happened! Waiting 10 seconds before trying again.
Traceback (most recent call last):
  File "/usr/bin/", line 1504, in <module>
  File "/usr/bin/", line 377, in scannWorker
    user_selection = queryUserOptions()
  File "/usr/bin/", line 295, in queryUserOptions
AttributeError: 'NoneType' object has no attribute 'attrib'


02-28-16 04:37:18 root         ERROR    Something awful happened! Waiting 10 seconds before trying again.
Traceback (most recent call last):
  File "/usr/bin/", line 1504, in <module>
  File "/usr/bin/", line 347, in scannWorker
    while (queryPrinterScanStatus(SERVER_INSTANCE_ID) != 1):
  File "/usr/bin/", line 335, in queryPrinterScanStatus
    "Error message: %(e)s.") % locals())
Exception: Could not query printer scan status.
    Result was '[(ObjectName(, Integer32(-1))]'.
    Error message: Integer32 instance has no attribute '__getitem__'.


Thanks all for creating this nice tool. I have a CLX3305FW which works great, although I needed to set snmp access to read/write for being able to use MODIFIED_SANE=TRUE. I use ubuntu 16.04 (Xenial) as server. Below the Firmware version of my printer.

Main Firmware Version
V3.00.02.17 DEC-20-2014
Network Firmware Version
IP Core Software Version
22.01.NW Stack Version
Engine Firmware Version
V1.00.20 2014-07-09
PCL5E Firmware Version
PCL5Ce 6.79.05 07-10-2014
PCL6 Firmware Version
PCL6 7.44.03 08-29-2012
PostScript Firmware Version 03-07-2014
SPL Firmware Version
SPL-C 5.59.02 02-24-2014
PDF Firmware Version 03-07-2014


@Hec did you ever find a solution/workaround to get the C1860 to work?
I am facing the exact same problem...


Hi guys, thanks for your job and your time spent to help people run this printer on linux. I am totally newbie with linux. I have Lubuntu 16.4.3 since 2 days.  I must say that I do understand yet all this commands but i tried to follow you and I have run all this commands. My printer SamsungM2070W worked with Samsung V1 driver later on I uninstalled it ( so was on the website)and I installed 4.xx driver. The printer and scanner works, however my aim is to scan to PC using the button on printer. I guess some kind of server must be active to receive the data. I installed or unzipped server 0.4.1 I have no idea :) and now I am trying to start the server and this is my log :

kk@kk-System-Product-Name:~/Downloads$ bash samsungScannerServer.0.4.1.tgz
Installing Samsung Scanner Server UI ...
Newer files (such as a modified config file) are kept by default.
    Add --overwrite as 2nd argument to overwrite them.
Older files (such as an outdated script file) are overwritten by default.
    Add --keep-old-files as 2nd argument to keep all existing files.
Want to continue with default settings? [Y/n]: y   
tar: Current 'usr/bin/' is newer or same age
tar: Current 'etc/init.d/samsungScannerServer' is newer or same age
kk@kk-System-Product-Name:~/Downloads$ sudo service samsungScannerService start
Failed to start samsungScannerService.service: Unit samsungScannerService.service not found.

So was the server installed or no? The log is after I repeated install command so this is why the terminal asking about rewriting.

Could you give some advise? Actually, to be honest for a beginner it is not so clear which server version should I install and with which install script and so on.
There are few version of server scripts and and user interface. Are they all compatible?

What should be the final set of this files/scripts/server?

Thanks and regards.


Don't use any of the files from this thread.  The most current versions are those packaged through the repository, and should be installed that way.

Repository Information Legal Contact Alternative Drivers