DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-08-14 13:00:37

RunaR
Member
Registered: 2008-08-14
Posts: 49

Using my usb scanner as a network scanner

After a lot of headaches I finally got my Canon PIXMA PM520 working as a network scanner on my CH3SNAS. So I guess it'll also work on a DNS-323.
There is this tutorial:
http://charly4711.wordpress.com/2008/04 … er-part-1/, but it leaves out some steps.
I could not find a complete tutorial, so here is what I did to get it working.

I'm using fun_plug 0.5.
I installed optware to get sane-backends on my NAS. How to install optware can be found here http://dns323.kood.org/howto:optware.
Then I installed sane-backends with:

Code:

ipkg install sane-backends

edit the /opt/etc/sane.d/saned.conf to include your network range or ip-addresses where you want to scan from.

Some setting will be overwritten when you reboot your machine, so I created a small sane startup script in /ffp/start/sane.sh
Make sure it is executable with chmod a+x.
This will add a line for inetd to listen to port 6566 and set the rights on your usb.

/ffp/start/sane.sh

Code:

echo "sane-port 6566/tcp # SANE network scanner daemon" >> /etc/services
echo "usbfs           /proc/bus/usb   usbfs   defaults''',devmode=0666'''   0  0" >> /etc/fstab

mount /proc/bus/usb -o remount,devmode=0666

Instead of creating the startup script you could put these lines in your fun_plug script. Put them in the end, before the run programs part.

Enable the /ffp/start/inetd.sh with chmod a+x.

I created a inetd conifg file in /ffp/etc/inetd.conf with only one line in it:

Code:

sane-port  stream  tcp  nowait  root.root  /opt/sbin/saned saned

Now reboot the machine to get every thing working. you can access your scanner over the network with Xsane (http://www.xsane.org/xsane-introduction.html) or sanetwain (http://sanetwain.ozuzo.net/)
Just fill in the correct ip-address of the NAS and username: root

The scanner will be accesed with the root account. It's not nice and clean, but it works. My nas is not accessible from the net.
Also the start script is not very clean, but it worked for me. I just made my first linux steps a few weeks ago. If someone can rewrite the sane.sh to a proper ffp startup script, that would be very nice.

Last edited by RunaR (2009-11-17 11:06:13)

Offline

 

#2 2008-08-17 22:34:20

krimb1
Member
Registered: 2008-01-05
Posts: 65

Re: Using my usb scanner as a network scanner

Hey RunaR, thanks so much for your guide!

I tried following your instructions as best as I could, but am a little stuck. I have a HP Photosmart C3100 series that I'm trying to hook up on my DNS 323.

What I've installed:
I've successfully installed optware and the sane-backends package. I read on some other posts that I need the hplip package to have scan access to my C3100, and have installed that as well.

What I've edited:
As per your instructions, I've added a list of IP address to my /opt/etc/sane.d/saned.conf file. I also added a line "hpaio" to /opt/etc/sane.d/dll.conf so that the hplip library will be accessed.

The good news:
I telnet into the DNS323. Then, if I run the command "sane-find-scanner" (w/o quotes) I see the line:

Code:

found USB scanner (vendor=0x03f0 [HP], product=0x5611 [Photosmart C3100 series]) at libusb:001:004

Hooray!

The bad news:
However, if I run "scanimage -L", I receive:

Code:

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).

I know this might be a little HP specific, but might you have any ideas? smile

Thanks for everything.

***EDIT***

I'm not sure, but if it helps I wanted to let you know some of my hplip executables don't seem to be working. The /opt/bin folder in my path, but certain executables in there—like hp-align, hp-check, hp-clean, etc.—all say that they're "not found" when I try to run them. These files are actually all symlinks to python code in /opt/share/hplip and I can run those files either. Running the command "ipkg install python" says it is already installed—could there be a problem with my python install?

Last edited by krimb1 (2008-08-17 22:42:16)

Offline

 

#3 2008-08-18 01:00:12

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: Using my usb scanner as a network scanner

Those hplip binaries probably need /opt/bin/python2.4

Offline

 

#4 2008-08-18 01:28:26

krimb1
Member
Registered: 2008-01-05
Posts: 65

Re: Using my usb scanner as a network scanner

Hey bzhou! Thanks for your quick response.

I already had python2.5 installed, but I installed python2.4 as you suggested just in case. Unfortunately, the hplip executables are still said to be "not found".

smile

Any ideas?

Last edited by krimb1 (2008-08-18 03:27:25)

Offline

 

#5 2008-08-18 16:48:40

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Using my usb scanner as a network scanner

Are you able to run other python scripts?
Or try to run them with the full path to the file.

Offline

 

#6 2008-08-20 06:38:03

krimb1
Member
Registered: 2008-01-05
Posts: 65

Re: Using my usb scanner as a network scanner

Aha! Made some progress. By your suggestion, RunaR, I tested another python script I had, and to my surprise found it didn't work!

The good news: now python scripts run!
Turns out the HPLIP python scripts were using env variable

Code:

#!/usr/bin/env python

to find the python installation. Only trouble though, it seems the DNS 323 firmware didn't keep env in /usr/bin but instead in the /bin folder! I created a symlink to the existing one using the following command:

Code:

ln -s /bin/env /usr/bin/env

The not-so-good news:
However, when I try running any of the hplip python scripts (e.g. like hp-align, hp-check, hp-clean, etc.) I always receive a

Code:

Segmentation fault

error. I don't receive the error with my other python scripts though.

Could it just be that I don't have enough supporting packages installed for HPLIP? If necessary I can report back on which ipkg packages I've installed.

Thanks again for all your help guys. smile

Offline

 

#7 2008-08-20 19:46:48

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: Using my usb scanner as a network scanner

Offline

 

#8 2008-08-23 05:30:40

krimb1
Member
Registered: 2008-01-05
Posts: 65

Re: Using my usb scanner as a network scanner

bzhou, thanks so much for that great find!

I followed the instructions on the NSLU2 site line by line, but unfortunately in the end I still end with the "Segmentation fault" message.

I've tried to do some reading about the Python "Segmentation fault" message online, and one thread suggested upgrading the readline package from 2.1 to 2.2; I ran

Code:

ipkg install readline

but I already had the latest version.

Could this be an issue specific to the way the DNS 323 interprets Python code? If so, can it be remedied easily? Or would I have do to something crazy like install Debian on it (via instruction on the Wiki)? yikes

Last edited by krimb1 (2008-08-23 05:31:24)

Offline

 

#9 2008-10-27 19:16:51

Prune
New member
Registered: 2008-10-27
Posts: 3

Re: Using my usb scanner as a network scanner

Hi, following the optware and sane-backends installation as in the first post, I get the same problem as krimb1: sane-find-scanner finds it, but scanimage -L says no scanners were identified.  I have an Epson WorkForce 500 (combo printer/scanner/copy/fax) and I don't know if that's just not supported by these sane-backends or what, I'm not sure how to start troubleshooting

Offline

 

#10 2008-10-27 23:04:25

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Using my usb scanner as a network scanner

You could check http://www.sane-project.org/sane-mfgs.html to see if your device is listed. Some devices, like some HP scanners need extra drivers. Your scanner is not listed, but it might be compatible with an other epson scanner.

Offline

 

#11 2009-02-03 11:55:21

pilap82
New member
Registered: 2009-02-03
Posts: 2

Re: Using my usb scanner as a network scanner

up

Offline

 

#12 2009-02-25 08:21:31

craig
Member
Registered: 2009-02-25
Posts: 18

Re: Using my usb scanner as a network scanner

I have an F330 HP scanner/printer. The printing works, and I'm working on the scanner:

I followed the original post by installing sane-backends and setting configuration files.
sane-find-scanner detected my scanner, but scanimage -L did not.
I installed hplip, python, python24, and python25
I tried running one of hp's scripts in python2.4 and python2.5, and I have a segmentation fault

I guess I'm at the same stage as you.

EDIT:
Breakthrough!
I installed coreutils, and now when I run a HP python script:

Code:

warning: CUPSEXT could not be loaded. Please check HPLIP installation.

I tried the other items in the link:
making and linking the folders
changing cupsext.so to UCS4 (didn't need to be changed)

I also noticed python2.4 didn't even have a cupsext.so, so I tried using python2.5's, but it didn't make a difference.


EDIT2:
!!!!!!Even more!
I reinstalled hplib. It recommended I get cups and dbus, so I did.
Now I get the following output:

Code:

/opt/bin # ./python2.5 hp-probe
warning: python-dbus not installed.
warning: hp-probe should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. x.x.x)
Printer Discovery Utility ver. 4.1

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.


Using connection type: usb


--------------------
| DEVICE DISCOVERY |
--------------------

  Device URI                                         Model                 
  -------------------------------------------------  ----------------------
  hp:/usb/Deskjet_F300_series?serial=CN65FFB14R04KH  HP Deskjet F300 series

Found 1 printer(s) on the 'usb' bus.


Done.

As you can see, the dbus installation didn't work, and I'll need some help troubleshooting that. It also states that its not happy that I'm root.
scanimage -L now works too. Let's try scanimage:

Code:

/opt/bin # ./scanimage
process 15167: arguments to dbus_connection_send() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 3046.
This is normally a bug in some application using the D-Bus library.
  D-Bus not compiled with backtrace support so unable to print a backtrace
Aborted

scanimage will make my scanner move a bit, and then returns the above error.
I don't know how to configure sane, but I don't think we're quite on that part yet. Can you make it to where I am now?

Last edited by craig (2009-02-25 10:02:59)

Offline

 

#13 2009-02-26 21:22:07

craig
Member
Registered: 2009-02-25
Posts: 18

Re: Using my usb scanner as a network scanner

I've been trying get farther on this, but I haven't made too much headway.
I think I've narrowed it down to the requirement of python-dbus. There is no ipkg file for it so I think I need to cross compile it.
I downloaded the source, and tried to ./configure it, but it failed at the python enviroment. Even if that succeeded I was probably doing it wrong.
Can someone make a ipkg installation for the source below? I can try installing it, but who knows if it will actually work. I suppose you could try the latest version.

http://dbus.freedesktop.org/releases/dbus-python/

Offline

 

#14 2009-04-30 19:02:32

Pingue28
Member
Registered: 2009-04-28
Posts: 8

Re: Using my usb scanner as a network scanner

Hi craig,
I think I have the same problem as you: http://dns323.kood.org/forum/viewtopic.php?pid=28875
Did you find a solution ?

Thanks,
David

Offline

 

#15 2009-05-01 03:15:12

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: Using my usb scanner as a network scanner

[Update] dbus-glib and py2{5,6}-dbus-python ipk's are in optware feeds.

Cheers.

Last edited by bzhou (2009-05-01 07:16:37)

Offline

 

#16 2009-05-01 11:06:48

Pingue28
Member
Registered: 2009-04-28
Posts: 8

Re: Using my usb scanner as a network scanner

Thanks.
Finally there was another problem resolved like this:

Code:

groupadd -g 84 messagebus
useradd -c 'System message bus' -u 84 -g messagebus -d '/' -s /bin/false messagebus

dbus-daemon --system --print-address

Now everthing works and I'll post the entire procedure when it'll be clean on http://dns323.kood.org/forum/viewtopic.php?pid=28875
Thanks,
David

Offline

 

#17 2009-11-08 03:31:52

dbaby7
Member
Registered: 2009-08-17
Posts: 16

Re: Using my usb scanner as a network scanner

Hi
Could you please tell me exactly what I should type in the saned.conf file? I cant get this to work....is there something I should run afterwords to get the dns-323 to read the printer/scanner?
Many thanks

Offline

 

#18 2009-11-10 05:36:07

zuluwalker
Member
Registered: 2009-11-09
Posts: 27

Re: Using my usb scanner as a network scanner

Post #1 works with my Rev.B DNS-323 and Canon Pixma MP610.

I did run into trouble though - I followed every instruction to the letter only to find out that the the inetd.config file should be inetd.conf instead for it to properly load.

Running sanetwain and sanewia under Windows 7 - next steps are to make it work under Mac OS X (which I'm expecting to go much smoother).

Thanks RunaR!

Offline

 

#19 2009-11-16 17:57:47

snarl
New member
Registered: 2009-11-16
Posts: 1

Re: Using my usb scanner as a network scanner

Hi,

I tried the method above, but can't get it to work.  I am using a AIO Canon MP500, connected through a 4-port, unpowered USB hub.

I'll outline what I did, and hopefully, someone can help? 

1.  installed sane-backends using:
     ipkg install sane-backends

2.  edited saned.conf
     nano /opt/etc/sane.d/saned.conf

then set the following values in saned.conf
     data_portrange = 10000 - 10100
     192.168.1.0
     192.168.1.1/255

3.  edited fun_plug.init
     nano /ffp/etc/fun_plug.init

then inserted the following at the end of the fun_plug script:
     echo "sane-port 6566/tcp # SANE network scanner daemon" >> /etc/services
     echo "usbfs           /proc/bus/usb   usbfs   defaults''',devmode=0666'''   0  0" >> /etc/fstab
     mount /proc/bus/usb -o remount,devmode=0666

4.  enabled script inetd.sh
     chmod a+x /ffp/start/inetd.sh

5.  created inetd.conf file
     nano /ffp/etc/inetd.conf

then inserted the following line:
     sane-port  stream  tcp  nowait  root.root  /opt/sbin/saned saned

6.  Then I turned on my AIO Canon MP500, and I rebooted the DNS 323.  I tried to use my Dell laptop, running Kubuntu 9.10, and Xsane 0.996 to detect the AIO Canon MP500, but it doesn't detect the printer!

What did I do wrong, or should I fix?  Any help is much appreciated, and thanks in advance!

Offline

 

#20 2011-01-17 04:46:15

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: Using my usb scanner as a network scanner

Hi there,

Lately, I have bought a samsung SCX-3205 printer/scanner (plugged via USB to the DNS-323) and I would like to make the scan part working via the network if possible, printing function is fine)
I just want to press the button "scan" on the hardware and find my scanned filed into my DNS-323.

have somebody managed to do it and could you please help me on this ?
I am reading the interesting article of Karl H. Beckers (see link below) and somebody is having the same request than me in the discussion 

http://charly4711.wordpress.com/2008/04 … ver-part-3

Does shareport allow you to use the scanner functionality without tweaking as mentionned in the link above ?

thanks !

Offline

 

#21 2011-03-16 02:40:57

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: Using my usb scanner as a network scanner

any chance someone has made some progress with scanners ?

Offline

 

#22 2011-03-16 14:48:39

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: Using my usb scanner as a network scanner

bodbod wrote:

Hi there,
Does shareport allow you to use the scanner functionality without tweaking as mentionned in the link above ?

Shareport should allow this functionality - unfortunately, I'm not in a position to test, my scanner is part of an HP all-in-one, which is shared using a Netgear print server (and yes, it does allow scanning over the network).

Offline

 

#23 2011-03-24 00:18:25

99benns
New member
Registered: 2011-03-24
Posts: 1

Re: Using my usb scanner as a network scanner

Hi there,

Thanks for the setup instructions, I've nearly got it running but it seems we've got one final error. It's found the scanner will go through the scanning process, but will not return the image. Instead I get the error "Error during read: Error during device I/O" from xsane.exe, and "FAIL Error: Error during device I/O" from running scanimage -T via telnet with Putty.

Here's my specs:

Printer: Canon MP610
NAS: DNS-323
OS: Windows 7

If it's relevant I had to install the package libieee1284 to get the saned daemon running.

Thanks.

Offline

 

#24 2011-03-24 01:43:58

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: Using my usb scanner as a network scanner

Hi guys, thanks for the feedback, I tried with a PC under winXP without success but now I am on Imac and the shareport utility is working perfectly for the scanner.
You need to select the bi-directionnal function to make the scanner working and I do not recall I had it selected when I was on a windows environment (did not see the option in fact)
I will try it later with parallel desktop and winxp again.

stay tuned
G

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB