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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hec

Pages: [1]
1
Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: February 27, 2016, 19:50:30 »
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/samsungScannerServer.py", line 1439, in <module>
    SERVER_INSTANCE_ID = registerServer()
  File "/usr/bin/samsungScannerServer.py", line 208, in registerServer
    raise NameError("Error registering server: "+result)
NameError: Error registering server: <HTML>
<HEAD>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<CENTER>
<FONT SIZE="+2" COLOR="#FFFFFF" ALIGN="Center">
</FONT>
<B>The document has moved</B><BR>
<B></B>
</BODY>

</HTML>


I am not at all into programming but I had a look into /usr/bin/samsungScannerServer.py
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.

EDIT :
Eureka !! I changed two lines in /usr/bin/samsungScannerServer.py :

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/samsungScannerServer.py", line 1504, in <module>
    scannWorker()
  File "/usr/bin/samsungScannerServer.py", line 377, in scannWorker
    user_selection = queryUserOptions()
  File "/usr/bin/samsungScannerServer.py", line 295, in queryUserOptions
    user_options['color']=root.find('Color').attrib["Value"]
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/samsungScannerServer.py", line 1504, in <module>
    scannWorker()
  File "/usr/bin/samsungScannerServer.py", line 347, in scannWorker
    while (queryPrinterScanStatus(SERVER_INSTANCE_ID) != 1):
  File "/usr/bin/samsungScannerServer.py", line 335, in queryPrinterScanStatus
    "Error message: %(e)s.") % locals())
Exception: Could not query printer scan status.
    Result was '[(ObjectName(1.3.6.1.4.1.236.11.5.11.81.11.7.2.1.2.6), Integer32(-1))]'.
    Error message: Integer32 instance has no attribute '__getitem__'.

Pages: [1]
Repository Information Legal Contact Alternative Drivers