LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Problems with a USB scanner (https://www.linuxquestions.org/questions/linux-hardware-18/problems-with-a-usb-scanner-61633/)

Mirrorball 05-24-2003 07:54 PM

Problems with a USB scanner
 
Greetings,

I have a Genius ColorPage-HR6 but I can't get it to work with sane. According to http://www.genius-europe.com/service/faq/tuxscan.htm it should work with plustek driver.

Code:

root@deedee mirrorball # lsmod
Module                  Size  Used by    Not tainted
scanner                10556  0
uhci                  27280  0  (unused)
usbcore                66016  1  [scanner uhci]
orinoco_cs              4628  1
orinoco                37356  0  [orinoco_cs]
hermes                  6084  0  [orinoco_cs orinoco]
ds                      6952  2  [orinoco_cs]
i82365                37568  2
pcmcia_core            45600  0  [orinoco_cs ds i82365]
nls_iso8859-1          2844  1  (autoclean)
nls_cp437              4348  1  (autoclean)
ide-cd                30696  0
ide-scsi                8944  0

Code:

root@deedee mirrorball # sane-find-scanner

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

found USB scanner (vendor=0x0458, product=0x2004) at /dev/usb/scanner0
  # Your USB scanner was detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't be
  # detected by this program.

Code:

root@deedee mirrorball # 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).

Code:

root@deedee mirrorball # cat /etc/sane.d/plustek.conf
# Plustek-SANE Backend configuration file
# For use with Plustek parallel-port scanners and
# LM9831/2/3 based USB scanners
#
# For parport devices use the parport section
#
[parport]
device /dev/pt_drv

#
# leave the default values as specified in /etc/modules.conf
#
option warmup    -1
option lOffOnEnd -1
option lampOff  -1


#
# The USB section:
# each device needs at least two lines:
# - [usb] vendor-ID and product-ID
# - device devicename
# i.e. for Plustek (0x07B3) UT12/16/24 (0x0017)
# [usb] 0x07B3 0x0017
# device /dev/usbscanner
# or
# device libusb:bbb:ddd
# where bbb is the busnumber and ddd the device number
# make sure that your user has access to /proc/bus/usb/bbb/ddd
#
# additionally you can specify some options
# warmup, lOffOnEnd, lampOff
#
# For autodetection use
# [usb]
# device /dev/usbscanner
#
# or simply
# [usb]
#
# or if you want a specific device but you have no idea about
# the device node or you use libusb, simply set vendor- and product-ID
# [usb] 0x07B3 0x0017
# device auto
#
# NOTE: autodetection is safe, as it uses the info it got
#      from the USB subsystem. If you're not using the
#      autodetection, you MUST have attached that device
#      at your USB-port, that you have specified...
#

[usb] 0x458 0x2004

#
# options for the previous USB entry
#
# switch lamp off after xxx secs, 0 disables the feature
option lampOff 300

# warmup period in seconds, 0 means no warmup
option warmup 15

# 0 means leave lamp-status untouched, not 0 means switch off
# on sane_close
option lOffOnEnd 1

#
# options to tweak the image start-position
# (WARNING: there's no internal range check!!!)
#
# for the normal scan area
#
option posOffX 0
option posOffY 0

# for transparencies
option tpaOffX 0
option tpaOffY 0

# for negatives
option negOffX 0
option negOffY 0

#
# for setting the calibration strip position
# (WARNING: there's no internal range check!!!)
# -1 means use built in
#
option posShadingY -1
option tpaShadingY -1
option negShadingY -1

#
# to invert the negatives, 0 disables the feature
#
option invertNegatives 0

# for skipping whole calibration step
option skipCalibration 0

# for skipping entire fine calibration step
# coarse calibration is done
option skipFine 0

# discard the result of the fine white calibration
option skipFineWhite 0

# for replacing the gain values found during
# calibration
option red_gain  -1
option green_gain -1
option blue_gain  -1

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

#
# to enable TPA (non Plustek devices only)
# 0 means default behaviour as specified in the internal tables
# 1 means enable
#
option enableTPA 0

#
# and of course the device-name
#
# device /dev/usbscanner
device /dev/usb/scanner0

#
# to define a new device, start with a new section:
# [usb] or [parport]
#

Does anyone know what's wrong? Maybe my scanner isn't really supported by sane.
I'm running Gentoo Linux.

Aussie 05-24-2003 08:33 PM

You need to comment out the parport section (put a # at the start of each line like in the usb section) of your plustek.conf, and complete the usb section according to the instructions in it.

Mirrorball 05-24-2003 08:53 PM

It still doesn't work. I changed plustek.conf, please tell me if I did it right.
Code:

root@deedee mirrorball # cat /etc/sane.d/plustek.conf
# Plustek-SANE Backend configuration file
# For use with Plustek parallel-port scanners and
# LM9831/2/3 based USB scanners
#
# For parport devices use the parport section
#
#[parport]
#device /dev/pt_drv

#
# leave the default values as specified in /etc/modules.conf
#
#option warmup    -1
#option lOffOnEnd -1
#option lampOff  -1


#
# The USB section:
# each device needs at least two lines:
# - [usb] vendor-ID and product-ID
# - device devicename
# i.e. for Plustek (0x07B3) UT12/16/24 (0x0017)
# [usb] 0x07B3 0x0017
# device /dev/usbscanner
# or
# device libusb:bbb:ddd
# where bbb is the busnumber and ddd the device number
# make sure that your user has access to /proc/bus/usb/bbb/ddd
#
# additionally you can specify some options
# warmup, lOffOnEnd, lampOff
#
# For autodetection use
# [usb]
# device /dev/usbscanner
#
# or simply
# [usb]
#
# or if you want a specific device but you have no idea about
# the device node or you use libusb, simply set vendor- and product-ID
# [usb] 0x07B3 0x0017
# device auto
#
# NOTE: autodetection is safe, as it uses the info it got
#      from the USB subsystem. If you're not using the
#      autodetection, you MUST have attached that device
#      at your USB-port, that you have specified...
#

[usb] 0x458 0x2004

#
# options for the previous USB entry
#
# switch lamp off after xxx secs, 0 disables the feature
option lampOff 300

# warmup period in seconds, 0 means no warmup
option warmup 15

# 0 means leave lamp-status untouched, not 0 means switch off
# on sane_close
option lOffOnEnd 1

#
# options to tweak the image start-position
# (WARNING: there's no internal range check!!!)
#
# for the normal scan area
#
option posOffX 0
option posOffY 0

# for transparencies
option tpaOffX 0
option tpaOffY 0

# for negatives
option negOffX 0
option negOffY 0

#
# for setting the calibration strip position
# (WARNING: there's no internal range check!!!)
# -1 means use built in
#
option posShadingY -1
option tpaShadingY -1
option negShadingY -1

#
# to invert the negatives, 0 disables the feature
#
option invertNegatives 0

# for skipping whole calibration step
option skipCalibration 0

# for skipping entire fine calibration step
# coarse calibration is done
option skipFine 0

# discard the result of the fine white calibration
option skipFineWhite 0

# for replacing the gain values found during
# calibration
option red_gain  -1
option green_gain -1
option blue_gain  -1

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

#
# to enable TPA (non Plustek devices only)
# 0 means default behaviour as specified in the internal tables
# 1 means enable
#
option enableTPA 0

#
# and of course the device-name
#
# device /dev/usbscanner
device /dev/usb/scanner0

#
# to define a new device, start with a new section:
# [usb] or [parport]
#


Aussie 05-24-2003 09:02 PM

Try /dev/usbscanner.

Mirrorball 05-24-2003 09:11 PM

Nope. :(

Aussie 05-24-2003 09:42 PM

Ok, now we need to ckeck that you have the correct kernel modules loaded. Have a look at the linux USB-Guide for instructions and check them against your set up.

Mirrorball 05-24-2003 10:04 PM

I have all the required modules loaded: usbcore, uhci and scanner. There's a /dev/usb/scanner0 and usbview shows the following info about my scanner.
Code:

ColorPage-Vivid 3150
Manufacturer: KYE Systems Corp.
Speed: 12Mb/s (full)
USB Version:  1.00
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 8
Number of Configurations: 1
Vendor Id: 0458
Product Id: 2004
Revision Number:  0.00

Config Number: 1
        Number of Interfaces: 1
        Attributes: 40
        MaxPower Needed:  48mA

        Interface Number: 0
                Name: usbscanner
                Alternate Number: 0
                Class: 10(unk. )
                Sub Class: 1
                Protocol: 0
                Number of Endpoints: 2

                        Endpoint Address: 81
                        Direction: in
                        Attribute: 2
                        Type: Bulk
                        Max Packet Size: 64
                        Interval: 0ms

                        Endpoint Address: 02
                        Direction: out
                        Attribute: 2
                        Type: Bulk
                        Max Packet Size: 64
                        Interval: 0ms


Aussie 05-24-2003 10:28 PM

Right, now check the permissions and ownership on /dev/usb/scanner0.
I use /dev/usbscanner and these are mine,
Code:

bern@aptiva:~$ ls -l /dev/usbscanner
lrwxrwxrwx  1 root  saned    16 Dec 29 11:38 /dev/usbscanner -> /dev/usbscanner0

I run my scanner from my network server with saned - any other computers on the network have access to it.
Another potential fix could be with the uhci module - there are two modules for the uhci type of usb controller - uhci and usb-uhci, the "lsmod" command will show you what one is loaded now, try the other and see if that helps.

Mirrorball 05-25-2003 09:42 PM

OK, the permissions:
Code:

root@deedee mirrorball # ls -ls /dev/usb/scanner0
0 crw-rw-rw-    1 mirrorball root    180,  48 1969-12-31 21:00 dev/usb/scanner0

And the modules (uhci is on the list):
Code:

root@deedee mirrorball # lsmod
Module                  Size  Used by    Not tainted
scanner                10556  0
uhci                  27280  0  (unused)
usbcore                66016  1  [scanner uhci]
orinoco_cs              4628  1
orinoco                37356  0  [orinoco_cs]
hermes                  6084  0  [orinoco_cs orinoco]
ds                      6952  2  [orinoco_cs]
i82365                37568  2
pcmcia_core            45600  0  [orinoco_cs ds i82365]
nls_iso8859-1          2844  1  (autoclean)
nls_cp437              4348  1  (autoclean)
ide-cd                30696  0
ide-scsi                8944  0

I've tried to load usb-uhci once but it didn't work. uhci seems to be the right module.

Mirrorball 05-27-2003 06:47 PM

Er... Bump. :( Just in case some scanner expert missed this topic.

Aussie 05-27-2003 08:37 PM

I'm out of ideas, maybe you can try an email to the plustek developers.

Mirrorball 05-28-2003 10:53 PM

OK, thank you Aussie. I'm going to contact the plustek developers. I hope I can get this scanner to work on Linux but I don't think it's really supported by sane despite what's written on the Genius website.

valerie_tux 05-16-2004 10:05 AM

I FINALLY GOT IT! I dont believe it took so long considering I cant be called a :newbie: anymore. Its about the permissions of the file /proc/bus/usb/001/002 or whatever is your scanners device id. If a normal user needs to access the scanner then this file should be writable to that user.
Just chmod the file to 666 and it should work.
With libusb around its useless to change the permissons of /dev/scanner or /dev/usbscanner cos they are not being used anymore.

Hope that helps

comawhite 11-16-2004 08:03 PM

damn excellent! I had the same problem but you'r trick did it! Superthx!!!

valerie_tux 11-17-2004 12:21 PM

thanks... glad to be of use.. :)


All times are GMT -5. The time now is 11:34 AM.