SANE Backends network scanning package for Synology NAS

SANE-package

Many scanners last considerably longer than they enjoy driver updates for. Manufacturers are seldom willing to update drivers for new operating systems. The transition to 64bit was a similar obstacle. Furthermore Windows and Mac OS X have retired the TWAIN scanning API in favour of the WIA (Windows Image Acquisition) and ICA (Image Capture Architecture) APIs respectively. These conditions have resulted in a mountain of perfectly good hardware being thrown away unnecessarily. I feel pretty strongly about that needless waste. I recently found myself without any modern drivers for my own Canon CanoScan LiDE 20, so I decided to do something about the problem. Now you can use this package to share your obsolete scanner from your Synology NAS.

SANE is an open source scanning API which has a fantastic wealth of device support. SANE’s differentiator is that it separates the drivers (backend) from the presentation and the scanning (frontend). This is ideal for a headless device like a NAS, and it also frees the frontend to be quite generic rather than highly customized to each device.

 

Device Support

HP all-in-one models are not supported by the package since their backend hpaio is not part of a standard SANE build, and it requires significant additional dependencies. Scanner backends which require libieee1284 are not supported by the package (canon_pp, hpsj5s, and mustek_pp), neither is backend dell1600n_net which needed a TIFF library and in fact only supports one device. You can verify which backend is required for your model of scanner using the SANE Project search engine. Expand below for the full list of backends which this Synology package supports:

net
abaton
agfafocus
apple
avision
artec
artec_eplus48u
as6e
bh
canon
canon630u
canon_dr
cardscan
coolscan
coolscan3
dmc
epjitsu
epson2
epsonds
fujitsu
genesys
gt68xx
hp
hp3900
hpsj5s
hp3500
hp4200
hp5400
hp5590
hpljm1005
hs2p
ibm
kodak
kodakaio
kvs1025
kvs20xx
leo
lexmark
ma1509
magicolor
matsushita
microtek
microtek2
mustek
mustek_usb
mustek_usb2
nec
niash
pie
pint
pixma
plustek
qcam
ricoh
rts8891
s9036
sceptre
sharp
sm3600
sm3840
snapscan
sp15c
tamarack
teco1
teco2
teco3
u12
umax
umax1220u
v4l
xerox_mfp
 

Synology Package Installation

  • In Synology DSM’s Package Center, click Settings and add my package repository:
    Add Package Repository
  • The repository will push its certificate automatically to the NAS, which is used to validate package integrity. Set the Trust Level to Synology Inc. and trusted publishers:
    Trust Level
  • Now browse the Community section in Package Center to install SANE Backends.
    Community-packages
    The repository only displays packages which are compatible with your specific model of NAS. If you don’t see SANE Backends in the list, then either your NAS model or your DSM version are not supported at this time. DSM 5.0 is the minimum supported version for this package.
  • When the package is started it will attempt to detect a scanner and output the results to the package log. If your scanner is listed in the log, that is all that is required at the backend.
  •  

    SANE Frontend for the Computer

    Since I have a variety of systems at home I spent some time investigating the various options. I list them in order of quality of experience below. You will need to manually specify the IP address of your NAS when setting up the scanner. Be aware that the scanner will need redefining on the computer if you change USB port later for instance. No credentials are needed for connection by default.

    • WiaSane (Windows 7) – Microsoft removed TWAIN from 64bit editions of Windows, so if you want tight integration with applications then WIA is the only viable option. Marc Hoersken has developed a SANE to WIA bridge which works very well indeed, presenting the remote device to Windows Device Manager as if it is locally attached. Scanning using the Windows Fax and Scan application is seamless (preview, partial selections etc.), and other software with WIA support could be used. This device-based approach unfortunately proves to be limiting because Windows 8/8.1/10 will not permit the installation of unsigned device drivers. Since WiaSane is an open source project, the driver is unlikely to be WHQL certified anytime soon. It is possible to boot newer versions of Windows with device driver signing enforcement disabled, but this toggle resets at each reboot so that would be too impractical for regular use. WiaSane was last updated in October 2014.
    • SaneWinDS (Windows 8/8.1/10) – This frontend does not hook into WIA so you will have to use it for the scan acquisition rather than acquiring from inside applications. It does a good job of presenting the available options, and will send the scans directly to the default application for the destination file type. There is no driver component – it’s just a software application so it works fine even on Windows 10. Author Alec Skelly last updated SaneWinDS in April 2015.
    • SwingSane (Mac OS X, Windows, Linux) – This was the only frontend that actually worked on Mac OS X 10.11 El Capitan. Being a Java application it will run on all operating systems. SwingSane is full featured but it has some quite rough edges which caused me to think it was broken when I first evaluated it. After failing to find a single other working solution for Mac OS X (no one has yet coded a SANE to ICA bridge), I came back to this explanatory video by SwingSane’s author Roland Quast which explains the non-obvious aspects.
      The most confusing thing is that the Settings tab was not offering me the appropriate settings for my scanner – for instance I could not set the resolution or the page size. Roland explains in the video that these main settings were specifically targeting Epson scanners, and that for all other models Custom Settings should be used, in particular he recommends to select Check Options which queries the backend driver for its parameters. The next problem is that with custom settings SwingSane will not select the whole bed of the scanner by default, only a small selection. If you export the settings and inspect the XML file you can discover the constraint values (maxima) for the br-x and br-y values (bottom right of the selection rectangle), set those and save the settings. This is far too counter-intuitive when surely these values can be determined automatically by the software.
      One strength of SwingSane however, is that all the scans produced in the current session are stored in the preview tab and can be output to the same multi-page PDF. Finally, the file requestor confused me on Mac OS X (more so than on Windows). There is a dropdown for File Format which is blank (why show this?). I was expecting to specify the filename, but this is determined by the scan batch so really the file requestor is asking for a destination folder. This should be stated in the window title. Furthermore on Mac OS X you cannot save once you are inside a folder – you have to navigate to its parent and select the destination folder without navigating to its contents! This is really not obvious and leads you to suspect the software is broken. I will be submitting these points of feedback to the author.
      SwingSane was last updated in April 2015.
    • I’ll just mention that Mattias Ellert’s TWAIN SANE failed to remote scan on Mac OS X 10.11 El Capitan, even using GraphicConverter (which uses TWAIN). I’m somewhat confused because I read elsewhere that TWAIN was entirely removed from El Capitan, so I’m not sure how this solution would work. I have previously been able to use this solution to locally connect my scanner, using an older Mac OS X version. I dislike that there is no uninstall option for the packages. This is precisely what I avoid doing to Synology systems when I build packages – spilling a load of files into parts of the filesystem that are poorly understood by the user, with no way to undo afterwards. Yes I could manually inspect the package bom file and delete files, but what about changes to config files such as inetd.conf etc.? Not recommended.
     

    Notes

    • The package can be stopped and started in Package Center but really this is to launch and provide the log output of sane-find-scanner and scanimage -L in the easiest way for non-technical users. saned uses the inetd super-server daemon so it is only loaded and invoked when a SANE frontend makes contact on port 6566. This means that really there is no performance or RAM penalty for leaving the package running all the time, even on very resource limited systems.
    • If you connected a scanner via USB while the package was already running you will need to stop and restart the package for it to be detected by SANE.
    • By default access is granted to SANE frontends originating from any IP address (0.0.0.0/0). This can be restricted by modifying /var/packages/sane-backends/target/etc/sane.d/saned.conf, or by configuring the DSM Firewall.
    • By default connections to the SANE backends do not require credentials. If you would like to secure devices, create the text file /var/packages/sane-backends/target/etc/sane.d/saned.users, specifying credentials in the format “user:password:backend”, e.g.:
      swingsane:fqkg3h328rge:plustek
    • Owing to a very complex dependency chain, I compiled sane-backends without avahi support, which is a multicast DNS solution like Apple Bonjour allowing auto detection of scanners. Some of the available SANE frontends make the assumption that avahi will be used and so do not allow you to statically define a target IP address. Those frontends (mostly older Mac OS X ones) cannot be used with this package.
    • Although most of the library search path behaviour can be controlled at compilation time, unfortunately the backend drivers are searched for using a static path, and sane-backends insists on saving its configuration in a static location. I am always careful that my packages do not damage the system they are installed on so I have kept all of this contained within /var/packages/sane-backends/target by cross-compiling in this same location on my development Linux VM.
     

    Package scripts

    For information, here are the package scripts so you can see what it’s going to do. You can get more information about how packages work by reading the Synology 3rd Party Developer Guide.

    installer.sh

    #!/bin/sh
    
    #--------SANE Backends installer script
    #--------package maintained at pcloadletter.co.uk
    
    
    SYNO_CPU_ARCH="`uname -m`"
    [ "${SYNO_CPU_ARCH}" == "x86_64" ] && [ "${SYNOPKG_DSM_VERSION_MAJOR}" == "6" ] && SYNO_CPU_ARCH="x64"
    [ "${SYNO_CPU_ARCH}" == "x86_64" ] && SYNO_CPU_ARCH="i686"
    [ "${SYNOPKG_DSM_ARCH}" == "comcerto2k" ] && SYNO_CPU_ARCH="armhfneon"
    [ "${SYNOPKG_DSM_ARCH}" == "alpine" ] && SYNO_CPU_ARCH="armhfneon"
    [ "${SYNOPKG_DSM_ARCH}" == "alpine4k" ] && SYNO_CPU_ARCH="armhfneon"
    [ "${SYNOPKG_DSM_ARCH}" == "monaco" ] && SYNO_CPU_ARCH="armhfneon"
    [ "${SYNOPKG_DSM_ARCH}" == "armada38x" ] && SYNO_CPU_ARCH="armhfneon"
    NATIVE_BINS_URL="http://packages.pcloadletter.co.uk/downloads/sane-native-${SYNO_CPU_ARCH}.tar.xz"   
    NATIVE_BINS_FILE="`echo ${NATIVE_BINS_URL} | sed -r "s%^.*/(.*)%\1%"`"
    INSTALL_FILES="${NATIVE_BINS_URL}"
    COMMENT="# Synology SANE Backends Package"
    TEMP_FOLDER="`find / -maxdepth 2 -path '/volume?/@tmp' | head -n 1`"
    PUBLIC_FOLDER="`synoshare --get public | sed -r "/Path/!d;s/^.*\[(.*)\].*$/\1/"`"
    source /etc/profile
    
    
    preinst ()
    {
      cd ${TEMP_FOLDER}
      for WGET_URL in ${INSTALL_FILES}
      do
        WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`"
        [ -f ${TEMP_FOLDER}/${WGET_FILENAME} ] && rm ${TEMP_FOLDER}/${WGET_FILENAME}
        wget ${WGET_URL}
        if [ $? != 0 ]; then
          if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${WGET_FILENAME} ]; then
            cp ${PUBLIC_FOLDER}/${WGET_FILENAME} ${TEMP_FOLDER}
          else
            echo "There was a problem downloading ${WGET_FILENAME} from the official download link, " >> $SYNOPKG_TEMP_LOGFILE
            echo "which was \"${WGET_URL}\" " >> $SYNOPKG_TEMP_LOGFILE
            echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. " >> $SYNOPKG_TEMP_LOGFILE
            exit 1
          fi
        fi
      done
    
      exit 0
    }
    
    
    postinst ()
    {
      #extract CPU-specific binaries
      cd ${SYNOPKG_PKGDEST}
      tar xJf ${TEMP_FOLDER}/${NATIVE_BINS_FILE} && rm ${TEMP_FOLDER}/${NATIVE_BINS_FILE}
    
      #allow access to saned by default (this can be restricted by IP/subnet)
      echo 0.0.0.0/0 >> /var/packages/${SYNOPKG_PKGNAME}/target/etc/sane.d/saned.conf
    
      #add firewall config
      /usr/syno/bin/servicetool --install-configure-file --package /var/packages/${SYNOPKG_PKGNAME}/scripts/${SYNOPKG_PKGNAME}.sc > /dev/null
    
      exit 0
    }
    
    
    preuninst ()
    {
      `dirname $0`/stop-start-status stop
    
      exit 0
    }
    
    
    postuninst ()
    {
      #remove system configuration changes
      sed -i "/${COMMENT}/d" /etc/services
      sed -i "/${COMMENT}/d" /etc/inetd.conf
    
      #remove firewall config
      if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then
        /usr/syno/bin/servicetool --remove-configure-file --package ${SYNOPKG_PKGNAME}.sc > /dev/null
      fi
    
      exit 0
    }
    
    
    preupgrade ()
    {
      `dirname $0`/stop-start-status stop
    
      exit 0
    }
    
    
    postupgrade ()
    {
      exit 0
    }
    
     

    start-stop-status.sh

    #!/bin/sh
    
    #--------SANE Backends start-stop-status script
    #--------package maintained at pcloadletter.co.uk
    
    PKG_FOLDER="/var/packages/sane-backends"
    DLOG="${PKG_FOLDER}/target/var/sane-find-scanner.log"
    COMMENT="# Synology SANE Backends Package"
    source /etc/profile
    source /root/.profile
    
    
    EnvCheck ()
    #updates to DSM will reset these changes so check them each startup
    {
      #/etc/services should contain 1 line added by this package tagged with trailing comments
      COUNT=`grep -c "${COMMENT}$" /etc/services`
      if [ $COUNT != 1 ]; then
    
        #remove any existing mods
        sed -i "/${COMMENT}/d" /etc/services
    
        #make the required changes
        echo "sane-port       6566/tcp                        ${COMMENT}" >> /etc/services
      fi
      #/etc/inetd.conf should contain 1 line added by this package tagged with trailing comments
      COUNT=`grep -c "${COMMENT}$" /etc/inetd.conf`
      if [ $COUNT != 1 ]; then
    
        #remove any existing mods
        sed -i "/${COMMENT}/d" /etc/inetd.conf
    
        #make the required changes      
        echo "sane-port stream tcp    nowait  root    ${PKG_FOLDER}/target/sbin/saned    saned  ${COMMENT}" >> /etc/inetd.conf
      fi
    }
    
    case $1 in
      start)
        EnvCheck
        reload inetd
        echo `date "+%F %R"` startup. `${PKG_FOLDER}/target/bin/sane-find-scanner -q` > ${PKG_FOLDER}/target/var/sane-find-scanner.log
        echo `date "+%F %R"` `${PKG_FOLDER}/target/bin/scanimage -L` >> ${PKG_FOLDER}/target/var/sane-find-scanner.log
        exit 0
      ;;
    
      stop)
        #remove any existing config changes
        sed -i "/${COMMENT}/d" /etc/services
        sed -i "/${COMMENT}/d" /etc/inetd.conf
        killall -q saned
        reload inetd
        exit 0
      ;;
    
      status)
        grep -q "${COMMENT}" /etc/inetd.conf && exit 0 || exit 1
      ;;
    
      log)
        echo "${DLOG}"
        exit 0
      ;;
    
    esac
    
     

    Changelog:

    • 0002 20/Jul/16 – Added support for Marvell Armada 385 SoC
    • 0001 16/Dec/15 – Initial public release
     
     
    Advertisements

39 thoughts on “SANE Backends network scanning package for Synology NAS

  1. Dattel

    Hi… before i tried to install sane several times manual. it works but i was frustrated because it only worked with xsane-frontend for windows and since windows 10-1511 xsane stucks…

    so today i googled around to find a working solution and here i am.
    first of all, i am a DS215j user with an attached Canon Pixma MX310 Device.
    The installation works like charm. sane seems to be configured correctly because i managed to scan from the shell:
    /var/packaged/sane-backends/target/bin/scanimage –format jpeg > /volumne1/test.jpeg

    but i can’t find the device neighter from sanewin (windows10) nor sanedroid…
    the saned.conf allows 0.0.0.0/0
    the inetd.conf includes:
    sane-port stream tcp nowait root /var/packages/sane-backends/target/sbin/saned saned # Synology SANE Backends Package

    maybe you can assist a bit…

    Reply
  2. Dattel

    okay it works!!!
    I restarted the diskstation and i think it restarts the firewall to support the ports for the sane-backend… thanks for the description

    Reply
  3. tonycpsu

    So glad you put this package together, as I had no luck using ipkg.

    Unfortunately, it’s not detecting my scanner, an HP v40xi. The device shows up in /proc/bus/usb/devices, but the sane-finds-scanner log says:

    No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages).

    If I run the sane-find-scanner util with -v, it shows all the devices it’s trying to open, but says “failed to open” with various errors for all of them. If I try to run it by pointing it at the specific /dev entry, it says:

    searching for USB scanners:
    checking /dev/usb/03f0:1011:[serialnumber]… failed to open (Invalid argument)

    Any ideas on what to try next?

    Reply
    1. patters Post author

      Having looked a little further into this, HP all-in-one model support is not included in a standard compile of sane-backends. These would need a separate backend called hpaio which is distributed by HP as part of the HPLIP toolkit (HP Linux Imaging and Printing):
      http://hplipopensource.com/node/128

      However, as you can see from the diagram this requires D-Bus, CUPS and other HP-specific components. D-Bus alone was sufficiently difficult to compile that I abandoned trying to include Avahi support in my build of SANE. Unfortunately this will make it difficult for me to include hpaio in the package. I have updated the main post with a Device Support section to make this clear.

      Reply
  4. Richard

    works nice with sanesroid and sees my scanner.
    But if i try to install phpsane i can’t get it to work it keeps on saying not scanner any thoughts on this?

    Reply
    1. patters Post author

      I did try to install phpsane on my Syno briefly because it would have been useful to include that in the package but I got the same result as you. I couldn’t figure it out. Sorry.

      Reply
  5. Kir C

    Hi !
    I successfully installed Sane. There was information about founded printer and scanimage -l result in the log.
    But SaneWinDS and SaneTwain can’t do something – I get “expired time to access the socket” problem.
    When i scan from shell (/var/packaged/sane-backends/target/bin/scanimage –format jpeg > /volumne1/test.jpeg) I get empty test.jpeg (0 kb).

    Printer Epson L210/DSM 5/2

    What can iI do to make it working?

    Reply
  6. Chris Parsons

    Installed this on my DS413 and to my delight my Canon Pixma MP460 is now visible and scanning again – seamless install and detection, 10/10 – thank you very much!

    I use SaneWinDS on W7 which is excellent but might also try some of the other front ends you mention.

    Reply
  7. Chris Mullins

    Successfully installed SANE, which recognizes my ScanSnap 510M that went dark when I upgraded my Mac to El Capitan. (Thanks Fujitsu!)

    Installed SingSane to my Mac. Nothing auto-detected. When attempting to connect manually I get:
    192.168.1.49:6566 – Connection refused

    I have restarted both devices, checked firewall and permissions, all to no avail.

    Any hints or guidance would be appreciated.

    Reply
    1. Mike

      Hi I have the same issue. Installed on my Synology DS3615xs, running DSM 6.0.2-8451 Update 8, Log reports:
      2017-06-03 18:30 startup. found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1705 [hp scanjet scanner], chip=HP4500C/4570C/5500C/5550C/5590/7650) at libusb:003:003
      2017-06-03 18:30 device `hp5590:libusb:003:003′ is a HP 5590 Workgroup scanner

      from Mac client:
      telenet {hostip} 6566
      Connection refused
      telnet: Unable to connect to remote host

      SwingSane from Mac – Connection Refused.
      Window 10 Laptop – SaneWinDS – Connection Refused

      Checked firewall – 6566 open
      checked sand.conf
      ##Access list
      0.0.0.0/0

      What am I missing? Been trying to get this working for 1 week now… not sure where I’ve gone wrong, as all other feedback seems very straightforward.

      Thanks anyone for help, tips, advice…

      Reply
  8. kyoshosan

    Hi.. I’ve successfully installed the package, and after connecting it directly to the usb port of the nas, it detects my Scanjet 6350c correctly. First tested scanning via scanimage. This works but it goes wrong when i supply option as -l -t -x or -y the scanner responds with i/o error.
    Scanning works with winsaneds and the wia driver but not without problems. Full page scanning works but only for 600dpi or lower settings. My scanner can reach 3200dpi, anything higher then 600dpi will generate i/o error (or status error). Scanning a full page @ 3200dpi works in scanimage. Same as with scanimage, changing a setting for scan area will generate a i/o error in winsaneds or wia driver. From what I could find is that it could be caused by the version 1.0.26 of the backend, is this a stable version?. Could you otherwise be so kind to create one with a stable backend version like 1.0.25?

    Reply
    1. patters Post author

      I’ll look into it – which NAS do you have? I’ll compile only the relevant CPU arch and then we can see if it fixes the issue. If it does, I’ll recompile all the builds.

      Reply
      1. jvdkyosho@gmail.com

        Hi patters…

        Sorry didn’t see your reaction sooner (forgot to enable notifications before posting..)

        I’ve got 2 nas devices, a ds411slim (arm 88f6282) and a ds214 (arm armadaxp).
        I’ve tested v002 but the same issues arise. My scanner is a HP ScanJet 6300C.

        Which OS are you using for the compiles… otherwise i’ll create a setup for the arm arch if needed. I have some time to do some test etc.. i’m trying to get the buttons in on the frontpanel to work also, sane should be 100% working with this scanner.

        Already thanks for the effort you have put into the project.

      2. jvdkyosho@gmail.com

        Hi patters..

        Sorry didn’t see your questions sooner, forgot to enable notifications..

        my 2 nas devices are the ds411slim (armv5) and a ds214 (armadaxp)..
        I’ve tried the 002 version but with the same results..
        If the armv5 works would the armadaxp not be backwards compatible? Oke.. maybe not the fastest runtime for the armadaxp but it should work not?

        Thanks for the effort so far..

  9. Alex

    Hi,

    any ideas why I cant see the SANE Backends package in my DSM 216j (DSM 6.0.1-7393 Update 1)? I execute the described steps above, but I cannot find the package in the Community section.

    Thanks,

    A.

    Reply
    1. patters Post author

      Hi Alex, that should be fixed now. Your system has a new processor type so I needed to add it to the package script.

      Reply
      1. Alex

        Hi,

        thanks for updating the script!

        I now see the package in the Community section. I can click the install button, the download starts and after some seconds it says: “SANE Backends: This packet is not supported on this DiskStation platform” (translated from German by me).

        Any ideas?

        Thanks,
        Alex

      2. Alex

        OK! Scanner detected (I have got an old Canon LIDE20). When I start a scan (via SANEWin or the WIA driver) the scanner makes a short noise (as if he would start to scan) and then stops without scanning. Any ideas?

        Thanks a million for your work,

        Alex

      3. patters Post author

        Hi Alex, that’s strange because you have the exact same model of scanner that I have. Mine doesn’t do that, but I’m on an Intel NAS and I haven’t been able to test the package on different systems. I did the cross-compile of the native binaries in a consistent way though so it should be identical. Can you get the preview scan working? Have you confirmed that the scanner still physically works (on an old system perhaps, or via a VirtualBox VM with USB support and an old OS for instance)?

        One option you could try is a little complex – but you could attempt to make the package use the regular ARMv7 binaries instead of the ones built for ARM CPUs with NEON. To do this you would need to download the SANE package file to your local computer. Then you also need to save the SANE ARMv7 native binaries file locally too. Rename that file from sane-native-armv7l.tar.xz to sane-native-armvhfneon.tar.xz and place it in the public (all lowercase) shared folder on your NAS. If it doesn’t exist, create this folder using the DSM Shared Folder control panel.

        Now manually reinstall the package, but make sure your NAS has no Internet access (disconnect your home broadband, or put a fake DNS server in your NAS network settings). It will fail to download the native binaries archive file during the install and it will use the one in public instead. See if this fixes the scanner behaviour.

  10. A.P.

    Hi,
    I cannot get the package installed. Now I looked at the installer.sh script and I found that there is a “uname -m” command for determining the CPU architecture. When I run this command on my Synology I get “armv7l” (the last letter being an L not the digit one). But there is no sane-native-armv7l.tar.xv in your download folder.

    Can you help me here?

    Thanks,

    Alex

    Reply
  11. Alex

    Hi,
    I reinstalled the package manually, same effect :(
    Just one remark: the file name had to be “sane-native-armvhfneon.tar.xz”.

    When I use SANEWin for instance the scanner makes some noise and then I get:
    “No pages were acquired. The Automatic Document Feeder may be empty or the job may have been cancelled.”
    After that the scanner does not even make any noise and I have to restart the SANE Backends service.

    Yes, the scanner works nicely on my old Windows7 32-bit machine which is only used for scanning meanwhile.

    Thanks,

    Alex

    Reply
  12. Felipe Oliveira

    HI patters, I would like to contact you but I could not find your e-mail. Would you be interested in provide me a consulting service ? If yes please contact me by e-mail and I will tell you the details.

    PS: Congratulations for your articles, they are very interesting.

    Thank you
    Regards

    Reply
  13. jvdkyosho@gmail.com

    Hi patters… sorry for the late reply.. forgot to switch on notifications..
    my 2 nas devices are the ds411slim (armv5) and a ds214 (armadaxp)
    i’ve tried v0002 but the result is the same.

    thanks for your effort so far…

    Reply
  14. Huan Nguyen

    Hi,

    I’m using DS216+II with Intel Celeron N3063 and DMS 6.0.2.8451 Update 2 (latest DSM).
    Sane packages installed ok and it’s can recognize my Kodak i1150 scanner. But I don’t know how to use Sane frontend to use the scanner. Have tried with swingsane, wiasane, and scanwinds but no luck.

    Can you pls. guide me how to troubleshoot?

    Thanks,

    Reply
  15. Martin

    Hi there,

    I installed the package with no problems on my DS416. It did not start the inetd (something I need to look into, to make sure it does start automatically). I am using oVirt and running a number of virtual machines. If the virtual machine runs Centos 6.8, all is well, it works perfectly. Oddly enough, if I am running Centos 7.2 or Fedora 24, neither of them detect the scanner. Both will allow me to telnet to the port (6566) where the scanner is running on the Synology and the port is open, but unfortunately, scanimage -L did not see the scanner. Unfortunately, I had a feeling it is probably down to something in the newer versions of Centos and Fedora. Has anyone else come across this?

    Thanks for an excellent package – I will just stick with centos 6.8 for the time being.

    Martin

    Reply
  16. Romain

    Hello there,

    First, a huge thanks for your work. I’ve been willing to share my scan on the network for so long, that finally succeeding thanks to you felt so good :)

    But I ran into a problem, that I’ll try to describe with my non specialist words :

    First, I have an EPSON Stylus DX8450 and a DS216play.
    – I followed your steps, the SANE log indicated that it found “epson2:libusb:001:002” as a Epson CX8400 flatbed scanner. Not mine, but well, it discovers something, I was happy.
    – I installed WiaSane, it found the scanner, and then successfully made a scan with the Windows Scan and Fax.
    – I went to another computer on the same network, installed WiaSane too and successfully made another scan.

    So far so great ! But I did a test : what happens if I turn off and on again the multifunction printer ? Will the config be broken ? And it appears yes…

    I restarted the SANE package with the printer on, it created another scanner “epson2:libusb:001:003”, and I add to reinstall WiaSane with this new scanner to make it works again.

    Is it normal than turning on and off the MFP but not the SANE package break everything ?

    Thanks for your help anyway :) !

    Romain

    Reply
    1. patters Post author

      I do tend to find the same thing (the USB binding changes) which is a bit annoying. I only occasionally need to use my scanner so I tolerate it.

      Reply
  17. Tonne

    Patters, you have done a great job. I have a question though. I installed the package on my synology DS214 with DSM 6.0.2-8451 Update 8.
    When i run /volume1/@appstore/sane-backends/sbin/saned -d5 (as user root) every time when a connection is needed i can get some interaction. But i can’t get inetd to let it run automaticaly. What am i doing wrong?

    Thanks in advance for any help

    Tonne

    Reply
  18. LARdT

    SANE looks very good and seems to be a grat piece of work.
    SANE Backoffice in my NAS detecs properly my Canoscan LIDE30
    I am able to execute SANE commands from my Putty console and seems fine,
    BUT I am not able to make the FROMTOFFICE WORK!
    In Windows10 with SaneWinDS or in the MAC with SwingSANE the answer is the same:
    “host 192.168.1.15 denies the conection to 192.168.1.15:6656” despite I have (to the best of my knowledge) opened the 6656 port.
    Can someone help me with this? It has to be something related to the backoffice (SANE, NAS) part because it fails just the same, from different computers, with different OS and different frontoffice programs.

    Reply
  19. rcj4747

    I found that inetd wasn’t running so I wasn’t seeing a device from my client. I ran ‘/var/packages/sane-backends/target/sbin/saned -d’ on the NAS and found that the client could connect (after adding a firewall rule to allow it).

    The problem I had was inetd was set for manual activation for init (/etc/init/inetd.override existed and contained ‘manual’). I can remove the override file, run ‘initctl start inetd’, and then the client will see a scanner when I run ‘scanimage -L’ (after adding the NAS IP to /etc/sane.d/net.conf on the client). However, once I reboot the NAS the override file is recreated and inetd is again not running. I don’t have a solution for that yet.

    Also, in /var/packages/sane-backends/target/etc/sane.d/saned.conf could you add ‘::/0’ which the IPv6 equivalent of 0.0.0.0/0?

    I’m running DSM 6.1.3-15152 Update 2 (2017/07/23) on a DS415+

    Reply
    1. rcj4747

      The only other thing in /etc/inetd.conf is telnet. I found as a workaround I can enable telnet in the UI but not enable the telnet firewall rule (because I really don’t want telnet access available). This has the side-effect of enabling inetd and keeping it enabled after reboot. With this change inetd runs, saned is available, and clients see the scanner.

      Reply
    1. patters Post author

      Thanks for the improvement suggestion. I’ll try to find time to update the package. Presumably I don’t see this behaviour because my syno is using some other component which depends on inetd. If you get it working as expected, do please let me know since I may find it hard to get my system to not run inetd.

      Reply
      1. paulanomaliePaul

        I confirm the behaviour described by rcj4747.
        I added a sane.cfg file with this content :
        {
        “service_name”: “sane service”,
        “auto_start”: “yes”,
        “init_job_map”: {
        “upstart”: [“inetd”]
        }
        }

        here : /usr/syno/etc/synoservice.d/

        Restarted my synology.
        And inetd is running, I can access my scanner !

        Looks like a good workaround to be added to the package install script ?

        thanks to you guys !

        Paul

      2. paulanomalie

        I confirm the problem with inetd not started described by rcj4747.
        I also confirm the solution.

        Here what I did :
        First test manually.
        syno:/$ sudo mv /etc/init/inetd.override /etc/init/inetd.override.backup
        syno:/$ sudo initctl start inetd

        At this point I could connect to my scanner from client
        Then I tested the solution mentioned to make inetd start at boot.

        Create a package config file (might need other info in this config file ?)
        syno:/$ sudo vi /usr/syno/etc/synoservice.d/sane.cfg
        {
        “service_name”: “sane service”,
        “auto_start”: “yes”,
        “init_job_map”: {
        “upstart”: [“inetd”]
        }
        }
        :x to save and exit

        Then I restarted the syno and hourra scanner can be reached.
        Indeed :
        syno:/$ sudo initctl status inetd
        Password:
        inetd start/running, process 5317

        Looks like problem solved.

        Thanks to both of you patters and rcj4747

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s