Ivanovo Linux Users Group -  
Форум Помощь Поиск Вход
Предыдущая Следующая Вверх Тема Железо / Настраиваем железки / Epson Perfection 1270 (14098 хитов)
- Написал(а) cutter Дата 26.11.05 21:09
Привет.

Недавно появился у меня сканер Epson Perfection 1270. В списке поддерживаемых устройств на sane-project.org он обозначен как "good".

Смотрим, что нашел scanimage:
$ sudo scanimage -L
device `snapscan:libusb:001:005' is a EPSON EPSON Scanner flatbed scanner


Пытаемся что-то сканировать:
$ sudo scanimage > image.pnm
[snapscan] Scanner warming up - waiting 9 seconds.
[snapscan] Scanner warming up - waiting 35 seconds.
scanimage: sane_start: Error during device I/O

Прогревает лампу, калибрует ее, на чем все сканирование и завершается. Включим отладку, что бы посмотреть поподробнее:
$ export SANE_DEBUG_DLL=4
$ export SANE_DEBUG_SNAPSCAN=4
$ sudo scanimage -L
[sanei_debug] Setting debug level of dll to 4.
[dll] sane_init: SANE dll backend version 1.0.11 from sane-backends
1.0.16-cvs
[dll] add_backend: adding backend `snapscan'
[dll] sane_get_devices
[dll] load: searching backend `snapscan' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-snapscan.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-snapscan.so.1'
[dll] init: initializing backend `snapscan'
[sanei_debug] Setting debug level of snapscan to 4.
[snapscan] usb_read_status: scanner structure not set, returning default error
[dll] init: backend `snapscan' is version 1.4.49
[dll] sane_get_devices: found 1 devices
device `snapscan:libusb:001:005' is a EPSON EPSON Scanner1 flatbed
scanner
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `snapscan's exit function
[dll] sane_exit: finished
$ sudo scanimage > image.pnm
[sanei_debug] Setting debug level of dll to 4.
[dll] sane_init: SANE dll backend version 1.0.11 from sane-backends 1.0.16-cvs
[dll] add_backend: adding backend `snapscan'
[dll] sane_get_devices
[dll] load: searching backend `snapscan' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-snapscan.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-snapscan.so.1'
[dll] init: initializing backend `snapscan'
[sanei_debug] Setting debug level of snapscan to 4.
[dll] init: backend `snapscan' is version 1.4.49
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open `snapscan:libusb:001:005'
[dll] sane_open: open successful
[dll]
sane_control_option(handle=0x80537b8,option=0,action=0,value=0xbfffe7c0,info=(nil))
[dll]
sane_control_option(handle=0x80537b8,option=0,action=0,value=0xbfffe728,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80537b8,option=0)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=1)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=2)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=3)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=4)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=5)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=6)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=7)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=8)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=9)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=10)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=11)
[dll]
sane_control_option(handle=0x80537b8,option=11,action=0,value=0x8052698,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80537b8,option=12)
[dll]
sane_control_option(handle=0x80537b8,option=12,action=0,value=0x805269c,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80537b8,option=13)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=14)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=15)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=16)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=17)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=18)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=19)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=20)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=21)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=22)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=23)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=24)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=25)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=26)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=27)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=28)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=29)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=30)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=31)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=32)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=33)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=34)
[dll] sane_get_option_descriptor(handle=0x80537b8,option=35)
[dll]
sane_control_option(handle=0x80537b8,option=9,action=0,value=0xbfffe724,info=(nil))
[dll]
sane_control_option(handle=0x80537b8,option=10,action=0,value=0xbfffe724,info=(nil))
[dll]
sane_control_option(handle=0x80537b8,option=9,action=0,value=0xbfffe7bc,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80537b8,option=11)
[dll]
sane_control_option(handle=0x80537b8,option=11,action=1,value=0xbfffe7b8,info=0xbfffe728)
[dll]
sane_control_option(handle=0x80537b8,option=10,action=0,value=0xbfffe7bc,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80537b8,option=12)
[dll]
sane_control_option(handle=0x80537b8,option=12,action=1,value=0xbfffe7b8,info=0xbfffe728)
[dll] sane_start(handle=0x80537b8)
[snapscan] usb_read Only 0 bytes read
[snapscan] scsi_read: snapscan_cmd command failed: Error during device I/O
[snapscan] measure_transfer_rate: scsi_read command failed: Error during device I/O
[snapscan] sane_snapscan_start: measure_transfer_rate command failed: Error during device I/O
scanimage: sane_start: Error during device I/O
[dll] sane_cancel(handle=0x80537b8)
[snapscan] usb_write Only 0 bytes written
[snapscan] release_unit: scsi command error: Error during device I/O
[snapscan] usb_write Only 0 bytes written
[snapscan] usb_write Only 0 bytes written
[dll] sane_close(handle=0x80537b8)
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `snapscan's exit function
[dll] sane_exit: finished

Ядро 2.6.8 из дистрибутива.
Установленная версия libsane (sane-backends) - 1.0.16-cvs. Тоже самое наблюдается при версиях sane-backends 1.0.15-9 (входящую в релиз sarge) и 1.0.16-5. libusb-0.1-4 (2:0.1.10a-9.sarge.1).

Сейчас покажу свои конфиги sane:
/etc/sane.d$ ls -lR
.:
итого 80
-rw-r--r--  1 root root     9 2005-11-26 19:09 dll.conf
-rw-rw-rw-  1 root root 64000 2005-11-26 00:02 esfw3e.bin
drwxr-xr-x  2 root root  4096 2005-11-26 19:19 hotplug
-rw-r--r--  1 root root    75 2005-11-26 19:11 snapscan.conf

./hotplug:
итого 4
-rw-r--r--  1 root root 63 2005-11-26 19:08 libsane.db

$ tail dll.conf
snapscan
$ tail snapscan.conf
firmware /etc/sane.d/esfw3e.bin

# Epson Perfection 1270
usb 0x04b8 0x0120
$ tail hotplug/libsane.db
# Epson Corp.|Perfection 1270
0x04b8 0x0120   root:scanner    0660

$ cat /proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04b8 ProdID=0120 Rev= 1.10
S:  Manufacturer=EPSON
S:  Product=EPSON Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=16ms

/etc/hotplug/usb$ ls -l
итого 96
-rwxr-xr-x  1 root root   219 2005-11-25 23:50 libgphoto2
-rw-r--r--  1 root root 78052 2005-07-24 05:02 libgphoto2.usermap
-rw-r--r--  1 root root    90 2005-11-26 02:20 libsane.usermap
-rwxr-xr-x  1 root root   941 2005-11-26 02:13 libusbscanner
/etc/hotplug/usb$ tail libsane.usermap
libusbscanner 0x0003 0x04b8 0x0120 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000


Firmware "esfw3e.bin" выгреб из установленного драйвера сканера под мастдаем.

В тоже время, этот сканер прекрасно работатет под 98-м мастдаем, установленным на вмварь.

Посмотрел эту тему в гугле. Один человечек запостил баг на alioth.debian.org, в котором в точности описал все наблюдаемые мной симптомы:
https://alioth.debian.org/tracker/index.php?func=detail&aid=301090&group_id=30186&atid=410366

В том же гугле можно видеть слова людей, которые, судя по всему смогли поставить этот сканер под sane.

Что делать? Статус бага - open. Ни чего не делать, ждать, когда это зафиксят в sane-backends, если есть, что фиксить..??

Вообще, каким образом этот девайс стал называться "good" в списке поддерживаемых sane устройств? Значит, оно все-таки у кого-то работает?
Но как??
Parent - Написал(а) LOE (Site/forum admin) Дата 27.11.05 17:05
Здесь: http://snapscan.sourceforge.net/ был?

В частности, есть описание симптомов строки:
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
Цитирую:
If the module didn't detect your scanner, the line starting with I: will "read Driver=(none)" instead. In this case you have to supply the vendor and product ID during module loading. Either specify vendor and product ID directly during modprobe, e.g.:

modprobe  scanner vendor=0xVVVV product=0xPPPP
or (more convenient) put the options in /etc/modules.conf:

options scanner vendor=0xVVVV product=0xPPPP
Some additional general hints for configuration of USB devices in SANE can be found in the sane-usb manpage.
"No! Try not! Do. Or do not. There is no try." -- Yoda
Parent Написал(а) cutter Дата 27.11.05 18:17
Да, был.

Может быть, конечно, я не правильно понимаю, или не понимаю вовсе принципы работы udev, hotplug, загрузки модулей; но, если у меня ядро 2.6.x, а не 2.4.х, то, наверно, в моем ядре нет модуля "scanner" или "usbscanner"?  libusb делает устройство в /proc/bus/usb/ххх/xxx, а устройства /dev/scanner или /dev/usb/scanner быть не может. Вообще, смутно я себе это все представляю. Почему когда я включаю usb принтер у меня появляется устройство /dev/usb/lp0, когда подключаю телефон, что бы воспользоваться его GPRS-модемом, то у меня появляется устройство /dev/ttyACM0, а когда включаю сканер, то работать мне с ним надо не через какое-то устройство в /dev, а, допустим, через /proc/bus/usb/001/002?

О том, что устройство сканера располагается в /proc/bus/usb я прочитал вот здесь: http://www.xs4all.nl/%7Eljm/SANE-faq.html#81

Загрузить модуль "scanner" с кодами производителя и продукта я пытался, но modprobe говорил, что не находит такого модуля. Оно вполне законно на ядре 2.6.8. Но вот на ядре 2.4.27 еще не пытался. Надо попробовать.

Хотя, в модуле ли тут дело и в ядре ли? Ведь это устройство работает под вмварью. А вмварь общается с железякой, как я понимаю, через libusb и через ядро?
Parent - Написал(а) cutter Дата 27.11.05 18:50
Попробовал под 2.4.27. Загрузил модуль "scanner", в /etc/sane.d/snapscan.conf добавил /dev/usb/scanner0 bus=usb. Тоже самое, таже ошибка ввода/вывода.
Parent - Написал(а) LOE (Site/forum admin) Дата 28.11.05 05:56 Отредактировано 28.11.05 06:05
К сожалению, сканера у меня нет. Придется цитированием заниматься (все с того-же http://snapscan.sourceforge.net/ )
To correctly install your scanner, you should  detect your scanner device

machine# tools/find-scanner
   find-scanner: found scanner "AGFA SNAPSCAN 310 1.20" at device /dev/XXXXX
if you want your scanner to be recognized easily, create a link.
For USB scanners use:

machine# ln -s /dev/XXXXX /dev/usbscanner
you should now scan using xscanimage

machine$ xscanimage

Что у тебя говорит find-scanner?

И вообще, какой ядро используешь? Самокомпиленное? Или дистрибутивное? Все ли модули скомпилированы?
"No! Try not! Do. Or do not. There is no try." -- Yoda
Parent - Написал(а) cutter Дата 28.11.05 23:43
Так..
localhost:~# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a SCSI driver for your SCSI adapter.
  # Also you need support for SCSI Generic (sg) in your operating system.
  # If using Linux, try "modprobe sg".

found USB scanner (vendor=0x04b8 [EPSON], product=0x0120 [EPSON Scanner]) at libusb:001:007
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

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


> machine# tools/find-scanner


Я не смог найти ``find-scanner''. Наверно, имелось в виду ``sane-find-scanner'', которое есть в архиве с исходниками sane-backends (libsane) tools/sane-find-scanner

Hotplug, судя по всему, выставляет нормальные права на сканнер:

localhost:~# ls -l /proc/bus/usb/001/007
-rw-rw----  1 root scanner 57 2005-11-29 01:57 /proc/bus/usb/001/007


localhost:~# export SANE_DEBUG_SNAPSCAN=4
localhost:~# export SANE_DEBUG_DLL=4
localhost:~# scanimage -L
[sanei_debug] Setting debug level of dll to 4.
[dll] sane_init: SANE dll backend version 1.0.11 from sane-backends 1.0.16-cvs
[dll] add_backend: adding backend `snapscan'
[dll] sane_get_devices
[dll] load: searching backend `snapscan' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-snapscan.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-snapscan.so.1'
[dll] init: initializing backend `snapscan'
[sanei_debug] Setting debug level of snapscan to 4.
[dll] init: backend `snapscan' is version 1.4.42
[dll] sane_get_devices: found 1 devices
device `snapscan:libusb:001:007' is a EPSON EPSON Scanner flatbed scanner
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `snapscan's exit function
[dll] sane_exit: finished

localhost:~# scanimage > image.pnm
[sanei_debug] Setting debug level of dll to 4.
[dll] sane_init: SANE dll backend version 1.0.11 from sane-backends 1.0.16-cvs
[dll] add_backend: adding backend `snapscan'
[dll] sane_get_devices
[dll] load: searching backend `snapscan' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-snapscan.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-snapscan.so.1'
[dll] init: initializing backend `snapscan'
[sanei_debug] Setting debug level of snapscan to 4.
[dll] init: backend `snapscan' is version 1.4.42
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open `snapscan:libusb:001:007'
[snapscan] test_unit_ready: snapscan_cmd command failed: Device busy
вот интересная штука                                                                                       ^^^^^^^^^^^^^^
[snapscan] Scanner warming up - waiting 10 seconds.
[snapscan] test_unit_ready: snapscan_cmd command failed: Device busy
[snapscan] Scanner warming up - waiting 35 seconds.
[dll] sane_open: open successful
[dll] sane_control_option(handle=0x80527b8,option=0,action=0,value=0xbfffe840,info=(nil))
[dll] sane_control_option(handle=0x80527b8,option=0,action=0,value=0xbfffe7a8,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80527b8,option=0)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=1)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=2)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=3)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=4)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=5)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=6)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=7)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=8)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=9)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=10)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=11)
[dll] sane_control_option(handle=0x80527b8,option=11,action=0,value=0x8051438,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80527b8,option=12)
[dll] sane_control_option(handle=0x80527b8,option=12,action=0,value=0x805143c,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80527b8,option=13)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=14)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=15)

[dll] sane_get_option_descriptor(handle=0x80527b8,option=16)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=17)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=18)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=19)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=20)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=21)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=22)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=23)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=24)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=25)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=26)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=27)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=28)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=29)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=30)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=31)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=32)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=33)
[dll] sane_get_option_descriptor(handle=0x80527b8,option=34)
[dll] sane_control_option(handle=0x80527b8,option=9,action=0,value=0xbfffe7a4,info=(nil))
[dll] sane_control_option(handle=0x80527b8,option=10,action=0,value=0xbfffe7a4,info=(nil))
[dll] sane_control_option(handle=0x80527b8,option=9,action=0,value=0xbfffe83c,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80527b8,option=11)
[dll] sane_control_option(handle=0x80527b8,option=11,action=1,value=0xbfffe838,info=0xbfffe7a8)
[dll] sane_control_option(handle=0x80527b8,option=10,action=0,value=0xbfffe83c,info=(nil))
[dll] sane_get_option_descriptor(handle=0x80527b8,option=12)
[dll] sane_control_option(handle=0x80527b8,option=12,action=1,value=0xbfffe838,info=0xbfffe7a8)
[dll] sane_start(handle=0x80527b8)
[snapscan] calibrate: reading calibration data (3 lines)
[snapscan] read_calibration_data: snapscan_cmd command failed: Error during device I/O
[snapscan] calibrate: read_calibration_data command failed: Error during device I/O
[snapscan] sane_snapscan_start: calibration failed.
[snapscan] usb_write Only 0 bytes written

[snapscan] release_unit: scsi command error: Error during device I/O
а причем тут скази интерфейс?
scanimage: sane_start: Error during device I/O
[dll] sane_cancel(handle=0x80527b8)
[snapscan] usb_write Only 0 bytes written
[snapscan] release_unit: scsi command error: Error during device I/O
[snapscan] usb_write Only 0 bytes written
[dll] sane_close(handle=0x80527b8)
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `snapscan's exit function
[dll] sane_exit: finished


> machine# ln -s /dev/XXXXX /dev/usbscanner


Кстати, я так и не понимаю, зачем делать /dev/XXXXX ? :-)

Ядро дистрибутивное 2.6.8. На счет скомпилированных модулей я почти не чего не знаю..
localhost:/lib/modules/2.4.27-2-386# find ./ -iname "*scanner*"
./kernel/drivers/usb/scanner.o
localhost:/lib/modules/2.4.27-2-386# cd ../2.6.8-2-386/; find ./ -iname "*scanner*"
localhost:/lib/modules/2.6.8-2-386#


Можно тоже цитату? :-)  (sane-faq)
With Linux 2.4.* you could either use the kernel scanner module or libusb to access USB scanners. In Linux 2.6.4 the kernel scanner module was removed. Therefore with this and later kernels libusb must be used. While SANE automatically uses libusb when the library and its header file were present during the build of sane-backends, setting permissions will require some attention.

The device files used by libusb are located in /proc/bus/usb/ (e.g. /proc/bus/usb/001/003). The exact file name can be found out by running sane-find-scanner which would print "libusb:001:003" in this case. While setting permissions with e.g. "chmod a+rw /proc/bus/usb/001/003" seems to work, this change is not permanent. The permissions will be reset when the scanner is replugged or Linux is rebooted.


Ладно, торопиться особо не куда, сделаю со временем. А сейчас надо поспать. Вообще, как-то нездорово чувствуешь себя, если спать по 4 часа в сутки.. :-) Ложишься в три, встаешь пол восьмого, надо идти на поезд :-) Продолжим завтра?
Parent - Написал(а) LOE (Site/forum admin) Дата 29.11.05 00:03
Все-же, думаю, что  cat /proc/bus/usb/devices должен вывести нужное имя драйвера.
Иначе, ядро (и утилиты) могут не знать, какую либу тягать для "разговора" со сканером.

К сожалению, за неимением сканера более детально ничего сказать не могу ;(
Если кто даст такой сканер на пару деньков, думаю смогу наладить это дело.

Еще (разве что), попробовать запустить scanimage через strace и посмотреть. какой девайс он на самом деле пытается дернуть.
Может совсем не тот, отсюда и появляется device busy.
"No! Try not! Do. Or do not. There is no try." -- Yoda
Parent - Написал(а) cutter Дата 29.11.05 17:58
Сейчас, что бы еще раз удостовериться в том, что дело не в способе общения sane с устройством (либо через libusb [/proc/bus/usb/XXX/XXX], либо через драйвер ядра scanner [этот метод в man sane-usb использовать не рекомендуется: ``The kernel scanner driver method is deprecated and shouldn't be used anymore. It may be removed from SANE at any time."]) загрузился на ядре 2.4.27.
$ sane-find-scanner
found USB scanner (vendor=0x04b8, product=0x0120) at /dev/usb/scanner0
found USB scanner (vendor=0x04b8 [EPSON], product=0x0120 [EPSON Scanner]) at libusb:001:004


# scanimage -L
device `snapscan:/dev/usb/scanner0' is a EPSON EPSON Scanner flatbed scanner

# cat /proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04b8 ProdID=0120 Rev= 1.10
S:  Manufacturer=EPSON
S:  Product=EPSON Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbscanner
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=16ms

Но вывод scanimage при попытке сканирования - такой же.

Есть подозрение, что дело в usb-хабе на мамке..
Parent Написал(а) cutter Дата 29.11.05 18:12

> Есть подозрение, что дело в usb-хабе на мамке..


Хотя, сам себе противоречу. Ведь под вмварью на 98-ой он работает.
Parent Написал(а) cutter Дата 27.01.06 01:36
Заработал.
Проблема оказалась в калибровке, которую осуществляет сканер перед сканированием.
Есть такая опция у scanimage:
--quality-cal[=(yes|no)] [yes]
        Do a quality white-calibration

Так вот, если ее выключить, т.е. --quality-cal=no, то все работает так, как и должно работать.

$ scanimage -v --mode color --quality-cal=no > image.tiff
scanimage: scanning image of size 3404x3512 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
scanimage: min/max graylevel value = 0/255
scanimage: read 35864544 bytes in total

Если же ее не выключать, то можно сканировать только в градации серого (gray или lineart), при этом качество сканирования - ужасное, по всему изображению вертикальные полосы...

Работает все это дело у меня на версии sane:
$ scanimage --version
scanimage (sane-backends) 1.0.17; backend version 1.0.17


Но, я думаю, что это не принципиально, должно работать и на более ранних версиях (разумеется, версия snapscan >= 1.4), поскольку, если держать опцию --quality-cal включенной, то на последней версии sane-backends ошибки лезут все те же самые, что и на более ранних версиях.

Тему можно считать закрытой. Всем спасибо за внимание.
Предыдущая Следующая Вверх Тема Железо / Настраиваем железки / Epson Perfection 1270 (14098 хитов)

Powered by mwForum 2.12.0 © 1999-2007 Markus Wichitill

Page created in 0.140s with 11 database queries.