LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   I/O Error while scanning using Scanner LIDE 120 Canon ? (https://www.linuxquestions.org/questions/linux-hardware-18/i-o-error-while-scanning-using-scanner-lide-120-canon-4175607821/)

Xeratul 06-13-2017 12:05 AM

I/O Error while scanning using Scanner LIDE 120 Canon ?
 
Hello,

I have a scanner that gives I/O error with scanimage -d herethedevice > pic.ppm
scanimage sees it but no way. I/O error.

The machine is Scanner LIDE 120 Canon. My kernel 4.5.5.

Code:

Bus 001 Device 008: ID 04a9:190e Canon, Inc.
what to try?
best regards,

ferrari 06-13-2017 01:00 AM

Are you connected via USB 3 port perhaps? I've read of similar issues where XHCI needs to be disabled in the BIOS before the expected communication can take place. I don't know if this is still a problem though.

Xeratul 06-13-2017 02:06 PM

I tried usb 2.0 and usb 3.0. Not working, did not change :( dmesg

Quote:

[ 154.252581] systemd[1]: apt-daily.timer: Adding 35min 42.168307s random time.
[ 186.425142] usb 1-1: reset high-speed USB device number 2 using xhci_hcd
[ 203.101239] usb 1-1: reset high-speed USB device number 2 using xhci_hcd
[ 207.204645] usb 1-1: USB disconnect, device number 2
[ 210.132703] usb 1-5.2: new high-speed USB device number 8 using xhci_hcd
[ 210.236314] usb 1-5.2: New USB device found, idVendor=04a9, idProduct=190e
[ 210.248770] usb 1-5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 210.257086] usb 1-5.2: Product: CanoScan
[ 210.265274] usb 1-5.2: Manufacturer: Canon
[ 235.437771] usb 1-5.2: reset high-speed USB device number 8 using xhci_hcd


Code:

hci_uart              69632  0
btbcm                  16384  2 btusb,hci_uart
btqca                  16384  1 hci_uart
btintel                16384  2 btusb,hci_uart
bluetooth            421888  7 ath3k,btbcm,btqca,btrtl,btusb,hci_uart,btintel
ahci                  36864  0
libahci                28672  1 ahci
xhci_pci              16384  0
xhci_hcd              151552  1 xhci_pci
libata                184320  2 ahci,libahci
usbcore              180224  8 uas,ath3k,btusb,uvcvideo,rtsx_usb,usb_storage,xhci_hcd,xhci_pci
sdhci_acpi            16384  0
sdhci                  40960  1 sdhci_acpi
mmc_core              106496  3 sdhci,sdhci_acpi,rtsx_usb_sdmmc


ferrari 06-13-2017 03:13 PM

Quote:

I tried usb 2.0 and usb 3.0. Not working, did not change dmesg
Yes, but did you try explicitly enabling 'Legacy USB support' (or similar) in the BIOS/UEFI? Your dmesg output shows that an XHCI controller is active.

Xeratul 06-13-2017 11:48 PM

Quote:

Originally Posted by ferrari (Post 5722424)
Yes, but did you try explicitly enabling 'Legacy USB support' (or similar) in the BIOS/UEFI? Your dmesg output shows that an XHCI controller is active.

I do not follow... I am not experience much in that field. I hope you can help me.

What should be tried?

I have so far my legacy boot bios. there are also something to do into the bios??


the bios of the used acer aspire es 15 is so crap. There is just boot UEFI or Legacy as possibility, and nothing for USB changing or tweaking. Likely a very limitating bios for users.

Am I stuck with my new scanner? trash?

ferrari 06-14-2017 02:43 AM

It's not about the boot method, it was based on previous similar threads where the xhci driver wasn't dully compatible with some USB controller chipsets when communicating with USB 2 devices. It was just something to try...but it could well be due to some other cause anyway. It could well be a libsane regression based on what I've found during a quick search...

https://forums.linuxmint.com/viewtopic.php?t=235558
https://lists.debian.org/debian-user.../msg00241.html

Quote:

Some new information about SANE scanner problem:

Debian (scanner not working):
libsane 1.0.24
libsane-common 1.0.24

Ubuntu (scanner working):
libsane 1.0.23
libsane-common 1.0.23

Xeratul 06-14-2017 05:16 PM

Impossible.

I have installed Ubuntu Trusty, with libsane 1.0.23 and give it a cool 4.5.5 kernel that see the lib usb canon.

However scanimage does not want to detect it.

The ubuntu trusty is too old.
the kernel fine, but trusty to old.
1.0.23 + kernel 4.5.5. are there, but nothing. scanimage will not see the scanner.

what to do next?

ferrari 06-14-2017 05:43 PM

What is returned by the following? (Run as user then as root)

Code:

scanimage -L
Code:

sudo scanimage -L
and
Code:

sane-find-scanner
Code:

sudo sane-find-scanner

ferrari 06-14-2017 06:06 PM

Quote:

The ubuntu trusty is too old.
the kernel fine, but trusty to old.
1.0.23 + kernel 4.5.5. are there, but nothing. scanimage will not see the scanner.
Ah, now I understand - an old SANE version :)

The Canon LIDE 120 chipset 04a9:190e is only relatively recently supported I think based on what I've read here

http://www.sane-project.org/sane-mfgs.html#Z-CANON
which specifically references sane-backends-1.0.27.

You might find that adding the required chipset to /etc/sane.d/genesys.conf will do the trick...
Code:

# Canon LiDE 120
usb 0x04a9 0x190e

You will also need to ensure that you have a suitable udev rule in place for your scanner device eg /lib/udev/rules.d/40-canon-scanner.rules
Code:

ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="190e",ENV{libsane_matched}="yes"
but if there have been code changes to the actual backend, then you may have no choice but to use a later version.

The advice in this thread may be helpful to you (shows how to upgrade to the latest version of SANE)...
https://askubuntu.com/questions/6527...u-14-04/755505

Xeratul 06-14-2017 10:55 PM

Bus 001 Device 009: ID 04a9:190e Canon, Inc.

1. rules into /lib is made
2. edition of genesys.confg is made too


Code:

# scanimage -L
device `genesys:libusb:001:009' is a Canon LiDE 120 flatbed scanner
root@bbook:~# scanimage  -d "genesys:libusb:001:009" > image.ppm
scanimage: sane_start: Error during device I/O

There was this but then I compiled the new one vers 27.
Code:

dpkg -l | grep sane
ii  libsane:i386                1.0.25-4.1                        i386        API library for scanners
ii  libsane-common              1.0.25-4.1                        all          API library for scanners -- documentation and support files
ii  libsane-extras:i386          1.0.22.4                          i386        API library for scanners -- extra backends
ii  libsane-extras-common        1.0.22.4                          i386        API library for scanners -- documentation and support files
ii  sane                        1.0.14-12                        i386        scanner graphical frontends
ii  sane-utils                  1.0.25-4.1                        i386        API library for scanners -- utilities

Code:

scanimage  -L
device `genesys:libusb:001:009' is a Canon LiDE 120 flatbed scanner


/sane-backends-1.0.27$ has been compiled greatly.
I did make install, rebooted the pc with the new lib backend 1.0.27

but still same error.....

sane-find-scanner DID NOT find it.

libsane backend with find scanner gives this verbose output:
https://pastebin.com/raw/86HwN7MU


test 4:
after 1.0.27, then, I tried the debian experimental one:
https://packages.debian.org/experimental/libsane
http://cdn-fastly.deb.debian.org/deb...21.orig.tar.gz
same story, unpack, ./configure, make and make install, reboot, and try: sane-backends_1.0.26~git20151121.orig.tar.gz
same error. I/O still again and again.

what to try then?

:~# scanimage > image.ppm
scanimage: sane_start: Error during device I/O


Maybe we can use the drivers from Macintosch ????
http://gdlp01.c-wss.com/gds/2/010000...20-1_3-mcd.dmg

Xeratul 06-15-2017 12:17 AM

1 Attachment(s)
Quote:

Hi
Am facing same problem as explained earlier.

I have tried everything, but the scanner keeps giving the error i/o as earlier.

Something crude did work, thought of sharing it with other people facing same/similar problem.

Solution:
Download a proprietory software trial [https://www.hamrick.com/download.html] Vue Scan.
Extract the file downloaded, run the executable file.
Scan once, it works but software doesn't allow you to save without purchasing serial key. Don't save.
Close the application.
Run Simple Scan/Xscan, and voila everything works magically.

One major issue, the above process needs to be done every time you unplug device/restart computer.
wooooooooooooooowwwwww VueScan is great !!!!!!!!!!!
https://d2bwyyzfw77fhf.cloudfront.net/vuex3295.tgz
md5sum vuex3295.tgz
af17984af77a833add706066707491f2 vuex3295.tgz

I unpacked the file, did installed :
Get:1 http://ftp.de.debian.org/debian testing/main i386 libusb-0.1-4 i386 2:0.1.12-30 [23.5 kB]
Fetched 23.5 kB in 0s (164 kB/s)


Selecting previously unselected package libusb-0.1-4:i386.
(Reading database ... 65790 files and directories currently installed.)
Preparing to unpack .../libusb-0.1-4_2%3a0.1.12-30_i386.deb ...
Unpacking libusb-0.1-4:i386 (2:0.1.12-30) ...
Processing triggers for libc-bin (2.24-10) ...
Setting up libusb-0.1-4:i386 (2:0.1.12-30) ...
Processing triggers for libc-bin (2.24-10) ..


xhost +

./vuescan


ET VOILA !!!

(btw, sane s** a bit no?) If proprietary software can do it, why not opensource sane?

ferrari 06-15-2017 01:15 AM

I guess it is a regression with xsane (SANE front-end) then. Anyway, choice is good!

Xeratul 06-15-2017 02:02 AM

Quote:

Originally Posted by ferrari (Post 5722883)
I guess it is a regression with xsane (SANE front-end) then. Anyway, choice is good!

Proprietary is often better, since there is money ;) money rules this world, giving more employees.

No way with SANE backend... does not work at all.

Sane would have been interesting since I can plug an input, coded on C, to press the joystick key and get a quick scan and storing into my archives. An use of GUI is so ugly.

ferrari 06-15-2017 02:29 AM

Quote:

No way with SANE backend... does not work at all.
Vuescan still relies on SANE libraries, but packages it's own supporting libraries AFAIU. In any case the only way such regressions will get fixed is when bug reports are submitted.

Quote:

Sane would have been interesting since I can plug an input, coded on C, to press the joystick key and get a quick scan and storing into my archives. An use of GUI is so ugly.
I have no idea what you're on about here.

Xeratul 06-15-2017 02:43 AM

Quote:

Originally Posted by ferrari (Post 5722902)
Vuescan still relies on SANE libraries, but packages it's own supporting libraries AFAIU. In any case the only way such regressions will get fixed is when bug reports are submitted.


I have no idea what you're on about here.

I tried to read the content of Vuescan with vim, but no idea what it does.

I have also logged ps aux while scanning but no idea how it does it.

Using GUI is ugly, command line would be better, i meant.


All times are GMT -5. The time now is 09:29 PM.