# CanoScan N650U setup

## pheelay

Just wondering if there's anyone here who has managed to get this scanner working nicely on Gentoo.  So far, I can't get it to work with Sane (backends 1.0.8 or 1.0.9).  I've managed to get an image out of a command line utility i found at:

http://homepage.ntlworld.com/millwardjp/

However, only with version 1.2 (and not the never version 2).  My guess is probably something to do with usblib which did sucessfully emerge   :Sad: 

With version 1.2 the colours are dodgy and the scanner head goes beyond its limits  :Shocked: 

I just like to hear someone elses experience with this scanner if theres anyone!   :Confused: 

Cheers!

Phil

----------

## pheelay

hmmm, just giving this thread another go!  Is there anyone out there who has a CanoScan N650U?

cheers

pheelay

----------

## AlterEgo

Have a look at this page. It seems your scanner is perfectly supported.

As a frontend-replacement for sane, check out this piece of software. It's not free, but it should support your scanner, if it's detected by scanimage -L.

----------

## crimson

I've got the Canoscan n670u.  I didn't think it OR the n650u was supported in linux but hopefully I"m wrong!

----------

## pheelay

I tried Vuescan.  That worked straight off with practically no configuration!  :Smile:   But its 40 quid before u can use it properly.  I haven't had any luck with the other way yet.  

If me know how u get on!

phil

----------

## jarealist

I have a CanoScan N656U (which I think is close to your 650) and have just recently got it working with sane-backends 1.0.9 (compiled with the Plustek USB backend mentioned below); XSane 0.89 (from portage) and sane-frontend 1.0.9 (from portage)

The following partial instructions I think I pulled out from the plustek tar ball.

Plustek-USB.txt (2003-01-11) Gerhard Jäger <gerhard@gjaeger.de>

================================================================

How to use and configure the Plustek USB backend

------------------------------------------------

Please note, that the following is only needed, if you need to upgrade

a SANE version...

Preparations

------------

What do we need ?

a SANE backends archive (i.e. sane-backends-1.0.9.tar.gz)

a driver archive (i.e. plustek-sane-0.45-1.tar.gz)

The latest SANE archive can be obtained at:

http://www.mostang.com/sane

and the latest backend at:

http://www.gjaeger.de/scanner/plustek.html

Assumptions

-----------

Our starting point is your home-directory:

:~>

The packages (here sane-backends-1.0.9.tar.gz und plustek-sane-0.45-1.tar.gz)

are in the /tmp directory.

Let's go:

---------

Change to your home directory and create a sane directory

cd ~

mkdir sane

unpack your sane tar-ball (here "sane-backends-1.0.9.tar.gz")

to this "sane" directory

cd sane

tar xvzf /tmp/sane-backends-1.0.9.tar.gz

Now unpack your plustek-sane tarball (here "plustek-sane-0.45-1.tar.gz")

to the backends directory:

cd sane-backends-1.0.9

tar xvzf /tmp/plustek-sane-0.45-1.tar.gz

Now do the ./configure step...

Especially for SuSE with a preinstalled SANE-RPM:

./configure --prefix=/usr --sysconfdir=/etc

Then do the make step and after that as root user perform the make install

step.

That's all!

Before using, make sure that the USB scanner device driver is loaded:

modprobe scanner

or

modprobe scanner vendor=0x7b3 product=0x17

You might need to add the following line to /etc/modules.conf, if the scanner is not

supported directly - vendor and product must match your device!

options scanner vendor=0x7b3 product=0x17

If you're not sure about the vendor and product id of your device, simply load

the USB subsystem and plug in your scanner. Then do a

cat /proc/bus/usb/devices

and look for the scanner

Now you have to configure the backend. Edit the file /etc/sane.d/plustek.conf

and fill in the appropriate vendor and product id (see there for examples)

This is it...

The following information from the sane site is helpful:

Manufacturer + Vendor ID: Canon - 0x04A9

Scanner: CanoScan N650U/N656U

Product ID: 0x2206

Status: working

ASIC: LM9832

Make sure to compile drive "scanner.o" into your kernel and add "scanner"  to /etc/modules.autoload

If I can be of further help, let me know.  I should be able to help you get it started.  I haven't played around with it much yet, but it scanned a photo okay for me.  I'm running the latest vanilla-sources kernel.

----------

## pheelay

hmmm.

I tried using Sane backends but the scanner head went outside its limits (making not healthy sounding noises!) and the picture was blank!  Our scanners should be similar enough (urs is just a newer model afaik).

Does building the tarball manually rather than using portage make a differenr? it doesn't seem like you gave it any special options. :-/

thanks a mil for the help!

phil

----------

## jarealist

You have to build sane-backends with the plustek driver.  The scanner won't work properly without it, and It's not included in the sane-backends 1.0.9 tar ball (i.e. the portage distribution). 

Sugget you download the plustek-sane-0.45-1.tar.gz and extract the readme/install instructions.  I didn't give all of them above. But your right, I didn't have to pass it any special options to get it working.  Once the two tars are extracted as shown above (the plustek gets extracted into the sane-backends package prior to ./configure) then things should go ok.

At first, I also assumed that sane-backends included everything listed on their site.  However, what Sane provides is the 'base" package only.  If they have identified a separate driver in the compatibility list for your particular scanner, then you have to build that support in.

All this could probably get handled in portage, where the the most popluar scanner drivers could get patched/built in during the sane-backends install sequence.  Not trying to suggest additional work, but if someone took a pole of the most popular scanners, the ones not presently covered in the base sane-backends could be added.

----------

## crimson

 *Quote:*   

> If you're not sure about the vendor and product id of your device, simply load the USB subsystem and plug in your scanner. Then do a cat /proc/bus/usb/devices and look for the scanner.

 

How do I load the USB subsystem?  I have a [edit] UHCI ! EHCI[/edit] driver built into the kernel.  I don't have a /proc/bus/usb directory though.

I use an asus a7v266-e motherboard with via chipsets, and I built in the UHCI driver that said most VIA m/b's used.

Currently the only hardware I don't have working in Linux is my scanner.  So I'm narrowing it down one by one  :Wink: Last edited by crimson on Wed Feb 05, 2003 3:20 am; edited 1 time in total

----------

## jarealist

Crimson.

Just a guess, but the "Help" section in make menuconfig states EHCI currently only supports NEC chipsets.  I'm using the latest vanilla-sources kernel and the usb-uhci driver. The usb-uhci driver supports both intel (what my MB has) and VIA chipsets.  You might also look at what else you have built into the kernel.  Here is a list of the modules (M) that I have built into my kernel configuration.

  /etc/modules.autoload -->

  8139too

  mii

  input

  hid

  mousedev

  joydev

  keybdev

  videodev

  usbcore

  usb-uhci

  ide-scsi

  ide-cd

  dummy

  sr_mod

  sd_mod

  scsi_mod

  sg

  loop

  lp

  scanner

----------

## crimson

oops, that was a stupid mistake.  I meant to say I had UHCI enabled.  In particular I have CONFIG_USB_UHCI_ALT compiled into the kernel.  

OK, no wonder I don't have a /proc/bus/usb because I didn't have CONFIG_USB_DEVICEFS enabled in the kernel.  I'll try to enable it and recompile and see what happens.

Seems like I recompile my kernel atleast twice a week  :Wink: .  But I've sure come a long way from where I started.

----------

## crimson

Amazing  :Smile: .  I got it to work.  And it works well.  By following the instructions in this well written text file http://www.gjaeger.de/scanner/usb/Plustek-USB.txt installation was difficult, but not terrible  :Smile: .  Now for the first time EVER in Linux, I've got every single piece of hardware working  :Smile: .  Wait.. what about that joystick that I never use  :Wink: 

God I love Gentoo.

----------

## plate

 *jarealist wrote:*   

> All this could probably get handled in portage, where the the most popluar scanner drivers could get patched/built in during the sane-backends install sequence. 

 You haven't filed a bug report about this, I presume. Can you think of a way to temporarily integrate this into the existing sane-backend ebuild?

----------

## plate

By the way, it took me only a few minutes to follow the MO discussed further up this thread. I had to unmerge/remerge the Gimp plugin (xsane), but I'm mighty pleased to announce that my CanoScan N656U is now fully operational in Linux, too! Let me grab something colourful, the kids always have something lying around, lemme see...

[img:811f57a987]http://www2.gol.com/users/plate/supermario3.jpg[/img:811f57a987]

Now where did I put the Gimp manual?   :Cool: 

----------

## crimson

 :Smile:   Congratulations, and welcome to the club!  I can't get gimp to print the pictures out nicely with cups and my HP Deskjet 712c, but this is a different matter altogether.

----------

## pheelay

I got my N650U going in the end as well   :Very Happy: 

 *plate wrote:*   

>  *jarealist wrote:*   All this could probably get handled in portage, where the the most popluar scanner drivers could get patched/built in during the sane-backends install sequence.  You haven't filed a bug report about this, I presume. Can you think of a way to temporarily integrate this into the existing sane-backend ebuild?

 

Getting the scanner to work meant untarring the plustek driver into the directory containing the sane source before compiling sane.  Then compiling the driver and then setting sane up to the relevant scanner.  Unfortunatly I haven't been using Gentoo long enough to make my own ebuilds  :Shocked: 

I would gladly help out/support anyone willing to do one tho.

 *crimson wrote:*   

> God I love Gentoo.

 Dito!  And since I discovered tabs in fluxbox, I just don't get on well with windows anymore   :Twisted Evil: 

phil

----------

## crimson

Again I have the canoscan n67ou.  Has anyone with a similar scanner (plustek drivers) tried out the alternate drivers available here http://www.gjaeger.de/scanner/plustek.html?  It seems that they have additional drivers in the Testing Section for Canon's to help with color quality and "coarse calibration" whatever exactly that is.  I might try these out and see how they affect quality.

----------

## crimson

As a sidenote, that VueScan program is excellent!  The only catch is that it's not free.  Its way easy to set up too, you don't need sane, plustek drivers, or anything besides the scanner.o module.  For my canoscan n670u it produces superior, excellent scans.  I might use sane again in the future if it improves for me but for now, I'm very happy with VueScan.

----------

## castra

Well I did all of that and scanner works now but images as so BAD...

I'll post a picture at the end..

I compiled sane my self and added plustek driver as explained in howto.

Can someone explain how to fix that ? 

And also how to scan from GIMP ( if possible )!

Thanks

[img:b776085a0b]http://beglerovic.no-ip.com/linx1.jpg[/img:b776085a0b]

----------

## plate

 *castra wrote:*   

> And also how to scan from GIMP ( if possible )!

 

But of course it's possible. Good place for toggling your Sane settings to make your image quality more pleasing to the eye.

```
emerge xsane
```

is what you need to do.

----------

## crimson

I'd like to mention that I don't think it works with gimp-1.3, so you probably need the older version.  Also, I highly recommend VueScan, you can get much higher quality scans with it, however as I've said it isn't free  :Sad: .

----------

## plate

Huh? Where did you hear that?  :Shocked:  Granted, I haven't tried it yet with the development GIMP, but I can't find any evidence that the Xsane plugin doesn't compile against 1.3, neither on the Sane nor the GIMP mailing lists. I'll check it out tomorrow and promise to report back. Anyway, GIMP 1.2.5 is still in slot 1 in portage (and consequently what people unwittingly install if they just "emerge gimp"). And works nicely.  :Smile: 

----------

## crimson

 *Quote:*   

> Huh? Where did you hear that? Granted, I haven't tried it yet with the development GIMP, but I can't find any evidence that the Xsane plugin doesn't compile against 1.3, neither on the Sane nor the GIMP mailing lists.

 

I have tried it and it didn't work for me, when it did work in gimp 1.2.  Also this link discusses it somewhat: http://www.mail-archive.com/gimp-user@lists.xcf.berkeley.edu/msg02843.html

Also, you'll notice that in the src_install in the xsane-0.91.ebuild (the newest at this time) in portage the lines for installing it with gimp-1.3 are commented out:

```

src_install() {

    einstall || die

    dodoc xsane.[A-Z]*

    dohtml -r doc

    # link xsane so it is seen as a plugin in gimp                              

    if [ -d /usr/lib/gimp/1.2 ]; then

        dodir /usr/lib/gimp/1.2/plug-ins

        dosym /usr/bin/xsane /usr/lib/gimp/1.2/plug-ins

    fi

#   if [ -d /usr/lib/gimp/1.3 ]; then                                           

#       dodir /usr/lib/gimp/1.3/plug-ins                                        

#       dosym /usr/bin/xsane /usr/lib/gimp/1.3/plug-ins                         

#   fi                                                                          

}

```

I hope you can get it working with gimp 1.3, but the plugins so far that I have tried don't work yet with the Gimp's new version (gimp-print and xsane being the only 2 I have tried)  

If you do get it to work well in gimp 1.3, let us know!

----------

## castra

I installed xsane and it works great now !

A small tip for those of you who installed sane from tarball ( aren't we all )

Had some trouble to add just xsane becouse emerge -pv xsane gave me

sane-backend and libs ( which I installed manualy )....

To fix that I did emerge inject sane-backend and libs and like magic

installed just xsane which btw works now with GIPM..

Thanks for help !

----------

## castra

 *castra wrote:*   

> I installed xsane and it works great now !
> 
> A small tip for those of you who installed sane from tarball ( aren't we all )
> 
> Had some trouble to add just xsane becouse emerge -pv xsane gave me
> ...

 

I was too fast on commenting my sucess ....only my first scan was OK the 

others are too bright ( spec. white areas ) ...Can that be fixed? Tryed with

Gama but couldn't improve picture scan. 

Using sane-backends-1.0.12 and plustek-sane-0.45-7. Tryed with test versions of plustek but they failed to find scanner ( don't know why ).

----------

## d3c3it

Ive got a Canon N670u now xscan has detected and it scans fine its just it seems to be only scanning half my image which is really annoying anyone any ideas?

EDIT Nevermind im just dumb  :Smile: 

----------

## kraij

Hi,

I assume that needed modules for usb are compiled with the kernel.... & thats how I got my scanner working:

1.) I emerged xsane & the needed dependencies (sane-backend + libusb 'n stuff)

```
shell~ # emerge -v xsane
```

2.) Now the N67OU was ready to work at least under root ... check if scanner is detected with:

```

shell~ # scanimage -L

device `plustek:libusb:002:003' is a Canon N670U/N676U/LiDE20 USB flatbed scanner

shell~ #

```

I guess some of you will see their scanner only detected if they are superuser(root) what means they cannot use that device as normal user (e.g. cannot import in Gimp from sane-device)

3.) ok shouldn't be a big problem, lets take a look in the plustek backend-configurationfile:

```

shell~ # vim /etc/sane.d/plustek.conf

# Plustek-SANE Backend configuration file

# For use with LM9831/2/3 based USB scanners

#

# 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

.

.

.

# and of course the device-name

#

# device /dev/usbscanner

device auto

```

well, important for me was that with "device auto" my system was able to detect the scanner, so we let it as we see here.

4.) To guarantee to have xsane/scanner working as normal user I did a:

```

shell~ # chmod a+rw /proc/bus/usb/002/003

```

If you ve read carefully that post u' ll recognize this:

 *Quote:*   

> 
> 
> # device /dev/usbscanner
> 
> # or
> ...

 

&

```

shell~ # scanimage -L

device `plustek:libusb:002:003' is a Canon N670U/N676U/LiDE20 USB flatbed scanner

shell~ #

```

you ve seen the libusb:002:003 ok go on  :Smile: 

After doin this step by step I got a 100% functionally USB-CanScan N67OU. 

GL  kraij

----------

