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

Menu

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.

Show posts Menu

Messages - mak2109

#1
Dear bchemnet,

I can partly answer my questions after having a slightly deeper look into the py sources.

- The M_PDF functionality is implemented in the samsungScannerServer.py

As I could see, the relevant action handling regarding the dialog with multi page is taking place in class "TCPproxy" and class "_ModSaneIterator".

I fiddled a bit with the "1b a8" requests and the "a8" answers but could not bring the scanner to react in a usable manner. Therefore I added a little bit efford to complete the bash script implementation.

As you asked me to enter the script in a new tread, I opened the thread "scan2pc.sh bash script".
#2
Hi,

I have an Samsung M2070W Printer/Scanner and wished to use the "Scan to PC" functionality with Ubuntu 20.04 LTS like in the Windows environment. So I tried to use the "suld-scantopc_{version}.deb" of this repository and failed getting the python2 dependencies to work. The required dependency packages for python2 are no more available.

In order to still get this functionality, I made a tcpdump and analyzed the communication between scanner and windows driver. As a result I wrote a bash script, that does the job. The script is attached to this post.

As a prerequisit you should habe installed the (s)uld driver and sane environment to be able to do a normal (e.g. xsane) scan controlled by the Linux-PC. In addition the script requires the folowing programs (packages):
   package:        program
   --------------   ---------------
   bash:             bash, wget, grep, sed
   sane-utils:      scanimage
   imagemagick: convert
   snmp:            snmpget
   poppler-utils:  pdfunite
   libtiff-tools:     tiffcp
The configuration data are "stored" as shell variables or given as parameters ($1 .. $4) when you execute the script. The script has a timeout value of 600 secs (10 minutes) before it terminates (or is killed by the user typing ctrl-c (^C)).
After starting the scrip you have 10 minutes time to walk to the scanner and press the known buttons.
As I could not yet completely figure out the logic of the "1b a8" protocol that manages the dialog (next scan: yes/no) at the scanner, the scan cycle is terminated after scanning one page. To be able to do a multi-page scan you have to select "multi PDF" or "multi TIFF" except for the last page. The last page has to be scanned with "single PDF" or "single TIFF" selection at the scanner display (sorry for this inconveniance).

You can get some logging information, if you set "$ export SCANNER_DBG=true" or enable script tracing via "$ set -x". The SCANNER_DBG flag can be set too as the 4th parameter e.g.
                      $1   $2                   $3                             $4
   $ . scan2pc "./" "192.168.1.99" "A4,M_PDF,MONO,200" true

If you have not set any script variable ($ export) and entered no parameter the defaults are:
   $1 - active directory (./)
   $2 - IP of the samsung scanner is called via "scanimage -L" (1st samsung scanner)
   $3 - DIN-A4 page (A4), multi PDF scan (M_PDF), Color {COLOR|GRAY|MONO} (MONO)
   $4 - debug flag {true|false} (false)
   
After you have selected a single scan (e.g. S_PDF), the previously scanned M_PDF pages plus the last S_PDF page are merged to one multi-page document. So after the S_PDF scan you can start a new mult-page scan using M_PDF.
#3
Scanner Server (Scan to PC) / Re: Scan to PC is dead
September 28, 2021, 13:21:31
Sorry to revive this old post.
Maybe there is someone that reads it and hopefully gives an answer.

I have a M2070W and whished to use the "Scan_to_PC" function with Ubuntu 20.04 LTS.
After analyzing the tcpdump I could ask better questions and found this forum.
I downloaded the kit, noticed the python problems and can confirm the death of the python approach.

Therefore I wrote a bash script using wget, snmpget and scanimage and it works nearly as expected.
The only thing is that the M_PDF function is not yet implemented (only S_PDF).
I did not find the tcp packets, that handles the dialog about scanning the following pages.
So only one page can be scanned at a time. Multi pdf pages have to be made in an additional manual step.

Has this feature (M_PDF) been implemented in your distributed package?
How is that dialog implemented?
Any hint is appreciated.

If somebody is intrested in my sh solution, I could upload my script.
Repository Information Legal Contact Alternative Drivers