USB scanner server: got it working on Qnap [Update 20110427]

Printers, HDDs, USB/eSATA drives, 3rd-party programs
john.cosgrove
Starting out
Posts: 21
Joined: Tue Mar 17, 2009 5:09 am
Location: Oxfordshire

[HELP] HP OfficeJet 6110 scanning

Post by john.cosgrove »

OK, so I've followed michielski's instructions with Onkel_Tom and andresam's corrections on my TS-219. IPKG doesn't seem to be available on QPKG yet for the TS-x19, so I followed bzhou's instructions for installing IPKG (optware/cs08q1armel feed) first.

My scanner is an HP OfficeJet 6110. I therefore installed HPLIP, which suggested installing cups and dbus, all via IPKG, all error-free.

sane-find-scanner works fine:

Code: Select all

[/] # sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x2d11 [OfficeJet 6100 Series]) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
but scanimage -L fails:

Code: Select all

[/] # scanimage -L

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).
Suspecting the problem lies with how the HP driver interfaces with sane, I tried running hp-check, but got the following error:

Code: Select all

[/] # hp-check
env: python: No such file or directory
HELP - please!
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

Hi ,
I had the same problem as you while testing it with my scanner.

When you read my Guide you see that i had problems with my epson scanner.

browse to:

Code: Select all

    cd /share/HDA_DATA/optware/opt/etc/sane.d

Code: Select all

    vi dll.conf

So here a part of the file: (Note ,use PageUP en PageDOWN so scroll in large files.)

Code: Select all

 epjitsu
    epson               MY SCANNER IS USING THIS EPSON SETTINGS
    #epson2           THIS IS THE ONE I HAD TO DISABLE TO MAKE MY EPSON SCANNER WORK (Note: # is placing code in comment)
    fujitsu
    #gphoto2
    genesys
    gt68xx
    hp
    hp3900
    hpsj5s
    hp3500
    hp4200
    hp5400
    hp5590
    hpljm1005
    hs2p
    ibm
    leo
    lexmark
    ma1509
    **
    microtek
    microtek2


In my example there were 2 epson config enabled and i had to disable one of them to get it work.

So i guess you have to experiment with disable and enable some HP stuff.

maybe this can help you :

http://www.sane-project.org/sane-mfgs.html
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
john.cosgrove
Starting out
Posts: 21
Joined: Tue Mar 17, 2009 5:09 am
Location: Oxfordshire

Re: USB scanner server: got it working on Qnap

Post by john.cosgrove »

Hi michielske,

Thanks for the tips. Unfortunately, I'm still not winning!
michielske wrote:So i guess you have to experiment with disable and enable some HP stuff.
I've prefixed all hp* lines except hpoj with # and still no joy.
michielske wrote:maybe this can help you :

http://www.sane-project.org/sane-mfgs.html
None of the OfficeJets are mentioned at SANE, although the HPLIP site confirms that the 6110 should "scan to PC" but provides sketchy howto info. Its predecessor at Sourceforge also supported 6110 scanning.

I've PM'd McMagnus, who says he got his 9110 to scan, and bs001, who was also looking at this problem. With luck, maybe they'll be able to help me. If not, does anyone else have any ideas?

Thanks once again.

John.
farrusete
New here
Posts: 8
Joined: Sat Feb 28, 2009 6:28 pm

Re: USB scanner server: got it working on Qnap

Post by farrusete »

Hi John,

Seems that you have to create a symlink as follows:

cd /opt/bin

ln -s python2.5 python
chmod +x python

Im still trying to use my HP F4180 with no succeed :(

Regards
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

Hello,

Today i have upgraded the firmware of my NAS 209PRO and so i had to installed the whole scanner stuff again.

And i found some small problems. (I made the tutorial much later after setup so i forgot something.)

First of all i had problems with windows 7 that Telnet is available anymore so i have added something new in my tutorial about it.

and i had also a problem with my starupscript. to make it executable you must use the command chmod 777 /......../startupscript. (I have also add this to my tutorial today)

For the rest i did all the same like in my guide and i have a working scanner again.
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
stuartturrell
Getting the hang of things
Posts: 94
Joined: Sun Aug 24, 2008 8:55 am

Re: USB scanner server: got it working on Qnap

Post by stuartturrell »

Hi there,
Where would i find this tutorial. I have no clue what to do and would like some assistance with this.
Many thanks,
Stuart
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

Dear,
The tutorial is on the 3th page of this topic :D
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

I have finally found out how to make the startupscript working for xinetd

this is the code of my startupscript:

Code: Select all

#!/bin/sh
sleep 5
cp /usr/local/etc/services /etc/services
sleep 10
export OPTWARE_TARGET=cs05q3armel
echo "xinetd start" >>/usr/local/share/autorun.log

if [ ! -e "/opt/sbin/xinetd" ]; then
echo "xinetd not accessible" >>/usr/local/share/autorun.log
fi
/sbin/daemon_mgr xinetd start "/opt/sbin/xinetd" 2>/dev/null

echo "xinetd started" >>/usr/local/share/autorun.log
sleep 10
I did some test and now i hear the startup beeps like they have to be.
and after the last beep i can use my scanner.
I will also add this code to my tutorial.
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
john.cosgrove
Starting out
Posts: 21
Joined: Tue Mar 17, 2009 5:09 am
Location: Oxfordshire

Re: USB scanner server: got it working on Qnap

Post by john.cosgrove »

Hi farrusete, thanks for the symlink tip:
farrusete wrote:Seems that you have to create a symlink as follows:

cd /opt/bin

ln -s python2.5 python
chmod +x python
hp-check does now run, but still not without errors, this time complaining [incorrectly] about python-dbus not being installed. I suspect this may be a similar problem.

Code: Select all

[/opt/bin] # hp-check
warning: python-dbus not installed.

HP Linux Imaging and Printing System (ver. x.x.x)
Dependency/Version Check Utility ver. 14.0

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
Traceback (most recent call last):
  File "/opt/bin/hp-check", line 177, in <module>
    for l in tui.format_paragraph("1. Compile-time check mode (-c or --compile):
 Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to
determine if the proper dependencies are installed to successfully compile HPLIP
."):
  File "/share/HDA_DATA/.@optware/share/hplip/base/tui.py", line 331, in format_
paragraph
    width = ttysize()[1]
  File "/share/HDA_DATA/.@optware/share/hplip/base/tui.py", line 183, in ttysize
    return int(vals['rows']), int(vals['columns'])
TypeError: int() argument must be a string or a number, not 'NoneType'
I feel I'm rapidly getting out of my depth here. Perhaps I should reset my QNAP and use QPKG to install Python and IPKG (when available for the TS-219) before trying to install HPLIP. On second thoughts, maybe I should first wait for QNAPAndy to QPKGise SANE.

Thanks so much to all in this forum for the help so far.
Qw3r7y
New here
Posts: 2
Joined: Sat Nov 07, 2009 2:19 am

Re: USB scanner server: got it working on Qnap

Post by Qw3r7y »

Hi there,

Firstly thanks for taking the time to share this how-to

Secondly apologies for the n00b questions, but completely new to BASH command line, sorry. :(

Tried following the instructions as well laid out by "michielske" but can't find any subfolders to the HDA_DATA folder.

Did the following:

Installed both packages with the following results:

Code: Select all

[~] # ipkg install xinetd
Installing xinetd (2.3.14-9) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/xinetd_2.3.14-9_arm.ipk
Configuring xinetd
Warning: the current only_from configuration in /opt/etc/xinetd.conf is
        only_from      = localhost 10.0.0.0/8 172.xx.xx.xx/12 192.xx.xx.xx/16
change to your subnet accordingly and tighten security!
Successfully terminated.
[~] # ipkg install sane-backends
Installing sane-backends (1.0.20+git20091022-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/sane-backends_1.0.20+git20091022-1_arm.ipk
package sane-backends suggests installing inetutils
Installing libjpeg (6b-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/libjpeg_6b-3_arm.ipk
Installing libtiff (3.9.2-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/libtiff_3.9.2-1_arm.ipk
Installing zlib (1.2.3-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/zlib_1.2.3-3_arm.ipk
Installing libstdc++ (6.0.3-6) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/libstdc++_6.0.3-6_arm.ipk
Installing libusb (0.1.12-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable
/libusb_0.1.12-1_arm.ipk
Configuring libjpeg
Configuring libstdc++
Configuring libtiff
Configuring libusb
Configuring sane-backends

Adding saned to /etc/services...done.

sane-backends has been installed. To finish the installation, you should conside
r installing
either xinetd or inetd to make sane-backend running.

For inetd, add the following to /opt/etc/inetd.conf:
        sane-port  stream  tcp  nowait  admin.administrators  /opt/sbin/saned sa
ned

For xinetd, create a /opt/etc/xinetd.d/saned file like:
service saned
{
        socket_type = stream
        server = /opt/sbin/saned
        protocol = tcp
Configuring zlib
Successfully terminated.
Tried to open the directory as described but not found:

Code: Select all

[~] # cd /share/HDA_DATA/optware/opt/etc/xinetd.d
-sh: cd: /share/HDA_DATA/optware/opt/etc/xinetd.d: No such file or directory
Found the follwing sub dirs in /share:

Code: Select all

[/share] # ls
HDA_DATA/              HDN_DATA/              MD0_DATA/
HDB_DATA/              HDO_DATA/              Network Recycle Bin 1@
HDC_DATA/              HDP_DATA/              xxxxxxx@
HDD_DATA/              HDQ_DATA/              Public@
HDE_DATA/              HDR_DATA/              Qdownload@
HDF_DATA/              HDS_DATA/              Qmultimedia@
HDG_DATA/              HDT_DATA/              Qrecordings@
HDH_DATA/              HDU_DATA/              Qusb@
HDI_DATA/              HDV_DATA/              Qweb@
HDJ_DATA/              HDW_DATA/              xxxxxxx@
HDK_DATA/              HDX_DATA/              xxxxxxx@
HDL_DATA/              HDY_DATA/              external/
HDM_DATA/              HDZ_DATA/
But if I do an ls in HDA_DATA/ I get nothing back and if I do a find for "optware" or any of the other subs I get a "No such..."

Any ideas, pointers or comments would be greatly recived?!?! :cry:

Thanks a million,

Q
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: USB scanner server: got it working on Qnap

Post by niwa2 »

you are using a raid setup, correct?
you need to substitute HDA_DATA with MD0_DATA.
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
Qw3r7y
New here
Posts: 2
Joined: Sat Nov 07, 2009 2:19 am

Re: USB scanner server: got it working on Qnap

Post by Qw3r7y »

niwa2 wrote:you are using a raid setup, correct?
you need to substitute HDA_DATA with MD0_DATA.
Ah... Many thanks for that little bit of advice! :)

At least I'm on the right track now I think.

Cheers!

Q :D

UPDATE: Have discovered that the ipkg doesn't seem to have installed porperly at all, therefore I'm missing folders / files required to get this working.

My /opt is linked to /share/MD0_DATA/.qpkg/Optware NOT /share/MD0_DATA/optware as I've read it should be and there aren't any xinetd.d foldersto be found etc...

Am at a loss as to how to proceed so am calling it a day (Friday in fact). If I can't get ipkg to install itself through qpkg installer I don't see what else can be done. Have had a quick look and seem to be one of many peeps having a problem with the qpkg instal on a RAID NAS (not just on a TS 209 II Pro). So am reaching for the towel... :roll: Bugger!
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

Hey,

I did everything on RAID 1 config without any problems. So it should work on yours to.
At this moment i don't use the usb scanner anymore because my new scanner is not supported right now.
Seems the ipkg version isn't updated anymore.
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

To all people that like this feature check first this website to see that your device is compatible with sane before you start with configuring the whole thing:

http://www.sane-project.org/sane-mfgs.html

Regards
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
michielske
Getting the hang of things
Posts: 85
Joined: Sun Nov 25, 2007 11:13 pm

Re: USB scanner server: got it working on Qnap

Post by michielske »

Yesterday i did my installation again on new firmware and i encounterd following problems:
directory optware doesn't exist anymore

Code: Select all

/share/HDA_DATA/optware/opt/etc/xinetd.d
New path for newest firmware is :

Code: Select all

cd /share/HDA_DATA/.qpkg/Optware/etc/xinetd.d
It seems that the sane ipkg packages are also updated because i had the following problem:

Code: Select all

[~] # sane-find-scanner
sane-find-scanner: error while loading shared libraries: libieee1284.so.3: canno
t open shared object file: No such file or directory
solution install libieee1284.

Code: Select all

[~] # ipkg list '*libie*'
libieee1284 - 0.2.11-1 - libieee1284 is a cross-platform library for parallel po
rt access.
Successfully terminated.
[~] # ipkg install libieee1284

Successfully terminated.
So 2 import things to keep in mind.
-Path to optware is changed
-extra library needs to be installed.
QNAP TS-201 , Version 2.5.0 build 0601T
QNAP TS-559PROII , version 3.8.3 Build 20130426
Post Reply

Return to “Hardware & Software Compatibility”