LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-23-2013, 06:49 PM   #31
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled

Forget /dev/video* - it is not relevant.

Just to be clear: Epson "Image Scan" (iscan) includes a few parts. There is a front-end program which provides a 'simplified' scanning interface. There is a Sane backend, which lets scanimage and xsane talk to the Epson scanner. There is a Gimp plugin that lets you initiate scans from Gimp.

If iscan is installed properly, you should be able to to use iscan, scanimage, xsane, and Gimp for scanning - whatever you want. (Personally, I mostly use Gimp with xsane as a plugin, but also scanimage from scripts.)

If you can scan with iscan, but scanimage -L and xsane can't find the scanner, then it sounds like the backend which comes with isane wasn't properly installed and configured for sane.

I haven't actually tried iscan (my Epson scanner works fine with just Sane, although it is also supported by iscan), but maybe I'll give it a try.
 
1 members found this post helpful.
Old 08-27-2013, 09:15 PM   #32
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
Are you still having trouble using Epson Image Scan (iscan) with your scanner, and want to get it to work?

Although my Epson scanner is supported by the 'epson2' backend included with SANE in Slackware, I went ahead and tried using iscan, just to see if it works and what I was missing. I built iscan from the source downloaded from Epson, and installed it. Turns out there are some missing steps (which I think the binary downloads like RPM are supposed to take care of). But I did get it all working. I was able to scan with iscan as well as with xsane using the epkowa (iscan) backend. I can start either iscan or xsane from Gimp as a plug-in, with the scanned file automatically loaded into Gimp.

In the end, I decided I like xsane better than iscan, and since my scanner works OK with the SANE-provided backend, I removed all of iscan and went back to using just what comes with Slackware. But if you want, I can write up what I did to get it to work.
 
1 members found this post helpful.
Old 08-27-2013, 11:52 PM   #33
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
Most definitely YES! I apologize for being slow in applying what I am learning but I have a couple of other irons in the fire that I am trying to resolve. Will be looking into this tomorrow Wed as I am skipping practice to grind on these.
U are too kind and would greatly appreciate such documentation which could minimize my efforts. Here is good to inform others too.

ADDED:
I just found "Image Scan! for Linux" pdf and followed it thru putting the symlink for iscan into .gimp-2.6/plug-ins. Then ran "iscan" that still comes back with: "Could not send command to scanner"
"Check the Scanner's status"
I then tried using GIMP with File > Create. I did not get "Scanning (Iscan)" as explained in the .pdf above. What I got was:
Screenshot
Xscan: Device dialog...
Xscan: v4l;'dev'video0
Xscan: v4l;'dev'video1
Not sure if this helps but scanner still sits silent.

I found some info regarding:
/etc/sane.d/epson2.conf in which it suggests entering: usb <manftr-ID> <devide-ID> I did that and had no effect that I could find.
I did try to run "xsane" at the command line and it only finds video0 assigned to my webcam and
video1 assigned to my BTTV device, so no help there

Last edited by waddles; 08-28-2013 at 05:12 PM.
 
Old 08-28-2013, 07:43 PM   #34
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
Since it looks like you got pretty far already, let's try starting from there, rather than going back to build and install. I assume you did both iscan and iscan-data installs.

Did you do the udev rules setup for the scanner? To check, you can do this:
Code:
$ lsusb
Identify the Bus number (BBB) and Device number (DDD) of your scanner from the list. The ID number should start with 04b8 (the Vendor ID for Epson/Seiko). Then type:
Code:
$ ls -l /dev/bus/usb/BBB/DDD
Where BBB=bus number and DDD=device number from the above lsusb. The device file should exist, have group lp (or scanner, if that's what your SANE uses), and mode crw-rw----. You have to get this working before anything else will work. If it isn't working, I have more steps...

Now to your error message. While working through the steps, I also got that "Could not send command to scanner. Check the scanner's status" popup. Unfortunately, I think it is a general message, not specific, but here is what I had to do. The SANE setup for the scanner had to be complete.

1. Edit /etc/sane.d/dll.conf and add the word "epkowa" (without quotes) alone on a line. If you only have this one scanner, you can remove all the other lines from the file, and the programs will start up a faster (because they don't have to probe the other backends).

2. You need a file /etc/sane.d/epkowa.conf - you can copy it out of the iscan source distribution (it doesn't get installed by "make install"). Or, I think you can just create this file from scratch with the word "usb" it it like this:
Quote:
# echo usb > /etc/sane.d/epkowa.conf
3. You need links to the Epkowa backend library from the Sane directory.
Code:
$ ls -l /usr/lib/sane/libsane-epkowa*
If there are no matching files, you need to copy or link the libsane-epkowa* files and links from where-ever you installed them into the libsane directory.

After that, iscan worked for me, as well as xsane using the epkowa backend.
 
1 members found this post helpful.
Old 08-29-2013, 01:49 AM   #35
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
When I examined /dev/bus/usb I found directories 001,002, 993, and 004. Since the printer scanner is on bus 002 I examined that directory and found 2 character files: 001 & 002. In UR explanation for BBB & DDD U called them bus no. and device id.
Should that be instead the manufacturers no and device id or in my case 04b8:0896? I tried ls -l /dev/bus/usb/04b8/0896, ls-l /dev/bus/usb/002/0896 and ls -l /dev/bus/usb/002/04b8 and received: No such file or director each time. Me cunfused!
So guess I need UR more steps.

For UR step 1)
I added epkowa to preceed the "epson" word (line) in /etc/sane.d/dll.conf.
I see that this file is to allow access through the network. Be aware this is a usb connected printer not available to others on any network (per CUPS).

For UR step 2)
Accepted UR suggestion and used: echo usb > /etc/sane.d/epkowa.conf
NOTE: I also modified epson2.conf per Epson's instructions see previous reply #33.

For UR step 3)
Have to ask, which libsane directory to which libsane directory?
I have the following:
/usr/local/lib/sane/libsane-epkowa*
/usr/lib/libsane*
/usr/lib/sane/libsane*
/usr/lib/libsane*

I found lines relating to policies and rules:
/usr/share/hal/fdi/policy/10osvendor/10-libsane.fdi
/lib/udev/rules.d/80-libsane.rules
Will I need to establish policies too?

Last edited by waddles; 08-29-2013 at 01:58 AM.
 
Old 08-29-2013, 08:34 PM   #36
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
I forgot you had a multifunction printer+scanner, but it still should be right. You need to use lsusb to get the bus and device number for your XP-200. (These numbers can change as you reboot or disconnect devices.) Then check that the device file for that (/dev/bus/usb/BBB/DDD) exists, has the group "lp", and has read/write permissions for the group. I don't see you doing lsusb above.

I know it's USB connected. No, /etc/sane.d/conf.dll is not only for network access. It tells SANE what drivers to try. You must put epkowa in there. SANE will then also read epkowa.conf in the same directory, which tells it to use usb.

I didn't include paths because I didn't know where you installed iscan. You have the right idea, though. SANE looks for the libraries for driver "X" in /usr/lib/sane/libsane-X.so so you should link from that directory to the actual libraries installed by iscan. For your setup, I think this should do it:
Code:
# ln -s /usr/local/lib/sane/libsane-epkowa* /usr/lib/sane
I'm pretty sure you don't have to do anything with policies... I didn't when I tested mine. But if the device file permissions aren't being set, you will have to set up the udev rules file. (Yours might be OK, if it is detected as a printer... Thank Pat for fixing it in Slackware 14 so printers and scanners use the same group 'lp'...)
 
1 members found this post helpful.
Old 08-30-2013, 04:27 AM   #37
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
I got the bus & device via lsusb. !st question above shows mfgr#:dev-ID and above that is the bus 002. That is why I asked the question because I could not tell from UR #34 if U were saying that BBB was bus # or mfgr# and if DDD was just device id or mfgr#:dev-ID. Apologies for confusing the situation.
Were U saying for me that BBB=002 or 04b8 and DDD=04b8:0896 or 0896
I think I tried all those permutations of ls -l /dev/bus/usb/BBB/DDD and all responded: No such file or directory. U said U had some suggestions if that were the case?

No joke inside of my /etc/sane.d/dll.conf it said:
"# enable the next line if you want to allow access through the network:" .

From what UR saying apparently that fix is in 14.0 as my /etc/group shows:
scanner:x:<#>:root,my_user
lp:x:<#>:lp,root,my_user where <#> is the appropriate no.
Would this be OK? or do I need to put lp into scanner?

I always think of ln -s aaa bbb as creating a name or filenames in bbb to represent files/directories in aaa. If wrong please advise. For that reason wouldn't the files:
libsane-epkowa.a libsane-epkowa.so
libsane-epkowa.so.1.0.15
libsane-epkowa.la libsane-epkowa.so.1
in /usr/local/lib/sane be being linked into the directory /usr/lib/sane? If correct please let me know?
I am so particular it drives me nuts so hope U can bear with my queries also ln -s messed me up awhile back so am once bitten thrice shy.
 
Old 08-30-2013, 09:16 PM   #38
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
Quote:
Originally Posted by waddles View Post
I got the bus & device via lsusb. !st question above shows mfgr#:dev-ID and above that is the bus 002. That is why I asked the question because I could not tell from UR #34 if U were saying that BBB was bus # or mfgr# and if DDD was just device id or mfgr#:dev-ID. Apologies for confusing the situation.
Were U saying for me that BBB=002 or 04b8 and DDD=04b8:0896 or 0896
I think I tried all those permutations of ls -l /dev/bus/usb/BBB/DDD and all responded: No such file or directory. U said U had some suggestions if that were the case?
Just use bus number and device number. (Use mfgr# only to confirm you are looking at the correct device in the lsusb output). It bothers me that you don't have /dev/bus/usb/BBB/DDD at all. Even without a udev rule to set the permissions, the system should create this device file.

I just realized you said you are using Slackware 13.37. That has kernel 2.6.x, right? I'm using Slackware 14.0 with kernel 3.2.x, so I'm not sure how much of this applies exactly to that older version. But I did check my Slackware 13.37 and the /dev/bus/usb/ files are the same.

Quote:
No joke inside of my /etc/sane.d/dll.conf it said:
"# enable the next line if you want to allow access through the network:" .
Yes, it does indeed. The "next line" it is referring to should say "net". Meaning, uncomment the next line (which says 'net') to enable network access. (You don't get network access just by enabling that line, though - it takes more.)

Quote:
From what UR saying apparently that fix is in 14.0 as my /etc/group shows:
scanner:x:<#>:root,my_user
lp:x:<#>:lp,root,my_user where <#> is the appropriate no.
Would this be OK? or do I need to put lp into scanner?
Since you are in both lp and scanner groups, you should be covered. One way to tell if you have a permissions (group) problem is that "scanimage -L" works as root, but not as your account. But if scanimage -L fails under both root and your account, you haven't gotten to the permissions debugging stage yet.

There is one other thing: the udev rule that recognizes scanners does 2 things: sets group/permissions, and sets a property "libsane_matches=yes" for the device. I do not know for sure, but I suspect this is necessary for SANE to recognize the device. For SANE-supported scanners, the rules file 80-libsane.rules does this, but yours isn't in there. Epson's iscan doesn't come with a udev rules file, but has a command to generate it. (Yes, this is sounding awfully complicated...) I think that will be my next post here.

Quote:
I always think of ln -s aaa bbb as creating a name or filenames in bbb to represent files/directories in aaa. If wrong please advise. For that reason wouldn't the files:
libsane-epkowa.a libsane-epkowa.so
libsane-epkowa.so.1.0.15
libsane-epkowa.la libsane-epkowa.so.1
in /usr/local/lib/sane be being linked into the directory /usr/lib/sane? If correct please let me know?
I am so particular it drives me nuts so hope U can bear with my queries also ln -s messed me up awhile back so am once bitten thrice shy.
All correct. The command will make links where SANE looks: in /usr/lib/sane - to the place the iscan libraries were actually installed: /usr/local/lib/sane. Otherwise SANE can't find them.
 
1 members found this post helpful.
Old 08-31-2013, 02:11 AM   #39
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
I double checked with:
ls -l /dev/bus/usb/002/0896 and verified the No such file/dir
response.
In /dev/bus/usb/002 there is 1 file: 001 which is a character special file.

Sounds like the "Joke" is on me for being able to read only to the end of a line. TNX!

As root:
scanimage -L
device `v4l:/dev/video1' is a Noname BT878 video (Hauppauge (bt878)) virtual device
device `v4l:/dev/video0' is a Noname SN9C1xx PC Camera virtual device
As my_user:
scanimage -L
device `v4l:/dev/video1' is a Noname BT878 video (Hauppauge (bt878)) virtual device
device `v4l:/dev/video0' is a Noname SN9C1xx PC Camera virtual device

BTW the links are in as U suggested.

Where is the command to generate the udev rules file. Maybe I can begin to bootstrap myself.
 
Old 08-31-2013, 04:59 PM   #40
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
Quote:
Originally Posted by waddles View Post
I double checked with:
ls -l /dev/bus/usb/002/0896 and verified the No such file/dir
response.
In /dev/bus/usb/002 there is 1 file: 001 which is a character special file.
No. 0896 is the product ID. You need the device number. /dev/bus/usb/002/001 is probably the USB root hub for that 'bus'. How about posting the output of 'lsusb'? (You can delete any lines that you do not want to share.)

Quote:
Where is the command to generate the udev rules file. Maybe I can begin to bootstrap myself.
Here it is. I don't think it will help if the kernel isn't seeing the device and making a /dev/bus/usb special file for it, though.

Code:
$ /usr/local/lib/iscan-data/make-policy-file --mode=udev \
      --desc-file=/usr/local/share/iscan-data/epkowa.desc \
      --out-file=/tmp/80-iscan.rules
Examine the result udev rules file /tmp/80-iscan.rules, and if it looks OK copy it (as root) to the local rules directory. Then retrigger udev (or reboot) to get it to use the new rule:
Code:
# cp /tmp/80-iscan.rules /etc/udev/rules.d
# udevadm trigger
Check to see if your scanner is seen and permissions set:
Code:
$ lsusb
Identify the Bus number (BBB) and Device number (DDD) of your scanner from the list.
Code:
$ ls -l /dev/bus/usb/BBB/DDD
where BBB=bus number and DDD=device number from lsusb. The device file should exist, have group lp (or scanner, if that's what your SANE uses), and mode crw-rw----. Don't continue until this works.

Check the special device property for SANE:
Code:
$ /sbin/udevadm info --name /dev/bus/usb/BBB/DDD --query=all
where BBB=bus number and DDD=device number from lsusb. In the output, you should see this line:
Quote:
E: libsane_matched=yes
Which means the scanner device was properly found by the udev rule.

Now "scanimage -L" should work and show your scanner, when run by root or by any account in the group used above (one of lp or scanner).
 
1 members found this post helpful.
Old 08-31-2013, 07:13 PM   #41
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
I can't believe I can do that to myself!! I looked square at the lusub output and refused in my head to see "DEVICE" DAH!!
It is all too frequent an occurrence. Sorry for confusing things.
lsusb gives:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 002 Device 003: ID 04b8:0896 Seiko Epson Corp.

ls -l /dev/bus/usb/002/003 gives:
crw-rw-r-- 1 root lp 189, 130 Aug 31 16:37 /dev/bus/usb/002/003

/sbin/udevadm info --name /dev/bus/usb/002/003 --query=all
yields:
P: /devices/pci0000:00/0000:00:10.0/usb2/2-2
N: bus/usb/002/003
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2/2-2
E: MAJOR=189
E: MINOR=130
E: DEVNAME=/dev/bus/usb/002/003
E: DEVTYPE=usb_device
E: DRIVER=usb
E: DEVICE=/proc/bus/usb/002/003
E: PRODUCT=4b8/896/100
E: TYPE=0/0/0
E: BUSNUM=002
E: DEVNUM=003
E: SUBSYSTEM=usb
NO "E: libsane_matched=yes"

scanimage -L for both root and users:
device `v4l:/dev/video1' is a Noname BT878 video (Hauppauge (bt878)) virtual device
device `v4l:/dev/video0' is a Noname SN9C1xx PC Camera virtual device
device `epkowa:usb:002:003' is a Epson ME-301/XP-200 Series flatbed scanner

Are we home now?
I ran iscan on a color document filled out the info on it and scanned it. WALLA!! we have a print to .png file.
THANK YOU VERY MUCH U have been very patient with this blind idiot.
 
Old 08-31-2013, 08:34 PM   #42
ljb643
Member
 
Registered: Nov 2003
Posts: 269

Rep: Reputation: Disabled
Interesting... I guess the libsane_matched=yes is not needed for SANE, then? I thought it was - couldn't see any other reason why the udev rule would be setting it...

Very glad it works with iscan. You should also try xsane, just to see which you prefer. There should be no additional setup needed for xsane, once iscan works.
 
1 members found this post helpful.
Old 09-01-2013, 02:51 AM   #43
waddles
Member
 
Registered: Sep 2012
Posts: 373

Original Poster
Rep: Reputation: 0
I have checked to see if xsane and GIMP would bring up the scanner and both did xsane and iscan both produced viewable display of their efforts so am satisfied for the present that this is nearly solved. Perhaps U can explaing the following line which I get twice after running either iscan or xsane:
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkOptionMenu::indicator-spacing' of type `GtkBorder' from rc file value "0" of type `glong' ?

I am in the process of documenting the steps U have lead me thru for resolution as future reference.

ADDED:
On revisiting the /etc/sane.d/epson2.conf file it looks like I carried the "Device ID" error further. There is a line:
For libusb support for unknown scanners use the following command
# usb <product ID> <device ID>
I had used: usb 04b8 0896 so should this then be:
usb 0896 002 ? if lsusb is:
Bus 002 Device 002: ID 04b8:0896 Seiko Epson Corp.
Just as a sanity check after buggering it before.

Last edited by waddles; 09-01-2013 at 03:27 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help installing scanner in pclinuxos baronobeefdip Linux - Hardware 4 09-28-2009 07:31 PM
Installing scanner hellie Ubuntu 1 11-16-2006 09:16 AM
Installing a Scanner on Mandrake dolphans1 Mandriva 11 01-04-2005 02:25 PM
installing driver for scanner Mark_Grieveson Linux - Hardware 3 11-23-2002 10:12 PM
Installing a scanner in SuSE 8.1 Mark_Grieveson Linux - Newbie 1 11-22-2002 11:44 PM


All times are GMT -5. The time now is 02:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration