Arnout blogs

Everyday solutions

Arnout blogs header image 2

Attaching a scanner to my Synology Diskstation 107

March 30th, 2009 · 22 Comments

Since my Synology DS107 has a couple of USB ports I wondered if it’s possible to use a scanner (Medion MD9705) with it.

The answer is: “Yes, you can!”

The very first thing is to check if sane supports your scanner.

If that’s the case, or you want to try your luck: make sure you got ipkg installed. I used to following site:

I also installed IPKG web, to be able to search, install and remove packages from the Disk Station Manager:

Now you’re able to install the ipkg’s

  • sane
  • libusb

Now let’s find our scanner:


My output is:

found USB scanner (vendor=0xffff, product=0xffff, chip=GT-6816?) at libusb:002:002

the vendor and product string aren’t right. But this turned out the be no problem. I configured


and added the following lines:

# AB: medion
usb 0xffff 0xffff
option artecFirmwareFile /opt/share/sane/artec_eplus48u/Artec48.usb

# Is the scanner an Artec E Plus Pro (or compatible)? 0 = no, 1 = yes
option ePlusPro 0

# for adjusting the default gamma values
option redGamma 1.0
option greenGamma 1.0
option blueGamma 1.0
option masterGamma 1.9

#Use this options to set the default offset and exposure time values.
option redOffset 0×28
option greenOffset 0x2f
option blueOffset 0x2f
option redExposure 0xa7
option greenExposure 0×116
option blueExposure 0xdc

option vendorString “Medion”
option modelString “MD 9705″

I had to upload the firmware file myself. This comes with the Windows driver. I’ve added a howto at the bottom of this post.

Check /opt/etc/sane.d/dll.conf to make sure your module isn’t commented with #. It wasn’t in my case, so probably isn’t by default.

Now check with

scanimage -L

if it’s really detected. In my case:

device `artec_eplus48u:libusb:002:002′ is a Medion MD 9705 flatbed scanner
device `net:localhost:artec_eplus48u:libusb:002:002′ is a Medion MD 9705 flatbed scanner

So I’m up and running. To test and scan an image, google the man page.

Now I want to be able to use it from my Windows Vista Desktop. I decided to use Sain Twain. First we have to setup xinetd though. Install the ipkg

  • xinetd

Check in /opt/etc/xinetd.conf if your subnet is allowed:

only_from = localhost

I’m on a private subnet (192.168) so no issues for me.

Now let’s configure it

vi /opt/etc/xinetd.d/sane-port

Enter the following lines:

service sane-port
port = 6566
socket_type = stream
wait = no
user = root
group = root
server = /opt/sbin/saned

Note: I was lazy and used root. This is not the best option securitywise…

The services file is configured by the installation of sane (and the script /opt/etc/init.d/S01sane-backends does it every startup):

sane-port 6566/tcp # SANE network scanner daemon

Make sure your subnet is allowed in /opt/etc/sane.d/saned.conf. The file itself gives good directions.

Now start xinetd:


Check it it’s running:

ps | grep xinetd

Output should be something like:

2231 root 944 S /opt/sbin/xinetd
2462 root 312 S grep xinetd

If it’s not running check:

cat /var/log/messages

I initially made a typo and read the following in messages:

service/protocol combination not in /etc/services: sane-prot/tcp

If it’s running you’re ready to install Sane Twain. Download it from:

This works fine for me.

ToDo: allow the buttons on the scanner to be used. I’m thinking of trying

### HOWTO: get firmware file ### – 05/05/2009

  • In my case I downloaded the driver from the Medion Website.
  • I extracted the “scamd9705w9xxp.exe” file (with winrar).
  • In the WinXP subfolder there’s a file called Artec48.usb. This is the one you need.
  • I copied the Artec48.usb file to the directory /opt/share/sane/artec_eplus48u/
convert this post to pdf.

Tags: Synology

22 responses so far ↓

  • 1 Stefun // May 4, 2009 at 4:15 pm

    You wrote:
    “I had to upload the firmware file myself. This comes with the Windows driver.”

    How did you do this? I followed your instructions step by step, which was successful until this point. I don’t know what to do right now. Do I have to put the .dll from the windows driver somewhere?
    It would be great, if you could help me with that.

  • 2 Stefun // May 4, 2009 at 4:21 pm

    sorry, i meant the .inf file from the windows driver, not the .dll

  • 3 arnout // May 5, 2009 at 8:51 am

    Hi Stefun,

    I updated my post and put some extra instructions in it. Let me know if you succeed!

  • 4 Stefun // May 6, 2009 at 10:19 pm

    well…not yet…
    the problem is, i don’t have a medion scanner, but a canon. and the canon driver unfortunately comes without a *.usb file….but i’m studying the sane-how-to’s with a friend and we’re working to fix the problem….it MUST be possible somehow ;)

    greetings and again thx for your help!

  • 5 John // May 27, 2009 at 12:20 am

    Trying to set up a Canon Canoscan N70U, can’t get Scanimage -L to recognise it. Stefun, are you using the same scanner?

  • 6 Xander // Sep 29, 2009 at 9:24 pm

    Trying to set up a Canon MP210, but sane-find-scanner doesn’t seem to work. I get this response:

    sane-find-scanner: error while loading shared libraries: cannot open shared object file: No such file or directory

    BTW, I installed the package sane-backend. I didn’t find a package called sane only.

    Any idea what I should do next?

  • 7 arnout // Sep 29, 2009 at 9:37 pm

    Did you install the package libieee1284?

  • 8 Xander // Sep 29, 2009 at 10:08 pm

    I followed your instructions and didn’t install that package. I now did, and my scanner was found. Thanks for the quick reply!

  • 9 arnout // Sep 30, 2009 at 8:05 am

    Maybe the package was already installed on my Syno.

    I’m glad you’re up and running

  • 10 victor // Nov 17, 2009 at 2:39 pm


    i follow step by step you super tuto, but i get an error when run this:

    bruxelles> scanimage -L
    device `pixma:04A91721_A0A33F’ is a CANON Canon PIXMA MP210 multi-function peripheral
    bruxelles> scanimage –mode color –resolution 150 -d pixma:04A91721_A0A33F > mon_image
    scanimage: sane_read: Error during device I/O

    my printer is supported by sane. I installed sane on a server in my netword (, and i try to scan on client pc ( so i wrote in xinet conf:
    only_from = localhost

    …quiet lost :o)

  • 11 arnout // Nov 18, 2009 at 9:45 am

    Hi Victor,

    I’m not really a sane expert. My point was trying to get sane to recognize my scanner at all.

    When I do a little research on you error message, it could be permission related. Can you try running the whole thing as root? This is just for ruling out permissions issues.

  • 12 Miroslav // Apr 4, 2010 at 9:32 pm

    Hi, thanks for perfect how-to. I am able to “see” the scanner (scanimage -L works – have Epson DX 8450), but I can not connect from Windows with SaneTwain (unable to connect to the host). May the problem be this:
    syn> ps | grep xinetd
    7863 root 852 S /opt/sbin/xinetd
    syn> syn> ps | grep xinetd
    I see only one line instead of yours two.
    Firewall switched off, access to sane granted, I am on network 192.168…
    Any ideas? Thanks in advance. I have DS 209+ with latest FW 2.3

  • 13 Arnout // Apr 5, 2010 at 8:09 pm

    Hi Miroslav,

    I’m sorry to say that I disconnected my scanner (I have a multifunctional now) and am not able to check things anymore.

    Sorry I can’t be of any help,


  • 14 Danilo // May 7, 2010 at 3:38 pm

    Same problem here. Scanimage -L reports:

    device `pixma:04A91718_1720E6′ is a CANON Canon PIXMA MP600 multi-function peripheral

    Scanning from the NAS itself works too.

    Nmap reports:

    6566/tcp open unknown

    So the port seems to be open. But I can’t connect to it. Neither from Sanetwain, nor from Ubuntu.

    I understand that you don’t use your scanner anymore, but maybe you have a hint where the problem could be?

  • 15 Arnout // May 8, 2010 at 12:38 pm

    Since sanimage -L produces the right result, it look’s like a networking problem.

    xinetd configured properly (with your own subnet)?

    No firewalls running, e.g. the new built-in synology firewall? Maybe this causes the problem?!

  • 16 Ed // Jul 10, 2010 at 4:33 pm

    Please note that a saned services file is made during install. Thus, the entries in the services should match this name in stead of sane-port.

  • 17 Schubi // Jul 23, 2010 at 12:24 am

    Ed, I saw this too and was wondering – but isn’t “saned” deprecated?

  • 18 Schubi // Jul 23, 2010 at 1:03 am

    Additional information – it appears that sane-backends has a bug which causes it to automatically bind its service to IPv6, in return causing network scanning to stop working.

    starting saned manually (after killing xinetd) with the “-d” (debug) switch, allows the daemon to work for one scanning session, after which it kills itself.

    I haven’t found any trace of this bug being fixed anywhere but in debian – so its doubtful their fix will make it into the optware repository soon.

    For anyone looking for information on this:

  • 19 wadon // Oct 15, 2011 at 10:38 pm

    I haven’t found any trace of this bug being fixed anywhere but in debian – so its doubtful their fix will make it into the optware repository soon.

  • 20 ds212j // Aug 12, 2012 at 10:24 pm

    “ipkg remove libusb” resolves the “Error during device I/O” issue for me.

  • 21 Dries // Jan 3, 2014 at 4:51 pm

    Hi Arnout,

    Have you succeeded in getting the scanner button daemon to work?

    I have been trying a few things but I can’t seem to get it to work. Neither scanbuttond or scanbd seem to work on the Synology NAS.

    The scanner works fine using commands in the SSH of the NAS though.

    Any ideas?

  • 22 Arnout // Jan 3, 2014 at 9:08 pm


    sorry. I don’t have the scanner or the syno anymore. And its almost 5 years ago ;)

Leave a Comment