Sane start error during device i o

До того как поменял комп все работало без всяких настроек. ОС Freebsd стоит и на прошлом тоже стояла. Но сейчас когда запускаю sudo skanlite Вылезает эта ошибка Error during device I/O Если запустить xsane, то вообще сканер не обнаружит. Нужно чтобы...


0

1

До того как поменял комп все работало без всяких настроек. ОС Freebsd стоит и на прошлом тоже стояла. Но сейчас когда запускаю sudo skanlite Вылезает эта ошибка Error during device I/O Если запустить xsane, то вообще сканер не обнаружит. Нужно чтобы сканер по usb работал.

# sane-find-scanner 
could not fetch string descriptor: No such device (it may have been disconnected)
found USB scanner (vendor=0x04e8 [Samsung], product=0x341b [SCX-4200 Series]) at libusb:000:003
# 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).

Сейчас юзер в группе operator

Этого файла нет: /usr/share/sane/snapscan/esfw3e.bin
И вообще папки /usr/share/sane/ нет.

Я создал вручную и дал права:
ls -l /usr/share/sane/snapscan/esfw3e.bin
-rw-rw-rw-  1 user  wheel  0 Aug 13 09:31 /usr/share/sane/snapscan/esfw3e.bin

установлен был:
graphics/sane-backends
print/cups

в rc.conf:
cupsd_enable="YES"
#devfs_system_ruleset="system"
devfs_system_ruleset="localrules"
lpd_enable="YES"
в /etc/devfs.rules:
[localrules=10]
add path 'ad*'    mode 0666 group operator
add path 'da*'    mode 0666 group operator
add path 'acd*'   mode 0666 group operator
add path 'cd*'    mode 0666 group operator
add path 'mmcsd*' mode 0666 group operator
add path 'pass*'  mode 0666 group operator
add path 'xpt*'   mode 0666 group operator
add path 'ugen*'  mode 0666 group operator
add path 'usbctl' mode 0666 group operator
add path 'usb*'   mode 0666 group operator
add path 'lpt*'   mode 0666 group operator
add path 'ulpt*'  mode 0666 group operator
add path 'unlpt*' mode 0666 group operator
add path 'fd*'    mode 0666 group operator
add path 'uscan*' mode 0666 group operator
# kldload uscanner
kldload: can't load uscanner: No such file or directory
dmesg | grep Samsung
ulpt0: <Samsung SCX-4200 Series, class 0/0, rev 2.00/1.00, addr 10> on usbus0
ugen0.3: <Samsung SCX-4200 Series> at usbus0 (disconnected)
ugen0.3: <Samsung SCX-4200 Series> at usbus0
ulpt0: <Samsung SCX-4200 Series, class 0/0, rev 2.00/1.00, addr 11> on usbus0
ugen0.3: <Samsung SCX-4200 Series> at usbus0 (disconnected)
ugen0.3: <Samsung SCX-4200 Series> at usbus0
ulpt0: <Samsung SCX-4200 Series, class 0/0, rev 2.00/1.00, addr 12> on usbus0
ugen0.3: <Samsung SCX-4200 Series> at usbus0 (disconnected)
ugen0.3: <Samsung SCX-4200 Series> at usbus0
ulpt0: <Samsung SCX-4200 Series, class 0/0, rev 2.00/1.00, addr 13> on usbus0

This article contains scanner or manufacturer-specific instructions for SANE.

Agfa

Snapscan e40

Firmware Snape40.bin from here is required.

If USB autosuspend is enabled, the printer may need to be turned off and on again before each scan. USB autosuspend can be disabled using powertop.

BenQ/Acer

If you own an USB scanner from Acer (now BenQ), you need to download a suitable firmware binary and configure /etc/sane.d/snapscan.conf.

  • Find out which model you own and take note of the USB ID:
$ lsusb
Bus 002 Device 010: ID 04a5:20b0 Acer Peripherals Inc. (now BenQ Corp.) S2W 3300U/4300U
  • Go to snapscan main page and see whether your scanner is supported and which firmware you need (e.g, u176v046.bin).
  • Search the firmware image on the Internet and download it to /usr/share/sane/snapscan/.
  • Edit the head of /etc/sane.d/snapscan.conf and configure the following two lines:
firmware /usr/share/sane/snapscan/u176v046.bin
/dev/usb/scanner0 bus=usb

Brother

In order to install a Brother scanner or printer/scanner combo you need the right driver. To find the right one, see the FAQ for your model at the Brother Support, i.e. Home > Country > Your model > FAQs & Troubleshooting > Linux > Scanner / Scan Key Tool > Scan using XSane or GIMP. You can also search the web. Or see the information below for more scanners. Or extract each of the AUR packages below. Each package seems to contain an exhaustive list of the models it is suitable to.

Then, install the appropriate package:

  • brscan2AUR
  • brscan3AUR
  • brscan4AUR (MFC-J5620DW)
  • brscan5AUR
  • libsane-dsseriesAUR

Now, the scanner should be recognized by SANE.

For network scanners, Brother provides a different configuration tool for each brscan version (e.g., brsaneconfig2 for brscan2 compatible devices):

# brsaneconfig2 -a name=<ScannerName> model=<ScannerModel> ip=<ScannerIP>

Example:

# brsaneconfig2 -a name=SCANNER_DCP770CW model=DCP-770CW ip=192.168.0.110

To get the IP and node name of your scanner, you can use Nmap:

$ nmap -sP 10.0.0.0/24

It’s also possible to add a scanner via its node name instead of its IP, for example:

# brsaneconfig4 -a name=Brother_DCP-L3550CDW model=DCP-L3550CDW nodename=BRWC0B5D72A0B87

Network Scanning

In case of network scanning, e.g. by WiFi, Sane may still be unable to find the scanner. If so, you need to specify the IP address of the scanner in the /etc/sane.d/net.conf file.

Now use scanimage --list-devices to check whether sane is able to find your scanner. If not, further check that Sane expects this device through the network (see [1]). Check that /etc/sane.d/dll.conf contains brotherX, where the X stands for the brscan version from above. If nothing was found, add brotherX to the end of the file.

Invalid argument

If all the necessary packages are installed but you still get the «invalid argument» error this could mean that the configuration file has been corrupted. Run the following command (in case of brscan4):

 # brsaneconfig4 -d

The output should narrow down the problem. Most likely the connection is not set up correctly. In case of a network scanner, check if the IP address is right by opening /etc/opt/brother/scanner/brscan4/brsanenetdevice4.cfg with an editor. In case of a USB connection, check if the path to the scanner in the configuration file is set up correctly. For that, compare the values of the lsusb command with your configuration file and change them if necessary. You might also try to follow the brotherX suggestion from Network Scanning above even for non-network scanners.

Scan-key-tool

Brother has released a tool to enable scanning to be triggered by user interaction with the scanner itself (e.g., by selecting one of «Scan to email», «Scan to image», etc. on the scanner’s keypad) rather than by an attached computer. This can be set up by installing the brscan-skeyAUR package and starting brscan-skey.service using systemd. Note that by default this service runs as the brscan-skey user which is created by the package, whose home directory is located at /srv/brscan-skey.

Brother supplies some default scripts that are executed when a scan type is selected on the keypad. These may require the installation of some optional dependencies of the brscan-skeyAUR package. For all options apart from «Scan to email» the resulting output can be found inside $HOME/brscan, with $HOME the home directory of the user running this tool (so /srv/brscan-skey if started via systemd as a systemwide process).

It is possible to change what action takes place when a given type of scan is selected on the keypad. This is done by editing /opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0.cfg. For each variable SCAN_COMMAND in IMAGE, OCR, EMAIL, FILE, the command

 $ $SCAN_COMMAND $SCANNER_DEVICE $SCANNER_FRIENDLY_NAME

is executed when the corresponding scan type is selected. Note that $SCAN_COMMAND is not quoted so may specify more than one positional parameter in the final command that is executed. $SCANNER_DEVICE refers to the name of the device that should be specified to a sane frontend (e.g. via the --device-name flag when using scanimage), for example brother3:bus4;dev2. $SCANNER_FRIENDLY_NAME is the human-readable name of the scanner.

xsane crashes

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason:

  • Should be mentioned on AUR page
  • This may only be relevant for the Brother DCP-150C scanner (Discuss in Talk:SANE/Scanner-specific problems)

If xsane crashes with message «=bugchk_free(ptr==(nil))@brother_modelinf.c(482)«, then you need to create the link /usr/local/Brother -> /usr/share/brother.

Canon

Scanning over the network with Canon PIXMA or imageCLASS all-in-one printer/scanners

Find out your printer/scanner’s IP address, and add it on a new line to /etc/sane.d/pixma.conf in the format bjnp://10.0.0.20. For imageCLASS printers you may need to use the format mfnp://10.0.0.20 instead.

Tip: Instead of an IP address, if mDNS resolution is set up, you can use the mDNS .local address. E.g. bjnp://MyPixmaPrinter.local.

Sane should now find your device. For more details refer to sane-pixma(5).

Alternatively, scangearmp2AUR can be used for some Canon PIXMA all-in-one printer/scanners which are not detected over the network.

See SANE/Scanner-specific problems for additional information.

Epson

Driver-Backends

For Epson scanners, you can choose between two different backends: «Image Scan v3» (imagescan/utsushi) or «Image Scan! for Linux» (iscan/epkowa). You can check here for all supported imagescan/utsushi devices and here for all supported iscan/epkowa devices. What used to be the iscan package in community is out of date, and buggy. You might look at the iscan packages in the AUR. At Q3 2021, it could also be that the archived iscan[dead link 2022-09-23 ⓘ], and iscan-data[dead link 2022-09-23 ⓘ], packages from the archive still work reasonably for you.

Image Scan v3

If you have to use Image Scan v3-backend you can install imagescan. It should detect supported USB scanners automatically by default. If your scanner is not recognized you can directly edit the /etc/utsushi/utsushi.conf and add the following lines.

[devices]
dev1.udi     = esci:usb:<vendor id>:<product id>
dev1.name    = foo
dev1.model   = <Model Name of the scanner>

If you want to make use of a network scanner you also have to install imagescan-plugin-networkscanAUR. Then edit /etc/utsushi/utsushi.conf and enter the ip address of your scanner to it.

[devices]
myscanner.udi    = esci:networkscan://<ip-address-here>:1865
myscanner.vendor = Epson
myscanner.model  = Model-name

When you then start Image Scan v3 by typing in the command

$ utsushi

the name of the scanner should be visible in the top left corner. If a connection problem happened, an error dialog will be shown.

Image Scan! for Linux

  • Install an iscan package.
  • Install the appropriate iscan-plugin package for your scanner (for example, iscan-plugin-gt-x820AUR for the Epson Perfection Photo V600)
  • Run udevadm control --reload so that udev will recognize the device as a scanner and apply appropriate permissions.

For network (including Wi-Fi) scanners, install iscan and iscan-plugin-networkAUR, then edit /etc/sane.d/epkowa.conf and add a line of the following format:

net <IP-address|hostname> [port-number]

Upstream version of iscan did not support 16bpc color depth scanning. Choosing any bit depth other than 8 made iscan stop without warning, leaving the scanner stuck until restarted. To enable 16bpc scanning, iscan used to required to be patched. It could be that an old patch, found in this forum thread, will enable 16bpc depth mode.

Epson DS-6500

Usually this device works with the epsonds-backend. However, there may be an error «Error during device I / O» when scanning multiple pages. If this error occurs, the Image Scan v3 backend can be used and imagescan needs to be installed. If you want to use the network module, the scanner can be configured in the /etc/utsushi/utsushi.conf after installing imagescan-plugin-networkscanAUR as described above.

Epson Perfection V39

This device (vendor id: 0x04b8, device id: 0x013d) is known to be supported by SANE’s epkowa backend. To use this backend, install iscan-dataAUR, iscanAUR and iscan-plugin-gt-s650AUR.

The latter package provides the firmware /usr/share/iscan/esfw010c.bin which is required to make the scanner work.

In case of a successful device setup, running scanimage -L results in:

  • the scanner waking up and performing some movements,
  • a constantly shining blue led at the device’s front, and
  • output similar to device `epkowa:interpreter:001:007' is a Epson Perfection V39 flatbed scanner.

In some cases, the above fails due to improper firmware, provided by iscan-plugin-gt-s650AUR.

Note: Symptoms of incorrect firmware:

  • the blue device led blinks endlessly,
  • scanimage -d device_name fails with scanimage: sane_start: Invalid argument.

As stated in this forum thread, using the firmware esfw010c.bin provided by epsonscan2-non-free-pluginAUR can solve the problem. There seem to exist different incompatible versions of the same firmware.

Epson Perfection V550 Photo

Install iscan-plugin-perfection-v550AUR

Epson Perfection 1270

For Epson Perfection 1270, you also need a firmware named esfw3e.bin. It can be obtained by installing the Windows driver.

Modify the configuration file of the snapscan backend, /etc/sane.d/snapscan.conf. Change the firmware path line with yours:

# Change to the fully qualified filename of your firmware file, if
# firmware upload is needed by the scanner
firmware /mnt/mydata/Backups/firmware/esfw3e.bin

And add the following line in the end or anywhere you like

# Epson Perfection 1270
usb 0x04b8 0x0120

You can get such code information (usb 0x04b8 0x0120) by sane-find-scanner command.

Also add such information lines to /etc/hotplug/usb/libsane.usermap to setup your privilege, like:

# Epson Perfection 1270
libusbscanner 0x0003 0x04b8 0x0120 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

Replug scanner, you have a working Epson Perfection 1270 now.

Note: I can scan image if I define the X and Y value, but without that error message occurs like: scanimage: sane_start: Error during device I/O, if anyone knows any other reasons, please add them to this section.

  • To prevent scanimage: sane_start: Error during device I/O and hangup of the scanner itself, when trying to scan with ADF (automatic document feed) enabled, I had to remove or comment out all Backends from /etc/sane.d/dll.conf and instead just add this to the file:
    snapscan

If you still get the Error during device I/O messages check that the transportation lock of the scanner (on the bottom of the scanner) is open.

Epson Perfection 1670/2480/2580/3490/3590

Note: Installation instructions were only tested for Epson Perfection 3590 but should be similar to the other models. Check the instructions above and the links below and edit this wiki page if you can verify that your scanner works.

Make sure to download the correct firmware for your Epson model. You can get an overview of some models and their drivers here and here. The download links of the firmware are broken, but you can use this link as alternative instead. Make sure to change the firmware filename of the link suiting your model. If you want to download and extract the firmware sources from the official epson sites yourself you can use this guide.

As an alternative you can also install the AUR package sane-epson-perfection-firmwareAUR which will download the firmware from the official sources, extract the binary and install those to /usr/share/sane/snapscan/.

Modify the configuration file of the snapscan backend, /etc/sane.d/snapscan.conf. Change the firmware path line with yours:

# Change to the fully qualified filename of your firmware file, if
# firmware upload is needed by the scanner
firmware /usr/share/sane/snapscan/esfw52.bin

Other modifications were not needed for the Epson Perfection 3590 and might not be for other models as well. If you still have problems it can also help if you completely remove the iscanAUR package.

EPSON WorkForce printer/scanners over the network

Install imagescan and imagescan-plugin-networkscanAUR.

Edit the configuration file /etc/utsushi/utsushi.conf. Find the [devices] section and edit the template for dev2. Replace the IP address accordingly. You can find the IP address on your printer screen. For example,

...
dev2.udi    = esci:networkscan://192.168.1.123:1865
dev2.model  = WF-2860
dev2.vendor = EPSON
...

Meanwhile, comment out epson2 in /etc/sane.d/dll.conf as it conflicts with ImageScan.

Once this is done you can use any SANE frontend to access this scanner.

Fujitsu

Fujitsu fi series

For some of the Fujitsu fi series document scanners, the pfufsAUR proprietary driver offers advanced functionality over the already mature SANE default driver, such as control of an optional imprinter for stamping scanned documents or requesting accurate status of the consumables from the host.

ScanSnap S300/S300M

For the operation of the ScanSnap scanners S300 and S300M a firmware file /usr/share/sane/epjitsu/300M_0C00.nal is required, which can be downloaded here or extracted from the Windows driver. The 300M_0C00.nal and 300_0C00.nal files are interchangeable; the S300 device can use the 300M_0C00.nal file and the S300M device can use the 300_0C00.nal file. The file can be renamed to fit the entry in /etc/sane.d/epjitsu.conf, or that entry can be edited to match the file name.

HP

If your HP device is supported by hplip, install the hplip package.

The latter comes with several tools:

  • hp-setup to add and setup the device
  • hp-check to check the installation of all required dependencies to successfully run (a very helpful tool)
  • hp-plugin is the ‘HPLIP Plugin Download and Install Utility’ (plugin also available from hplip-pluginAUR).
  • hp-scan is the ‘HPLIP Scan Utility’. If you need that tool, you will need to install python-pillow.

hp-setup requires Python Qt5 when run using the GUI (which is the default). As an alternative, you can run the CLI interface of hp-setup using -i as argument.

If the device is connected by USB, run hp-setup as root and follow the on-screen instructions.

If your device is connected on the network, use hp-setup printer_ip instead.

Alternative way to scan with network HP scanner

  • Find out IP address of your network HP scanner, for example 192.168.1.8
  • Make device URI using hp-makeuri utility:
$ hp-makeuri 192.168.1.8
hpaio:/net/DeskJet_3630_series?ip=192.168.1.8
  • This URI could be given to xsane or scanimage tools, for example:
$ xsane "hpaio:/net/DeskJet_3630_series?ip=192.168.1.8"
$ scanimage --device "hpaio:/net/DeskJet_3630_series?ip=10.12.129.6" --format=png --resolution 300 >scan01.png

Lexmark

For Lexmark devices printing issues, please read CUPS/Printer-specific problems#Lexmark.

Most Lexmark scanners are still (2019) not supported by SANE, and thus cannot be detected either by sane-find-scanner or by scanimage -L. Lexmark provides a non-free driver for GNU/Linux, which is supposed to support all its scanners. Nevertheless, the driver is only distributed for Debian, OpenSUSE, Fedora and Red Hat, but not for Arch. Here is a way to install it.

Warning

Before following these steps, note that :

  • This driver is non-free (copyrighted by Lexmark)
  • This hasn’t been widely tested yet (but the driver is supposed to work for all Lexmark scanners)
  • The tree does not respect Arch standards — namely, all will be installed in /usr/local; you’ll get a /usr/lexmark/ symbolic link; and get symbolic links to the files installed in /usr/local/lexmark.
  • This process might generate conflicts if you’ve already installed some Lexmark drivers.

Process

  1. Ensure Java is installed.
  2. Download the .deb file[dead link 2021-11-19 ⓘ] containing the driver and save it (eg at ~/lexmark.deb).

Option 1 : using DPKG

dpkg is the standard package-manager for Debian-based distributions. It should not be used to replace pacman unless you precisely know what you’re doing.
Simply run as root

# dpkg -i lexmark.deb

Your scanner should be detected after reboot.

Option 2 : manual installation

Alternatively, if you dont want to install dpkg or wish to control exactly what is done during install, you can follow these instructions (assuming you’re working in ~). Please note that md5 sums will not be checked, which could cause security issues.

  1. Extract the ~/lexmark.deb archive, running ar x lexmark.deb. File debian-binary can be dropped.
  2. Extract both ~/control.tar.gz and ~/data.tar.gz archives.
  3. data.tar.gz gives a ~/usr/ directory. As root, move ~/usr/local/lexmark to /usr/local/lexmark.
  4. As root, run ~/control/postinst to perform install. This script will automatically set all files owners an chmod, then set some fonts, drivers and docs tricks. It will also eventually run /usr/local/lexmark/network-scan.link, creating several symbolic links in your Arch architecture.
  5. Your scanner should be detected after reboot.

Option 3 : Using AUR package

Install the lexmark-network-scanAUR package.

Supported devices

This process has been successfully tested for the following devices:

  • Lexmark MB2236 (USB only; network untested).
  • Lexmark MX517de (network only; USB untested).
  • Lexmark X204n (network only; USB untested).

It does not work fot the following:

To do

In order to improve Lexmark scanners support, you can:

  • Check whether this process works for your computer and device
  • Help defining the list of dependencies required for this process
  • Create an AUR package with this driver which installation would not mess architecture up. Namely, such a package should not need to create a /usr/lexmark symlink, and should be containerized (eg in /opt/lexmark).

Medion

If you own the USB scanner MD 9705 from Medion, you need to download a suitable firmware binary. This firmware file is in the device driver for Windows.

Find out which model you own and take note of the USB ID:

$ lsusb
Bus 006 Device 007: ID 05d8:4003 Ultima Electronics Corp. Artec E+ 48U

Download the windows driver from https://download.medion.com/downloads/treiber/scamd9705w9xxp.exe

Then enter the following commands to extract the firmware file, and copy it to the location SANE expects it:

$ unzip scamd9705w9xxp.exe Win2000/Artec48.usb
# cp Win2000/Artec48.usb /usr/share/sane/artec_eplus48u/Artec48.usb

Mustek

BearPaw 2400CU

Works with sane-gt68xx (sane-gt68xx-firmware)

Samsung

For some Samsung MFP printers you may need to edit /etc/sane.d/xerox_mfp.conf.

example entry:

#Samsung SCX-3200
usb 0x04e8 0x3441

Change the printer model as needed. You can get the idVendor and idProduct code with lsusb. See this thread.

To access the scanner over the network rather than the usb interface, add a line to /etc/sane.d/xerox_mfp.conf such as

#Samsung scx4500w wireless ip network address
tcp xx.xx.xx.xx

where xx.xx.xx.xx is the static ip address of the printer.

  1. Sane Is Making Me Insane — Error During Device I/O

    I’m having a major problem getting my scanner to work consistently; now it’s not working at all.

    I’m getting the error:

    sane_start: error during device I/O

    when I run simple scan, xsane, or gscan2pdf.

    The scanner is an HP LaserJet M1217nfw MSP running via a wireless network, but the same error occurs when it is installed directly via USB. I have removed and reinstalled the printer multiple times using the instructions on HP’s site, which recommend the use of hp-setup and a required plugin that hp-setup installs. I have no errors when I run hp-check, and printing works fine. The printer is detected correctly.

    I did a clean install of the printer on an 11.10 machine, and ran into the same error when I use the document feeder (ADF).

    However, scanning does not work either via the flatbed or ADF now on any of the three machines I’ve tried it with. Although it was working previously before I did something that appears to have broken it permanently, I have tried on three different machines, two running 12.04, and one running 11.10. At first I thought it was something with my wireless router, but as I said, a trial with it installed via USB produced the same problems.

    The odd thing is that the scanner was working for single sheets up until yesterday when I had to do a huge (~500) page scanning job using the document feeder. Since then, nothing but trouble.

    Does anyone have any idea how to get this thing working? There’s nothing in my print queue, but it seems like something has taken the scanner down completely now.

    The more I think about it, the more it sounds like a problem with the printer itself. My current plan is to set up a Windows machine to see if it works that way. I feel dirty just thinking about that…


  2. Re: Sane Is Making Me Insane — Error During Device I/O

    I had a similar problem with an Epsom Workforce 545 recently. I tried running several scanning programs with no success.

    Then I tried:

    in a terminal and, despite issuing apocalyptic warnings, everything worked fine. After that one time with sudo, xsane opens normally through the menu with no problems.

    EDIT: This worked for the flatbed; I didn’t try with the ADF.

    Last edited by RichardCain; April 25th, 2012 at 03:23 AM.


  3. Re: Sane Is Making Me Insane — Error During Device I/O

    You said you followed HP’s instructions, but there are actually a couple of different possibiities. First, are you using HPLIP? I assume so if you went to HP to get instructions. But this is important. Second, how did you install HPLIP, from an HP installation program you downloaded or from Ubuntu’s package?

    The gist of where I am going: Ubuntu’s package does not work correctly, especially for scanning, for some reason. If you used that, purge it, download the installation program from the HP site and install it. My experience has been that will fix most HP printing/scanning problems. If you have already done this, then we’ll see what else we can find for you. However, a number of people have had problems (including yours truly) and that solved the problem slick as a whistle. Let me know if you want detailed instructions.


  4. Re: Sane Is Making Me Insane — Error During Device I/O

    Quote Originally Posted by RichardCain
    View Post

    I had a similar problem with an Epsom Workforce 545 recently. I tried running several scanning programs with no success.

    Then I tried:

    in a terminal and, despite issuing apocalyptic warnings, everything worked fine. After that one time with sudo, xsane opens normally through the menu with no problems.

    EDIT: This worked for the flatbed; I didn’t try with the ADF.

    This sounds like a permissions issue. I know that with this HP, my user has to be added to the lp and lpadmin groups, which requires a reboot before it takes effect if the user is added to the groups during the installation. That may be why sudo worked for you?

    I gave sudo a try with Simple Scan and still got the same error:

    sane_start: error during device I/O


  5. Re: Sane Is Making Me Insane — Error During Device I/O

    Quote Originally Posted by agillator
    View Post

    You said you followed HP’s instructions, but there are actually a couple of different possibiities. First, are you using HPLIP? I assume so if you went to HP to get instructions. But this is important. Second, how did you install HPLIP, from an HP installation program you downloaded or from Ubuntu’s package?

    The gist of where I am going: Ubuntu’s package does not work correctly, especially for scanning, for some reason. If you used that, purge it, download the installation program from the HP site and install it. My experience has been that will fix most HP printing/scanning problems. If you have already done this, then we’ll see what else we can find for you. However, a number of people have had problems (including yours truly) and that solved the problem slick as a whistle. Let me know if you want detailed instructions.

    Yes, I am using HPLIP, and I did use the version in the Ubuntu repositories.

    As per your suggestion, I removed the installed printer via System Settings, then ran:

    Code:

    sudo apt-get purge hplip

    Next, I went to HP’s site and downloaded their HPLIP shell-installation script and ran it in automatic mode as they recommend.

    The installation went fine—saying it was successful—until the very end, when I got the following error message:

    error: Unable to lock /home/<my user name>/.hplip/hp-systray.lock. Is hp-systray already running?

    I suspect that’s because hp-systray was still running from the previous installation, and doesn’t represent a problem. I was able to print a test page successfully, and the scanner works for single pages in Simple Scan—though I may not have scanned enough to get the I/O error—but I still get the I/O error when using the document feeder. Sometimes, the error occurs after only one page, sometimes I am able to scan four or more pages successfully before getting the error, but I still get the same error in Simple Scan and:

    INFO — gscan2pdf: sane_start: Error during device I/O

    in gscan2pdf while running it in debug mode.

    With HP’s version of HPLIP, I am getting the HP systray and a pop-up message of something along the lines of «beginning scan» and «scan completed» for each page, even after the I/O error. The printer goes through the remaining pages popping up status messages even after they have failed to show up in Simple Scan and gscan2pdf.

    An additional issue which may or may not be related, is that in gscan2pdf, although it seems to be scanning the pages up until the time I get the I/O error, none of the pages show up in the UI. I tried doing a single page in gscan2pdf in the «flatbed» mode, and get the I/O error there immediately.

    Just to make sure it isn’t a permissions issue, though since it’s intermittent I don’t see how it could be, I tried both Simple Scan and gscan2pdf again using sudo and I still get the I/O error.


  6. Re: Sane Is Making Me Insane — Error During Device I/O

    It looks like the printer and the network connection are not the problem. I was pretty sure about the latter since I was still getting the errors while connected via USB, but to make sure the printer wasn’t the issue, I got hold of Winblows Vista machine, installed HP’s drivers and scanner software, and gave the thing a thorough test.

    There was one occasion when it gave me an error about connecting to the scanner when using it wirelessly, but it only happened once (maybe interference?) and I’ve run about 200 sheets through the document feeder after that without any more problems.

    So, I’m currently thinking it’s an issue with libsane, and still loving Linux after having to suffer through my time on that Vista machine.


  7. Re: Sane Is Making Me Insane — Error During Device I/O

    I think you are right, sane is the problem for some reason. This I haven’t run into before. You might try purging sane and xsane and then reinstalling. I certainly haven’t had any trouble with them but who knows.


  8. Re: Sane Is Making Me Insane — Error During Device I/O

    I hate to admit this, but I have a scanning job I really need to get done, so I resorted to trying to finish it using the ******* machine. Although it took longer to manifest, it seems like there is an I/O problem with it, too. I get frequent «cannot communicate with the printer» errors using HP’s own Scan To software. I also had quite a few paper jams in the document feeder, which are interesting because the paper I am scanning is practically new HP paper…

    Well, the printer is still under warranty so I called HP Support and spent a whopping 3+ hours on the phone with a really helpful support tech who finally gave up and is sending me a new (refurbished) printer.

    So maybe it’s not sane after all. There appears to be an actual issue with the printer involving connection as well as the problem with the document feeder itself. I may still try purging sane/xsane and reinstalling just to see if that helps on the Ubuntu end.

    Thanks for taking the time to reply. I really appreciate it.


  9. Re: Sane Is Making Me Insane — Error During Device I/O

    I’m glad tech support treated you well. I will be curious if the replacement solves the problem. The fact that they spent that much time with you and then agreed it might be the printer is impressive. Another reason to stick with HP.


  10. Re: Sane Is Making Me Insane — Error During Device I/O

    Quote Originally Posted by agillator
    View Post

    I’m glad tech support treated you well. I will be curious if the replacement solves the problem. The fact that they spent that much time with you and then agreed it might be the printer is impressive. Another reason to stick with HP.

    The guy I spoke with did treat me well. He wasn’t following a script, was knowledgeable, and really put forth an effort. I did some Ubuntu proselytizing while we were waiting for Vista to reboot multiple times, and I think he’s going to download and try 12.04.

    I’m curious to see if the replacement printer does the trick, too. I will post back either way. It’s not due here until 5/3, so it will be a while…


Имеется сканер Mustek BearPaw 2400CU Plus.

Устройство определяется (messages):

ugen0: vendor 0x055f USB Scanner, rev 1.10/1.00, addr 3

Появляются три устройства:

ugen0

ugen0.1

ugen0.2

# sane-find-scanner -q

found USB scanner (vendor=0x055f, product=0x021d [USB Scanner], chip=GT-6816) at libusb:/dev/usb1:/dev/ugen0

# scanimage -L

device `gt68xx:libusb:/dev/usb1:/dev/ugen0′ is a Mustek BearPaw 2400 CU Plus flatbed scanner

Был скопирован в нужное место firmware:

В /usr/local/share/sane/gt68xx/PS2Dfw.usb

Так же в /usr/local/etc/sane.d/gt68xx.conf добавлены следущие строки:

##############################################################################

# Autodetect Mustek BearPaw 2400 CU Plus

usb 0x055f 0x021d

# Mustek BearPaw 2400 CU Plus:

model «BearPaw 2400 CU Plus»

vendor «Mustek»

firmware «/usr/local/share/sane/gt68xx/PS2Dfw.usb»

scanimage замечательно сканирует, но только под root-ом =(

В соответствии с Handbook пользователь был добавлен в группу operator.

Устройствам ugen0 даются права на запись группе (группа у них operator).

scanimage -L замечательно определяет сканер из под пользователя, но при попытке сканировать получаем:

$ scanimage > test2.pnm

scanimage: sane_start: Error during device I/O

scanimage: WARNING: read more data than announced by backend (0/3830176409)

При этом сканер подает признаки жизни, но не надолго как видно… После чего сканер отваливается и больше не фурычит, пока его не отключишь-включишь. Было замечено что в Handbook описвается устройство /dev/uscanner0, но у меня оно не создавалось не смотря на наличие в ядре:

# kldstat -v | grep uscanner

108 uhub/uscanner

Поэтому решено было залезть в сырцы uscanner:

(плюсом помечены добавленные строки)

/usr/src/sys/dev/usb/uscanner.c:

{{ USB_VENDOR_MUSTEK, USB_PRODUCT_MUSTEK_1200USBPLUS }, 0 },

{{ USB_VENDOR_MUSTEK, USB_PRODUCT_MUSTEK_1200CUPLUS }, 0 },

+ {{ USB_VENDOR_MUSTEK, USB_PRODUCT_MUSTEK_2400CUPLUS }, 0 },

/usr/src/sys/dev/usb/usbdevs:

product MUSTEK 1200CUPLUS 0x0008 1200 CU Plus scanner

+ product MUSTEK 2400CUPLUS 0x021d 2400 CU Plus scanner

product MUSTEK BEARPAW1200F 0x0010 BearPaw 1200F scanner

После сборки и установки ядра получил:

Устройство определяется (messages):

uscanner0: vendor 0x055f USB Scanner, rev 1.10/1.00, addr 3

# scanimage -L

device `gt68xx:/dev/uscanner0′ is a Mustek BearPaw 2400 CU Plus flatbed scanner

# sane-find-scanner -q

found USB scanner (vendor=0x055f, product=0x021d) at /dev/uscanner0

# scanimage > test.pnm

scanimage: open of device gt68xx:/dev/uscanner0 failed: Operation not supported

Такая фигня и при пользователе и при руте. В самом сканере ничего не шевелится, при этом устройство не отваливается, т.е. при следующей попытке scanimage -L все корректно выдает.

Вопрос: что я упустил при патче модуля uscanner?

Главная цель — запуск сканера из под пользователя. В данный момент приведенные выше строки из uscanner убрал, сканирую из под root =( Если все заведется без патча, против не буду =)

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

mbmast

Level 1
Level 1
Posts: 10
Joined: Mon Dec 25, 2017 9:22 pm

SANE Error: Failed to open device. Error during device I/O

When I launch Xsane 0.999 it correctly shows my two HP multi-function scanners connected via Ethernet (and the correct 192.168.x.y addresses are displayed).

When I click Ok, I get:

Code: Select all

Failed to open device 'hpaio:/net/HP_LaserJet_400_colorMFP_M475dn?ip=192.168.1.20':Error during device I/O.

I am able to print to this printer. How can I debug and fix this?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

User avatar

kc1di

Level 17
Level 17
Posts: 7744
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: SANE Error: Failed to open device. Error during device I/O

Post

by kc1di » Tue Jan 23, 2018 9:17 am

I don’t know that I have the answer, but I would install hplip-gui

and then open the hp tool box and reinstall the printer from there
see if it works then. If this is a networked printer set it /them to fixed ip addresses outside the normal range so they don’t receive any dhcp addresses.
It may also help people trying to help to know which version of Mint your using and which desktop.
good luck

mbmast

Level 1
Level 1
Posts: 10
Joined: Mon Dec 25, 2017 9:22 pm

Re: SANE Error: Failed to open device. Error during device I/O

Post

by mbmast » Thu Jan 25, 2018 1:34 am

I installed jplib-gui. That allowed me to get further. xsane works; i can scan from there. But when I start PDF Studio and try to do a scan, I’m told there are no sane scanners (although they show up in xsane and work).

I’m running Mint 18.3 with Cinnamon 3.6.7

User avatar

kc1di

Level 17
Level 17
Posts: 7744
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: SANE Error: Failed to open device. Error during device I/O

Post

by kc1di » Thu Jan 25, 2018 7:08 am

mbmast wrote:I installed jplib-gui. That allowed me to get further. xsane works; i can scan from there. But when I start PDF Studio and try to do a scan, I’m told there are no sane scanners (although they show up in xsane and work).

I’m running Mint 18.3 with Cinnamon 3.6.7

The problem isn’t with your printer setup then but with PDF Studio. Since I’ve never used that program I can’t be of much help, Sorry. I use MaterPDF and it works really well for me. you can find it here https://code-industry.net/free-pdf-editor/#get Download the .deb file and once finished right click on the file and open with gdebi and install from there. Try that and see if it will work for you.

Good luck.

Организовать работу сканера в Linux можно используя SANE, предварительно убедившись, что ваша модель сканера им поддерживается. Часто при подключении сканера возникает ситуация когда сканер работает из под root и не работает под обычным пользователем. В данном посте пойдет речь о подключении сканера Mustek BearPaw 2448 TA Plus и организации его работы под обычным пользователем.

Для начала установим необходимые пакеты:

aptitude install libsane sane-utils xsane xsane-common

Сканер Mustek BearPaw 2448 TA Plus подключается к компьютеру через USB интерфейс. После подключения сканера к компьютеру, его можно «увидеть» в списке USB-устройств выполнив в командной строке:

lsusb

Bus 002 Device 003: ID 055f:021a Mustek Systems, Inc. BearPaw 2448 TA Plus

Теперь воспользуемся утилитой sane-find-scanner для поиска сканера и определения его файла устройства:

sane-find-scanner -q

found USB scanner (vendor=0x055f, product=0x021a [USB Scanner], chip=GT-6816) at libusb:002:003

Утилита scanimage поможет убедится в том, что сканер функционирует корректно. Для начала убедимся, что сканер доступен и отображается в списке доступных устройств, выполнив с правами root следующую команду:

sudo scanimage -L

device `gt68xx:libusb:002:003′ is a Mustek BearPaw 2448 TA Plus flatbed scanner

Теперь надо выполнить тестирование сканера выполнив в командной строке:

sudo scanimage —test -d ‘gt68xx:libusb:002:003’

[gt68xx] Couldn’t open firmware file (`/usr/share/sane/gt68xx/A2Nfw.usb’): No such file or directory
scanimage: open of device gt68xx:libusb:002:003 failed: Invalid argument

Если вы получили такой-же вывод, то вам необходимо скачать файл A2Nfw.usb здесь. Это firmware, необходимое для работы сканера. Файл A2Nfw.usb надо расположить в директории /usr/share/sane/gt68xx/ с правами доступа 0644, для этого вам понадобятся права root.

После того как firmware установлено, вывод тестирования сканера в правами root выглядит следующим образом:

sudo scanimage —test -d ‘gt68xx:libusb:002:003’

[gt68xx] Please wait for lamp warm-up
scanimage: scanning image of size 2555×3514 pixels at 8 bits/pixel
scanimage: acquiring gray frame, 8 bits/sample
scanimage: reading one scanline, 2555 bytes… PASS
scanimage: reading one byte… PASS
scanimage: stepped read, 2 bytes… PASS
scanimage: stepped read, 4 bytes… PASS
scanimage: stepped read, 8 bytes… PASS
scanimage: stepped read, 16 bytes… PASS
scanimage: stepped read, 32 bytes… PASS
scanimage: stepped read, 64 bytes… PASS
scanimage: stepped read, 128 bytes… PASS
scanimage: stepped read, 256 bytes… PASS
scanimage: stepped read, 512 bytes… PASS
scanimage: stepped read, 1024 bytes… PASS
scanimage: stepped read, 2048 bytes… PASS
scanimage: stepped read, 4096 bytes… PASS
scanimage: stepped read, 4095 bytes… PASS
scanimage: stepped read, 2047 bytes… PASS
scanimage: stepped read, 1023 bytes… PASS
scanimage: stepped read, 511 bytes… PASS
scanimage: stepped read, 255 bytes… PASS
scanimage: stepped read, 127 bytes… PASS
scanimage: stepped read, 63 bytes… PASS
scanimage: stepped read, 31 bytes… PASS
scanimage: stepped read, 15 bytes… PASS
scanimage: stepped read, 7 bytes… PASS
scanimage: stepped read, 3 bytes… PASS

Теперь надо воспользоваться утилитой scanimage с правами обычного пользователя, выполнив в командной строке:

scanimage -L

Если вы получите пустой вывод, надо посмотреть права доступа в файлу устройства (файл устройства можно узнать из вывода команд lsusb и sane-find-scanner). В нашем случае права к файлу устройства следующие:

ls -la /dev/bus/usb/002/003

crw-rw-r— 1 root root 189, 130 2009-05-24 15:43 /dev/bus/usb/002/003

Файлы устройств в Linux динамически создаются при помощи утилиты udev по правилам описанным в файлах, расположенных в директории /etc/udev/rules.d. Для того чтобы файл устройства сканера создавался с корректными правами доступа необходимо в директории /etc/udev/rules.d создать файл 45-libsane.rules со следующим содержанием:

ACTION!=»add», SUBSYSTEM!=»usb», DRIVER!=»usb», GOTO=»libsane_rules_end»

#Mustek Systems, Inc. BearPaw 2448 TA Plus
ATTR{idVendor}==»055f», ATTR{idProduct}==»021a», ATTR{product}==»USB Scanner», MODE=»664″, GROUP=»scanner»

LABEL=»libsane_rules_end»

Атрибуты для написания правила можно взять из вывода команды udevinfo следующего вида:

udevinfo -a -n /dev/bus/usb/002/003

Как писать правила для udev можно почитать здесь. После того как правила прописаны, необходимо пререзагрузить компьютер и убедиться, что права к файлу устройства установленны корректно.

ls -la /dev/bus/usb/002/003

crw-rw-r— 1 root scanner 189, 130 2009-05-24 16:26 /dev/bus/usb/002/003

Теперь надо внести пользователя в группу scanner. Это можно сделать следующим образом:

После вненсения пользователя в группу надо перелогинится. Теперь вывод команды scanimage -L с правами пользователя должен быть аналогичным выводу этой команды с правами root.

После того как сканер подключен и протестирован отсканировать документ можно при помощи программы xsane, которая в Ubuntu располагается в меню «Приложения->Графика->Программа для сканирования изображения». К сканеру также можно организовать доступ по сети, как это сделать можно почитать здесь.

Понравилась статья? Поделить с друзьями:
  • Sands of faith runtime error
  • Sandisk extreme portable ssd 1tb не распознает пк как исправить
  • Sandboxie как исправить ошибку
  • Sandboxie cs go vac error fix
  • Sandbox engine error