[sane-devel] Fix 45-libsane.rules to support Epson V100
I have got a scanner Epson Perfection Photo V100 (which need the proprietary driver Epowka). I have installed it and it works only with root: xsane don't find the scanner when launched with the classical users accounts (tested with two). I have found that the scanner is not included in /etc/udev/rules.d/45-libsane.rules. I have added it and now it works well. A 'diff -u' of the change is joined to this mail. Note that I only do a reference to the 'Epson Perfection V100' in the diff. It seems that the V10 is globally equivalent (due to same driver and the answer of scanimage) but I don't know if they have the same Product ID. If you have questions or comments, please cc me because I have not subscribed to the ml. Stephane. PS: Some infos you could find useful: System : Linux on x86 (32bit) Distro : Ubuntu 7.10 scanimage (sane-backends) 1.0.18-cvs; backend version 1.0.18 The first lines of 45-libsane.rules say: # This file was automatically created based on description files (*.desc) #by sane-desc 3.2 from sane-backends 1.0.18-cvs on Fri Oct 5 15:26:21 2007 Extract of terminal (epowka installed but without modification in 45-libsane.rules : /* * as root: */ # scanimage -L device `epkowa:libusb:003:004' is a Epson Perfection V10/V100 flatbed scanner /* *as user: */ $ 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 kernel SCSI driver for your SCSI adapter. found USB scanner (vendor=0x04b8, product=0x012d) at libusb:003:004 # 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. # You may want to run this program as root to find all devices. Once you # found the scanner devices, be sure to adjust access permissions as # necessary. $ lsusb Bus 003 Device 004: ID 04b8:012d Seiko Epson Corp. Bus 003 Device 001: ID : Bus 002 Device 001: ID : Bus 001 Device 001: ID : $ 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). /* * I modify the file and restart the scanner: */ $ scanimage -L device `epkowa:libusb:003:008' is a Epson Perfection V10/V100 flatbed scanner /* * \o/ yoohooo! */ -- next part -- A non-text attachment was scrubbed... Name: 45-libsane.rules.diff Type: text/x-patch Size: 592 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080206/f3a29ca5/attachment.bin
[sane-devel] Canon LiDE 90
Hello, Pierre Willenbrock a ?crit : Guillaume Gastebois schrieb: Hello, It's a little bit better with these values. In Genesys_Sensor I have : regs_0x08_0x0b : {0x00, 0x21, 0x00, 0x00} regs_0x10_0x1d : {0x02, 0x8b, 0x02, 0x8b, 0x02, 0x8b, 0x20, 0x06, 0x00, 0xff, 0x24, 0x00, 0x00, 0x04} regs_0x52_0x5e : {0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x0a, 0x71, 0x55, 0x00, 0x00, 0x20, 0x41} looks good so far(very few of these can be found in the log after my scripts processed them(bug in my scripts), but then they must be okay when you are able to scan) In Genesys_Gpo I have : {0x02, 0x80}{0x7f, 0xe0} i found these differing settings in your log for register 0x6c: 0x00 0x02 0x0a 0x0e 0x10 0x12 0x18 0x1a 0x38 0x3a 0x3e 0x3c I tryed all these values : 02 : revert video image with a lot of vertical lines 0a : revert video image with a lot of vertical lines and motor doesn't stop at the end of the page 0e, 3e : don't know home position anymore 10, 12, 18, 1a : revert video image seems to be in black and white (no grayscale) but no more vertical images 38, 3a : revert video image in grayscale but take only half of the screen in height. 3c : motor make noise but don't move You can find sample at : http://ggastebois.free.fr/lide90_snoop/toto_18_0_0.jpg http://ggastebois.free.fr/lide90_snoop/toto_38_0_0.jpg these two image are original (just saved in jpg) with x y offset set to 0. How can we explain that images are in reverse video and that with 38 and 3a the image takes only half the place ? Subsidary question : what is the small white (perhaps black) rectangle in the middle up off page (for calibration) ? Regards Guillaume it may be interesting to find out what the effects of these are. and now in Genesys_Frontend : {{0x00, 0x2f, 0x07, 0x26} , {0x00, 0x00, 0x00} , {0x50, 0x50, 0x50} , {0x28, 0x28, 0x28} , {0x0d, 0x00, 0x00} } Looks good. Are these value acceptable regarding my log (http://ggastebois.free.fr/lide90_snoop/UsbSnoop_a4_200dpi.log) ? I very appreciate your help. Regards Guillaume P.S : attached a sample image with my values. Regarding the image: is this with x|y_offset == 0? and are the horizontal bright lines original? Regards, Pierre Pierre Willenbrock a ?crit : Guillaume Gastebois schrieb: OK, but via which register is it programmed. I find nothing in GL842 datasheet for frontend. regards Guillaume the analog frontend is programmed through the serial interface accessed by address registers 0x50(FERDA)/0x51(FEWRA) and data registers 0x46/0x47(FERDDATA)/0x3a/0x3b(FEWRDATA). I find this sequence in your log: R/W ! addr ! data ! WM8199 register +--+---+- W ! 0x04 ! 0x000 ! reset R ! 0x07 ! 0x041 ! revision number, ==0x41 W ! 0x04 ! 0x000 ! reset W ! 0x01 ! 0x02f ! Setup reg 1: mode4==0, pgafs=2, selpd=1, mono=1, cds=1, en=1 W ! 0x02 ! 0x007 ! Setup reg 2: del=0, rlcdacrng=0, 0=0, vrlcext=0, invop=1, muxop=3 W ! 0x03 ! 0x026 ! Setup reg 3: chan=0, cdsref=2, rlcv=6 W ! 0x06 ! 0x00d ! Setup reg 4: fm=0, intm=0, rlcint=1, fme=1, acycnrlc=0, linebyline=1 W ! 0x08 ! 0x000 ! Setup reg 5: 0=0, posnneg=0, vdel=0, vsmpdet=0 W ! 0x20 ! 0x050 ! dac value red(offset value) W ! 0x21 ! 0x050 ! dac value green(offset value) W ! 0x22 ! 0x050 ! dac value blue(offset value) W ! 0x23 ! 0x050 ! dac value rgb(offset value) W ! 0x28 ! 0x028 ! pga gain red(0x28 is a factor of 0.85) W ! 0x29 ! 0x028 ! pga gain green W ! 0x2a ! 0x028 ! pga gain blue W ! 0x2b ! 0x028 ! pga gain rgb all WM81xx(at least where datasheets are available) share a similar register layout, with revision 0x41 at address 7. writing to the rgb variant of pga gain/dac value results in writes to all the color specific registers, so it is not needed. So, you have in Genesys_Frontend: reg[1]=0x2f, reg[2]=0x07, reg[3]=0x26, reg2[0]=0x0d, reg2[1]=0x00, the rest of reg/reg2 =0, all sign[x]=0, offset[x]=0x50, gain[x]=0x28. this does not match anything currently in genesys_devices.c. Just add one entry to the Wolfson array, #define a DAC_ to 7 in genesys_low.h and put that in your Genesys_Model. The gain/offset setting should be good for led calibration and will be replaced by gain/offset calibration. After that, get a scan of the calibration area(the area under the housing at the parking position). For this, put 0 into the x_offset and y_offset in your Genesys_Model. If this turns out to be similar to the calibration area of the lide 50, led/offset/gain-calibration should work with only minor changes. Regards, Pierre
[sane-devel] Fix 45-libsane.rules to support Epson V100
thanks. its already listed in our description files, so it should get a udev rule with the next release of sane. allan On 2/6/08, Stephane Blondon stephane.blondon at gmail.com wrote: I have got a scanner Epson Perfection Photo V100 (which need the proprietary driver Epowka). I have installed it and it works only with root: xsane don't find the scanner when launched with the classical users accounts (tested with two). I have found that the scanner is not included in /etc/udev/rules.d/45-libsane.rules. I have added it and now it works well. A 'diff -u' of the change is joined to this mail. Note that I only do a reference to the 'Epson Perfection V100' in the diff. It seems that the V10 is globally equivalent (due to same driver and the answer of scanimage) but I don't know if they have the same Product ID. If you have questions or comments, please cc me because I have not subscribed to the ml. Stephane. PS: Some infos you could find useful: System : Linux on x86 (32bit) Distro : Ubuntu 7.10 scanimage (sane-backends) 1.0.18-cvs; backend version 1.0.18 The first lines of 45-libsane.rules say: # This file was automatically created based on description files (*.desc) #by sane-desc 3.2 from sane-backends 1.0.18-cvs on Fri Oct 5 15:26:21 2007 Extract of terminal (epowka installed but without modification in 45-libsane.rules : /* * as root: */ # scanimage -L device `epkowa:libusb:003:004' is a Epson Perfection V10/V100 flatbed scanner /* *as user: */ $ 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 kernel SCSI driver for your SCSI adapter. found USB scanner (vendor=0x04b8, product=0x012d) at libusb:003:004 # 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. # You may want to run this program as root to find all devices. Once you # found the scanner devices, be sure to adjust access permissions as # necessary. $ lsusb Bus 003 Device 004: ID 04b8:012d Seiko Epson Corp. Bus 003 Device 001: ID : Bus 002 Device 001: ID : Bus 001 Device 001: ID : $ 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). /* * I modify the file and restart the scanner: */ $ scanimage -L device `epkowa:libusb:003:008' is a Epson Perfection V10/V100 flatbed scanner /* * \o/ yoohooo! */ -- sane-devel mailing list: sane-devel at lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject unsubscribe your_password to sane-devel-request at lists.alioth.debian.org -- The truth is an offense, but not a sin
[sane-devel] Canon LiDE 90
Guillaume Gastebois schrieb: Hello, Pierre Willenbrock a ?crit : Guillaume Gastebois schrieb: Hello, It's a little bit better with these values. In Genesys_Sensor I have : regs_0x08_0x0b : {0x00, 0x21, 0x00, 0x00} regs_0x10_0x1d : {0x02, 0x8b, 0x02, 0x8b, 0x02, 0x8b, 0x20, 0x06, 0x00, 0xff, 0x24, 0x00, 0x00, 0x04} regs_0x52_0x5e : {0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x0a, 0x71, 0x55, 0x00, 0x00, 0x20, 0x41} looks good so far(very few of these can be found in the log after my scripts processed them(bug in my scripts), but then they must be okay when you are able to scan) In Genesys_Gpo I have : {0x02, 0x80}{0x7f, 0xe0} i found these differing settings in your log for register 0x6c: 0x00 0x02 0x0a 0x0e 0x10 0x12 0x18 0x1a 0x38 0x3a 0x3e 0x3c I tryed all these values : 02 : revert video image with a lot of vertical lines 0a : revert video image with a lot of vertical lines and motor doesn't stop at the end of the page 0e, 3e : don't know home position anymore 10, 12, 18, 1a : revert video image seems to be in black and white (no grayscale) but no more vertical images 38, 3a : revert video image in grayscale but take only half of the screen in height. 3c : motor make noise but don't move You can find sample at : http://ggastebois.free.fr/lide90_snoop/toto_18_0_0.jpg http://ggastebois.free.fr/lide90_snoop/toto_38_0_0.jpg these two image are original (just saved in jpg) with x y offset set to 0. How can we explain that images are in reverse video and that with 38 and 3a the image takes only half the place ? I don't know why the image colors are reversed, but it may be worth trying to flip the sign bits in Genesys_Frontend. If that does nothing, we need to handle that in code(or i am missing some setting of the gl841). The other thing you have seen is the half-resolution mode, used for greater speed when doing lower(i.E. not full) resolutions. Subsidary question : what is the small white (perhaps black) rectangle in the middle up off page (for calibration) ? That may be a small metal clamp holding the glass or the calibration strip. That is the black(i.E. white) part at the very top. To summarize, it is a good idea to have bit 4 on, bit 5 is the half resolution switch. I'd put 0x10 into the 0x6c gpio register. As for the calibration area, you will need to change some code: * comment out genesys_gl841.c:4220:(line numbers may differ) status = gl841_feed(dev, 280);/*feed to white strip. canon lide 35 only.*/ * the same for genesys_gl841.c:4821: status = gl841_feed(dev, 280);/*feed to white strip. canon lide 35 only.*/ then you can try what happens when you turn on the led_calibration and the coarse_gain_calibration. offset_calibration needs a bit more changes. i think i am having the code needed lying around somewhere. essentially, the offset calibration needs to be done with leds off. the shading calibration does need even more changes. Additionally, if you can't get the afe to switch the sign, you need to do that in the calibration functions(i.E. 65535-value). Regards, Pierre Regards Guillaume it may be interesting to find out what the effects of these are. and now in Genesys_Frontend : {{0x00, 0x2f, 0x07, 0x26} , {0x00, 0x00, 0x00} , {0x50, 0x50, 0x50} , {0x28, 0x28, 0x28} , {0x0d, 0x00, 0x00} } Looks good. Are these value acceptable regarding my log (http://ggastebois.free.fr/lide90_snoop/UsbSnoop_a4_200dpi.log) ? I very appreciate your help. Regards Guillaume P.S : attached a sample image with my values. Regarding the image: is this with x|y_offset == 0? and are the horizontal bright lines original? Regards, Pierre
[sane-devel] A very fast scanner supported by SANE (maybe Epson GT2500?)
i personally have not used one, and they are quite expensive, but i understand that the Epson Perfection v700 or v750 are quite fast, and are reported to work with SANE. allan On 2/5/08, Alex Bernier alex.bernier at free.fr wrote: Hello, I don't know if it is the right place for this question... I'm blind and I want a very fast scanner supported by SANE, mainly to scan books (it should be very fast for 300-DPI black and white scanning). It's not easy to find information about performances of scanners. On the Epson website, I found the GT2500 which can scan 27 PPM using an ADF. But I don't want to use the ADF... Because I want to scan books, it's more useful for me to know how fast the scanner is when using the flatbed mode. If someone has an Epson GT2500, I would really apreciate if he/she can give me some information about the scanning speed. Or if someone knows about an other very fast scanner, suggestions would be apreciated. For the moment, I own an Epson Perfection 1640SU. It scans a page in 17 seconds, but it is old and I think there is better models now... Regards, Alex Bernier -- sane-devel mailing list: sane-devel at lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject unsubscribe your_password to sane-devel-request at lists.alioth.debian.org -- The truth is an offense, but not a sin
[sane-devel] genesys_gl841.c: infinite loops
Stefan Lucke schrieb: Hi, I guess there are 3 possibilities for infinite loops. Attached patch fixes this and adjusts loop threshold to given comments.. Thanks for spotting these. We have never had a problem with those loops, but it is certainly a good idea to have the code working as the comments in the code suggest. A short test revealed no breakages. I will commit these corrections after the release. Regards, Pierre
[sane-devel] sane reset device everytime
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bonsoir, I have an epson usb scanner and it become recently very slow to use: sane rset the usb device everytime I want to use it; message in log file is this one: usb 5-3: reset high speed USB device using ehci_hcd and address 10 lsusb gives: Bus 005 Device 010: ID 04b8:011f Seiko Epson Corp. Perfection 1670 I am quite astonished because my scanner is perfection 3490 photos And everytime I ask sane to do something (detect, get snapshot, numerize...) the device is reset and it takes hours before getting some scan. Why? And what can I do? Thanks for any help. - -- Fran?ois Patte UFR de math?matiques et informatique Universit? Paris Descartes 45, rue des Saints P?res F-75270 Paris Cedex 06 T?l. +33 (0)1 44 55 35 61 http://www.math-info.univ-paris5.fr/~patte -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHqi71dE6C2dhV2JURAs/eAKCOfUyNedP8p6lWjPsDY4rGgCJ3WACffRLq NEEbkn9MpRPA1QkDZqjFpfc= =F7D1 -END PGP SIGNATURE-
[sane-devel] sane reset device everytime
are you using Fedora 7 or 8 by chance? allan On 2/6/08, Fran?ois Patte francois.patte at math-info.univ-paris5.fr wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bonsoir, I have an epson usb scanner and it become recently very slow to use: sane rset the usb device everytime I want to use it; message in log file is this one: usb 5-3: reset high speed USB device using ehci_hcd and address 10 lsusb gives: Bus 005 Device 010: ID 04b8:011f Seiko Epson Corp. Perfection 1670 I am quite astonished because my scanner is perfection 3490 photos And everytime I ask sane to do something (detect, get snapshot, numerize...) the device is reset and it takes hours before getting some scan. Why? And what can I do? Thanks for any help. - -- Fran?ois Patte UFR de math?matiques et informatique Universit? Paris Descartes 45, rue des Saints P?res F-75270 Paris Cedex 06 T?l. +33 (0)1 44 55 35 61 http://www.math-info.univ-paris5.fr/~patte -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHqi71dE6C2dhV2JURAs/eAKCOfUyNedP8p6lWjPsDY4rGgCJ3WACffRLq NEEbkn9MpRPA1QkDZqjFpfc= =F7D1 -END PGP SIGNATURE- -- sane-devel mailing list: sane-devel at lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject unsubscribe your_password to sane-devel-request at lists.alioth.debian.org -- The truth is an offense, but not a sin
[sane-devel] Canon LiDE 80 (2nd try)
On Tuesday 05 February 2008, Stefan Lucke wrote: Hi, I've seen there is some progress on lide 90 and I want to step in and like to ask if there could be done something for my LiDE 80 too. I cloned the canon_lide_60_model entry -- scanimage with debug messages : -- [sanei_debug] Setting debug level of genesys to 255. [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs [genesys] sane_init: authorize != null [genesys] sane_init: little endian machine [genesys] sane_init: reading config file `genesys.conf' [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214' .. [genesys_gl841] gl841_bulk_write_register (elems = 104) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 -- I modified this, debug message is written before ..bulk_write..() . -- [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument scanimage: open of device genesys:libusb:001:017 failed: Invalid argument [genesys] sane_exit: start [genesys] sane_exit: exit Some further info: I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ . During my search in the list history, I found a test program in this mail: http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html Using the following stripped down version of usbsnoop-300dpi_color.c, helped to get rid of the sudden disconnect from below. -- snip -- set_write_register(0x6b, 0x0c); set_write_register(0x06, 0x10); -- snip -- Both lines are required! (Note: disconnect has timestamp earlier than USBDEVFS message). Even with turned off LED and some motor sound (movement in the wrong direction ??), scanimage produced some pnm files. To be continued, but I really need some help, as I've no idea about scanner hardware. -- dmesg output (kernel 2.6.23.13): -- [ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 17 [ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0) [ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice [ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 rq 4 len 2 ret -71 [ 5312.035148] usb 1-7: USB disconnect, address 17 [ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 18 [ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0) [ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice -- Stefan Lucke
[sane-devel] HP 4890
Hello, I would like to use my Hewlett Packard ScanJet 4890 with Linux. I am a programmer so I could try to write a driver. I have learned from the SANE web site that this scanner uses the GL843 chip and maybe the genesys backend could be extended. The specification for the GL843 chip is available on the Genesys web site. Now I need information about the connected hardware inside the scanner like motor or ccd. Has anybody an idea where to get these information? Marco _ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071distributionid=0066
[sane-devel] HP 4890
On Wednesday 06 February 2008 08:01:43 marco-sass at web.de wrote: Hello, I would like to use my Hewlett Packard ScanJet 4890 with Linux. I am a programmer so I could try to write a driver. I have learned from the SANE web site that this scanner uses the GL843 chip and maybe the genesys backend could be extended. The specification for the GL843 chip is available on the Genesys web site. Now I need information about the connected hardware inside the scanner like motor or ccd. Has anybody an idea where to get these information? Connect the device to a windoze box and grab the USB-traffic (usbsnoop and friends - http://www.pcausa.com/Utilities/UsbSnoop/default.htm). Checkout Stefs page for some more hints (it's for the GL646, but a good start) HTH Gerhard
[sane-devel] Canon LiDE 80 (2nd try)
Am Wednesday, 6. February 2008 schrieb Stefan Lucke: Even with turned off LED and some motor sound (movement in the wrong direction ??), scanimage produced some pnm files. To be continued, but I really need some help, as I've no idea about scanner hardware. Hi, I played around some time ago with the LiDE 80. IIRC I got the motor working by adjusting its base resolution (2400 instead of 1200 or something). But I'm not shure it it was the only thing. Regards, Reinhard Biegel
[sane-devel] Canon LiDE 80 (2nd try)
Hi Stefan, (more text inline) Stefan Lucke schrieb: On Tuesday 05 February 2008, Stefan Lucke wrote: Hi, I've seen there is some progress on lide 90 and I want to step in and like to ask if there could be done something for my LiDE 80 too. I cloned the canon_lide_60_model entry -- scanimage with debug messages : -- [sanei_debug] Setting debug level of genesys to 255. [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs [genesys] sane_init: authorize != null [genesys] sane_init: little endian machine [genesys] sane_init: reading config file `genesys.conf' [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214' .. [genesys_gl841] gl841_bulk_write_register (elems = 104) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 -- I modified this, debug message is written before ..bulk_write..() . -- [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument scanimage: open of device genesys:libusb:001:017 failed: Invalid argument [genesys] sane_exit: start [genesys] sane_exit: exit Some further info: I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ . During my search in the list history, I found a test program in this mail: http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html I must admit, i totally forgot about that.. lectures where starting at that time at my university. Using the following stripped down version of usbsnoop-300dpi_color.c, helped to get rid of the sudden disconnect from below. -- snip -- set_write_register(0x6b, 0x0c); set_write_register(0x06, 0x10); first, try if either of the following is enough to get past writing register 0x06: set_write_register(0x6b, 0x08); set_write_register(0x6b, 0x04); put that write to 0x6b into gl841_init, before the /* Write initial registers */, and make sure the other places where 0x6b is written preserve the needed bits. That may get scanimage to o further with a freshly plugged in scanner. Regards, Pierre -- snip -- Both lines are required! (Note: disconnect has timestamp earlier than USBDEVFS message). Even with turned off LED and some motor sound (movement in the wrong direction ??), scanimage produced some pnm files. To be continued, but I really need some help, as I've no idea about scanner hardware. -- dmesg output (kernel 2.6.23.13): -- [ 5298.424302] usb 1-7: new high speed USB device using ehci_hcd and address 17 [ 5298.480244] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0) [ 5298.491202] usb 1-7: configuration #1 chosen from 1 choice [ 5312.035169] usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd scanimage rqt 64 rq 4 len 2 ret -71 [ 5312.035148] usb 1-7: USB disconnect, address 17 [ 5312.188163] usb 1-7: new high speed USB device using ehci_hcd and address 18 [ 5312.244105] usb 1-7: OK: device descriptor read/64, error 0, mp 64 (0 0) [ 5312.255079] usb 1-7: configuration #1 chosen from 1 choice
[sane-devel] Canon LiDE 90
Guillaume Gastebois schrieb: Hello, It's a little bit better with these values. In Genesys_Sensor I have : regs_0x08_0x0b : {0x00, 0x21, 0x00, 0x00} regs_0x10_0x1d : {0x02, 0x8b, 0x02, 0x8b, 0x02, 0x8b, 0x20, 0x06, 0x00, 0xff, 0x24, 0x00, 0x00, 0x04} regs_0x52_0x5e : {0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x0a, 0x71, 0x55, 0x00, 0x00, 0x20, 0x41} looks good so far(very few of these can be found in the log after my scripts processed them(bug in my scripts), but then they must be okay when you are able to scan) In Genesys_Gpo I have : {0x02, 0x80}{0x7f, 0xe0} i found these differing settings in your log for register 0x6c: 0x00 0x02 0x0a 0x0e 0x10 0x12 0x18 0x1a 0x38 0x3a 0x3e 0x3c it may be interesting to find out what the effects of these are. and now in Genesys_Frontend : {{0x00, 0x2f, 0x07, 0x26} , {0x00, 0x00, 0x00} , {0x50, 0x50, 0x50} , {0x28, 0x28, 0x28} , {0x0d, 0x00, 0x00} } Looks good. Are these value acceptable regarding my log (http://ggastebois.free.fr/lide90_snoop/UsbSnoop_a4_200dpi.log) ? I very appreciate your help. Regards Guillaume P.S : attached a sample image with my values. Regarding the image: is this with x|y_offset == 0? and are the horizontal bright lines original? Regards, Pierre Pierre Willenbrock a ?crit : Guillaume Gastebois schrieb: OK, but via which register is it programmed. I find nothing in GL842 datasheet for frontend. regards Guillaume the analog frontend is programmed through the serial interface accessed by address registers 0x50(FERDA)/0x51(FEWRA) and data registers 0x46/0x47(FERDDATA)/0x3a/0x3b(FEWRDATA). I find this sequence in your log: R/W ! addr ! data ! WM8199 register +--+---+- W ! 0x04 ! 0x000 ! reset R ! 0x07 ! 0x041 ! revision number, ==0x41 W ! 0x04 ! 0x000 ! reset W ! 0x01 ! 0x02f ! Setup reg 1: mode4==0, pgafs=2, selpd=1, mono=1, cds=1, en=1 W ! 0x02 ! 0x007 ! Setup reg 2: del=0, rlcdacrng=0, 0=0, vrlcext=0, invop=1, muxop=3 W ! 0x03 ! 0x026 ! Setup reg 3: chan=0, cdsref=2, rlcv=6 W ! 0x06 ! 0x00d ! Setup reg 4: fm=0, intm=0, rlcint=1, fme=1, acycnrlc=0, linebyline=1 W ! 0x08 ! 0x000 ! Setup reg 5: 0=0, posnneg=0, vdel=0, vsmpdet=0 W ! 0x20 ! 0x050 ! dac value red(offset value) W ! 0x21 ! 0x050 ! dac value green(offset value) W ! 0x22 ! 0x050 ! dac value blue(offset value) W ! 0x23 ! 0x050 ! dac value rgb(offset value) W ! 0x28 ! 0x028 ! pga gain red(0x28 is a factor of 0.85) W ! 0x29 ! 0x028 ! pga gain green W ! 0x2a ! 0x028 ! pga gain blue W ! 0x2b ! 0x028 ! pga gain rgb all WM81xx(at least where datasheets are available) share a similar register layout, with revision 0x41 at address 7. writing to the rgb variant of pga gain/dac value results in writes to all the color specific registers, so it is not needed. So, you have in Genesys_Frontend: reg[1]=0x2f, reg[2]=0x07, reg[3]=0x26, reg2[0]=0x0d, reg2[1]=0x00, the rest of reg/reg2 =0, all sign[x]=0, offset[x]=0x50, gain[x]=0x28. this does not match anything currently in genesys_devices.c. Just add one entry to the Wolfson array, #define a DAC_ to 7 in genesys_low.h and put that in your Genesys_Model. The gain/offset setting should be good for led calibration and will be replaced by gain/offset calibration. After that, get a scan of the calibration area(the area under the housing at the parking position). For this, put 0 into the x_offset and y_offset in your Genesys_Model. If this turns out to be similar to the calibration area of the lide 50, led/offset/gain-calibration should work with only minor changes. Regards, Pierre
[sane-devel] Canon LiDE 80 (2nd try)
On Wednesday 06 February 2008, Reinhard Biegel wrote: Am Wednesday, 6. February 2008 schrieb Stefan Lucke: Even with turned off LED and some motor sound (movement in the wrong direction ??), scanimage produced some pnm files. To be continued, but I really need some help, as I've no idea about scanner hardware. Hi, I played around some time ago with the LiDE 80. IIRC I got the motor working by adjusting its base resolution (2400 instead of 1200 or something). But I'm not shure it it was the only thing. Thanks for your reply. Do you have some old sources of your changes ? Playing with motor settings doesn't make a difference (at the moment). -- Stefan Lucke
[sane-devel] Canon LiDE 80 (2nd try)
On Wednesday 06 February 2008, Pierre Willenbrock wrote: Hi Stefan, (more text inline) Stefan Lucke schrieb: On Tuesday 05 February 2008, Stefan Lucke wrote: Hi, I've seen there is some progress on lide 90 and I want to step in and like to ask if there could be done something for my LiDE 80 too. I cloned the canon_lide_60_model entry -- scanimage with debug messages : -- [sanei_debug] Setting debug level of genesys to 255. [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs [genesys] sane_init: authorize != null [genesys] sane_init: little endian machine [genesys] sane_init: reading config file `genesys.conf' [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214' .. [genesys_gl841] gl841_bulk_write_register (elems = 104) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 -- I modified this, debug message is written before ..bulk_write..() . -- [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument scanimage: open of device genesys:libusb:001:017 failed: Invalid argument [genesys] sane_exit: start [genesys] sane_exit: exit Some further info: I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ . During my search in the list history, I found a test program in this mail: http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html I must admit, i totally forgot about that.. lectures where starting at that time at my university. Using the following stripped down version of usbsnoop-300dpi_color.c, helped to get rid of the sudden disconnect from below. -- snip -- set_write_register(0x6b, 0x0c); set_write_register(0x06, 0x10); first, try if either of the following is enough to get past writing register 0x06: set_write_register(0x6b, 0x08); set_write_register(0x6b, 0x04); put that write to 0x6b into gl841_init, before the /* Write initial registers */, and make sure the other places where 0x6b is written preserve the needed bits. That may get scanimage to o further with a freshly plugged in scanner. A: set_write_register(0x6b, 0x08); with and without preserving reg_0x6b: There is a small audible motor sound, but no movement. Windows driver does a small forward , backward movement of scan head. [genesys] sanei_genesys_write_register (0x0e, 0x00) completed [genesys] sanei_genesys_write_register (0x6b, 0x08) completed [genesys_gl841] gl841_bulk_write_register (size = 208) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 [genesys_gl841] reg[0x07] = 0x00 [genesys_gl841] reg[0x08] = 0x00 .. [genesys_gl841] reg[0x6a] = 0x00 [genesys_gl841] reg[0x6c] = 0x00 .. [genesys] sanei_genesys_write_register (0x0f, 0x01) completed [genesys] sanei_genesys_read_register (0x41, 0xd1) completed [genesys] sanei_genesys_read_register (0x41, 0xd1) completed B: set_write_register(0x6b, 0x04); - one time with preserving 0x6b - as A: - one time _bulk_write_ up to reg[0x06] - this time: [genesys] sanei_genesys_write_register (0x6b, 0x04) completed [genesys_gl841] gl841_bulk_write_register (size = 208) .. [genesys_gl841] reg[0x06] = 0x18 [genesys_gl841] reg[0x07] = 0x00 [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument I'm wondering of the effects of playing with bit 2 and 3 of register 0x6b. According to my spec of gl841 vers. 1.7 p 42,43 bit 0 and 1 and for GPO 17 18, bit 2 3 are reserved ;-) . -- Stefan Lucke
[sane-devel] Canon LiDE 80 (2nd try)
Am Wednesday, 6. February 2008 schrieb Stefan Lucke: Do you have some old sources of your changes ? Playing with motor settings doesn't make a difference (at the moment). Sorry, I trashed the sources because I messed something up and then nothing was working any more. I planed to start over again but had no time to do so. As far as I remember I simply set the registers as it is done by the windows driver after pluggin in the scanner and then I replaced them step by step with existing sane calls. Ohi just remember there was something that had to be called at any price but didn't find any documentation about that. I'm going to look for that in my logs. Regards, Reinhard
[sane-devel] Canon LiDE 80 (2nd try)
Stefan Lucke schrieb: On Wednesday 06 February 2008, Pierre Willenbrock wrote: Hi Stefan, (more text inline) Stefan Lucke schrieb: On Tuesday 05 February 2008, Stefan Lucke wrote: Hi, I've seen there is some progress on lide 90 and I want to step in and like to ask if there could be done something for my LiDE 80 too. I cloned the canon_lide_60_model entry -- scanimage with debug messages : -- [sanei_debug] Setting debug level of genesys to 255. [genesys] SANE Genesys backend version 1.0 build 9 from sane-backends 1.0.18-cvs [genesys] sane_init: authorize != null [genesys] sane_init: little endian machine [genesys] sane_init: reading config file `genesys.conf' [genesys] sane_init: config file line 1: trying to attach `usb 0x04a9 0x2214' .. [genesys_gl841] gl841_bulk_write_register (elems = 104) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 -- I modified this, debug message is written before ..bulk_write..() . -- [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument scanimage: open of device genesys:libusb:001:017 failed: Invalid argument [genesys] sane_exit: start [genesys] sane_exit: exit Some further info: I placed some win98 logfiles at http://lucke.in-berlin.de/lide-80/ . During my search in the list history, I found a test program in this mail: http://lists.alioth.debian.org/pipermail/sane-devel/2006-October/017930.html I must admit, i totally forgot about that.. lectures where starting at that time at my university. Using the following stripped down version of usbsnoop-300dpi_color.c, helped to get rid of the sudden disconnect from below. -- snip -- set_write_register(0x6b, 0x0c); set_write_register(0x06, 0x10); first, try if either of the following is enough to get past writing register 0x06: set_write_register(0x6b, 0x08); set_write_register(0x6b, 0x04); put that write to 0x6b into gl841_init, before the /* Write initial registers */, and make sure the other places where 0x6b is written preserve the needed bits. That may get scanimage to o further with a freshly plugged in scanner. A: set_write_register(0x6b, 0x08); with and without preserving reg_0x6b: There is a small audible motor sound, but no movement. Windows driver does a small forward , backward movement of scan head. [genesys] sanei_genesys_write_register (0x0e, 0x00) completed [genesys] sanei_genesys_write_register (0x6b, 0x08) completed [genesys_gl841] gl841_bulk_write_register (size = 208) [genesys_gl841] reg[0x01] = 0xa0 [genesys_gl841] reg[0x02] = 0x38 [genesys_gl841] reg[0x03] = 0x5f [genesys_gl841] reg[0x04] = 0x10 [genesys_gl841] reg[0x05] = 0x40 [genesys_gl841] reg[0x06] = 0x18 [genesys_gl841] reg[0x07] = 0x00 [genesys_gl841] reg[0x08] = 0x00 .. [genesys_gl841] reg[0x6a] = 0x00 [genesys_gl841] reg[0x6c] = 0x00 .. [genesys] sanei_genesys_write_register (0x0f, 0x01) completed [genesys] sanei_genesys_read_register (0x41, 0xd1) completed [genesys] sanei_genesys_read_register (0x41, 0xd1) completed B: set_write_register(0x6b, 0x04); - one time with preserving 0x6b - as A: - one time _bulk_write_ up to reg[0x06] - this time: [genesys] sanei_genesys_write_register (0x6b, 0x04) completed [genesys_gl841] gl841_bulk_write_register (size = 208) .. [genesys_gl841] reg[0x06] = 0x18 [genesys_gl841] reg[0x07] = 0x00 [genesys_gl841] gl841_bulk_write_register: failed while writing command: Invalid argument I'm wondering of the effects of playing with bit 2 and 3 of register 0x6b. According to my spec of gl841 vers. 1.7 p 42,43 bit 0 and 1 and for GPO 17 18, bit 2 3 are reserved ;-) . It may be possible to control gpo19/20 there, which may map to MT(R)_4/5, similar to how gpo17/18 map to MT(R)_6/7. I don't see how the gl841/2 determines what function is to control the MT(R)_6/7, another possible job for bit 2/3. The behavior regarding these pins seems to be not very well documented in the public datasheets. Regards, Pierre
[sane-devel] genesys_gl841.c: infinite loops
Hi, I guess there are 3 possibilities for infinite loops. Attached patch fixes this and adjusts loop threshold to given comments.. -- Stefan Lucke -- next part -- Index: backend/genesys_gl841.c === RCS file: /cvsroot/sane/sane-backends/backend/genesys_gl841.c,v retrieving revision 1.19 diff -U 3 -r1.19 genesys_gl841.c --- backend/genesys_gl841.c 3 Feb 2008 10:34:20 - 1.19 +++ backend/genesys_gl841.c 6 Feb 2008 18:29:28 - @@ -3434,7 +3438,7 @@ return status; } - while (loop 3) /* do not wait longer then 30 seconds */ + while (loop 300) /* do not wait longer then 30 seconds */ { status = sanei_genesys_get_status (dev, val); if (status != SANE_STATUS_GOOD) @@ -3452,6 +3456,7 @@ return SANE_STATUS_GOOD; } usleep (10); /* sleep 100 ms */ + ++loop; } /* when we come here then the scanner needed too much time for this, so we better stop the motor */ @@ -3579,7 +3584,7 @@ { int loop = 0; - while (loop 3) /* do not wait longer then 30 seconds */ + while (loop 300) /* do not wait longer then 30 seconds */ { status = sanei_genesys_get_status (dev, val); if (status != SANE_STATUS_GOOD) @@ -3598,6 +3603,7 @@ return SANE_STATUS_GOOD; } usleep (10); /* sleep 100 ms */ + ++loop; } /* when we come here then the scanner needed too much time for this, so we better stop the motor */ @@ -3729,6 +3735,7 @@ } } usleep (10); + ++loop; } } else { DBG (DBG_info,