[sane-devel] Epson 4990 / v700 Lamp Shut-off

2008-08-25 Thread Gerald Murray
 I have been working with the epson2 backend for some time now

 Does anybody know of any command(s) that will
 allow me to turn off the scanner's lamps earlier than this?

# For cooperating backends:
scanimage -n 1

Gerald




[sane-devel] Making Canon CanoScan LiDE 80 work (in Ubuntu)

2008-03-21 Thread Gerald Murray
Quoting JC ubunt2 at gmail.com:

 Scanner is on a USB connection.
 USB ID: 0x04a9/0x2214
 Status: Unsupported
 Comment: GL841 based, to be added to genesys backend


  My question is: How do i run this backend thing? And will running
 that backend work?

Doubts exist on working because the Holtek sensor is not coded in the  
genesys_devices.c file.
I believe there is some documentation on a Holtek sensor, though.

  Or, ultimately, what will make this printer work?

A developer would have to code the sensor.  There would have to be  
some testing with that device.  As yet, no volunteer...

  Will using the latest daily snapshot help?

no


  Thanks! __

Gerald






[sane-devel] sane-backends-1.0.19.tar.gz.md5 incorrect ?

2008-02-11 Thread Gerald Murray
Hello all,

sane-backends-1.0.19.tar.gz.md5 file was expected to be 62 bytes; but  
downloads as 87977 bytes
This needs correction.  The commands I executed are shown below.

Thanks

Gerald

What the download page at http://alioth.debian.org/frs/?group_id=30186 says
  sane-backends-1.0.19.tar.gz.md5  62 bytes  0 Any Other

% ls -l sane-backends-1.0.19.tar.gz.md5
-rw-r--r-- 1 gerald gerald 87977 2008-02-11 00:19  
sane-backends-1.0.19.tar.gz.md5

% file sane-backends-1.0.19.tar.gz.md5
sane-backends-1.0.19.tar.gz.md5: gzip compressed data, was  
sane-backends-1.0.18-1.0.19.dif, from Unix, last modified: Sun Feb  
10 17:57:05 2008






[sane-devel] sane-backends-1.0.19.tar.gz.md5 incorrect ?

2008-02-11 Thread Gerald Murray
Quoting m. allan noah kitno455 at gmail.com:

 unable to reproduce. can you try again?

 allan

Hello Allan,
I tried again today, using the http mirror for the United States.  It  
downloaded as the diff file.
I also check some other mirrors, and 1.0.19 has not been propagated to  
them for update.

% ls -l sane-backends-1.0.19.tar.gz.md5
-rw-r--r-- 1 gerald gerald 1245399 2008-02-11 11:01  
sane-backends-1.0.19.tar.gz.md5

I got the md5sums off of the sane site, and it does check OK with the  
1.0.19 package.
The problem seems to be limited to this one http mirror, so far.

Gerald

 On 2/11/08, Gerald Murray gmurray at cloudnet.com wrote:
 Hello all,

 sane-backends-1.0.19.tar.gz.md5 file was expected to be 62 bytes; but
 downloads as 87977 bytes
 This needs correction.  The commands I executed are shown below.

 Thanks

 Gerald

 What the download page at http://alioth.debian.org/frs/?group_id=30186 says
   sane-backends-1.0.19.tar.gz.md5  62 bytes  0 Any Other

 % ls -l sane-backends-1.0.19.tar.gz.md5
 -rw-r--r-- 1 gerald gerald 87977 2008-02-11 00:19
 sane-backends-1.0.19.tar.gz.md5

 % file sane-backends-1.0.19.tar.gz.md5
 sane-backends-1.0.19.tar.gz.md5: gzip compressed data, was
 sane-backends-1.0.18-1.0.19.dif, from Unix, last modified: Sun Feb
 10 17:57:05 2008







[sane-devel] Canon CanoScan LiDE 600F

2008-01-03 Thread Gerald Murray
Quoting J?rgen Ernst jrernst at gmx.de:
  Canon CanoScan LiDE 600F.
 Is anyone working on a backend to that scanner yet?

 If not I want to start programming a backend.

 Ciao
 J?rgen

There is no one working on adding this scanner as of yet, so welcome!

There is a lot of information on the sane site about starting.
The chips for the LiDE 600F are known, but are not known to be
compatible with sane-supported chips.  A good start would be to
complete a small scan with a usb sniffer to log the traffic on the usb bus for
that device, and make the scan log available for interested persons to view.
That may allow identification of the protocol.

Gerald




[sane-devel] Pentax DSmobile 600

2007-10-11 Thread Gerald Murray
Quoting Lukas Matasovsky lukasm at lumat.at:

--snip--
 If there's no Lx driver on the CD, I'll ask Pentaxtech to provide one but as
 this page seems not to be linked to the main site anymore I have my
 doubts 
--snip--
 - Lukas

Lukas,
Perhaps  you could answer a question on the source that is said to be  
on the CD.

CD includes Twain Data Source

- does this mean that the Twain driver source is provided ? OR
- does this mean that the data source is provided, which is useful for  
a Twain driver?

Gerald





[sane-devel] HP scanjet 2400

2007-09-11 Thread Gerald Murray
Quoting Emmanuel Counasse manuc66 at gmail.com:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,

 Could you explain me what things in sane driver are really missing
 for supporting hp scanjet 2400 and what to do to add them ?

 Thanks

 St?phane VOLTZ a ?crit :
 Le lundi 12 f?vrier 2007, Emmanuel Counasse a ?crit :
 Hi,

 I have activated debug information and attached to this mail the output of
 :

 scanimage -d genesys:libusb:001:005 2 debug.txt
 (see : http://www.sharebigfile.com/file/80076/debug-tar-bz2.html)

 The scanner has start its motor (make noise) but did not do anything, so
 I decided to stop scanimage by pressing CTRL+C because I don't want to
 damage my scanner's motor.

 What do you think about it ?

 You proposed me to send me scripts, documentation and log, in think it
 xould be ionteresting to look inside so you can send me them in private,
 thanks.

 Best regards.

 Hello,

 thanks for the data. I'll have it a look this week. I'll also post
 updated
 information. Meanwhile, you may have a look at the code via tools such as
 kscope to find all the occurences of the *_HP2300 defines where you'll
 have
 to modify code to handle the HP2400.

 Regards,
 Stef




 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFG5i7ukTdjIxOkTk8RAm3+AJ9PSPcnDEQBer7gWz1rpVr4hv5R4ACdEFIg
 iuNOg4B8HE2e+tg9uiOCLfM=
 =TTK4
 -END PGP SIGNATURE-








[sane-devel] HP scanjet 2400

2007-09-11 Thread Gerald Murray
Quoting Emmanuel Counasse manuc66 at gmail.com:

 Hi,

 Could you explain me what things in sane driver are really missing
 for supporting hp scanjet 2400 and what to do to add them ?


Hello Emmanuel,
I have not worked on this for quite some time.  It has never been  
functional for
the scanjet.  Currently the scan will start, and try to travel beyond  
end of the
scanner.  I keep control of the power and stop it before it does any damage or
noises.  I have not looked at the *.pnm file to see if the scanned  
data is correct.
I will pick up the effort again soon, but my time is limited.  So far  
as I know,
there is nothing _missing_, just need to tweak the code already there to work
correctly.

Gerald




[sane-devel] Will the CanonScan 3000 Series be supported?

2007-09-09 Thread Gerald Murray
Hi,
I also looked at the logs, and found too many registers over the 0x71, the
highest number for gl646.  There were accesses to 0xb0 thru 0xbd and  
0xc1 thru 0xc8.
These were curious in that they were numbered non-sequentially over 0xa8,
the highest sequential register I noticed.
I have no ideas about the chipset.

Gerald






[sane-devel] Trying to understand GL640

2007-08-10 Thread Gerald Murray

The enum is probably from a different datasheet, possibly an earlier
hardware version?

A USB control message has an 8 byte setup packet with format
   byte requesttype,
   byte request,
   word value,
   word index,
   word length,
   .. remainder of packet, if any, follows

The value shown in the enum is the value to be inserted into the word value
field above when sending a USB control message.
In the backend canon630u-common.c function gl640WriteControl uses
that enum value and inserts it into the field value and sends the USB
control message.

I did not see the USB control message discussed in that .pdf.
Do not confuse that enum and its values with the General Purpose
Registers (which actually exist in hardware) on page 10.
The USB control message is a structure of data bytes which
are in transport to/from host/device; it does not have hardware
registers.

regards,
Gerald





[sane-devel] canon lide 600f support

2007-08-07 Thread Gerald Murray
Hello Sapir,

No sane support is in development currently.
The chipset is unknown; see  
http://www.sane-project.org/unsupported/canon-lide-600.html

Support is usually initiated by a developer creating additional  
backend code, and then
maintaining that.  An invitation to develop is available...

Gerald





[sane-devel] canon lide 600f support

2007-08-07 Thread Gerald Murray

 I don't know how to write a backend. ;-(
 How can I help to find out which chipset it uses?

see:
http://www.sane-project.org/contrib.html
which provides some tips to look within the documentation/drivers  
supplied with the scanner.

When there is a lack of documentation about a scanner, the person who  
chooses to develop
might use some scans from an OS that does have a working scanner  
driver.  The usb bus
spy program (usbsnoopy) logs the commands and replies that are on the bus
Then for each type of scan resolution, the commands must be created to  
duplicate
those commands.  The process is quite long and involved for the developer.
Many scanners have backends from this technique.

If you do find a developer, (s)he should post progress to this  
sane-devel list.

regards,

Gerald





[sane-devel] HP 4890 - Anybody working on it?

2007-08-02 Thread Gerald Murray
There is work already done as far as the genesys backend is concerned.
The other part remaining is specific to the GL843 chip.  The work can be
estimated, as the GL841 backend is working, the GL646 backend is in
progress, and anything else - GL843 - is a TODO.

An invitation to a developer is available.

regards,
Gerald








[sane-devel] libusb and sane backend

2007-08-02 Thread Gerald Murray

 however, the backend doesn't work, the port aparently opens well, but
 the calls to usb_get_descriptor, usb_control_msg never return.
 Any one knows if there is any -bad- interaction between calling
 directly libusb and other sane libraries?

This is dependent on the individual scanner.  When the protocol is
vendor-defined, the vendor can choose to ignore the USB_STANDARD
requirements (as one Canon scanner does).  The protocol then must be
discovered through a scan observer program such as usbsnoopy.

If you are using linux, usually the information needed about the scanner
is available in /proc/bus/usb/devices for that device.  You may not need
the separate usb functions for this information.

It is sometimes possible to have access by a usb_claim_interface(), (skip
set configuration).  You might attempt to read the status register through
a register read for that chip.  You will have to find the command that does
respond, as the usb_control_msg or equivalent vendor command is necessary.

regards,
Gerald





[sane-devel] HP ScanJet 2400

2007-07-17 Thread Gerald Murray
Known problem, same result.  The genesys646 backend has never been working
as far as I know.  This backend should be considered experimental for  
the gl646
scanner.

Gerald





[sane-devel] Canon CanoScan LiDE 70 chips?

2007-07-08 Thread Gerald Murray

There certainly are times when it is beneficial to know the
chipset.  That is limited to chips that have documentation
available, (which is less than all scaner chips).

There is another method of developing a usable driver for scanners.
That involves having an OS upon which it does work, then monitoring
the usb bus for each different setting.  Then that bus log is to be
converted into useable source instructions.  The tool used is usually
usbsnoopy.

There is no way to tell when in the future a driver can be made
available.  Someone needs to step up and begin a long, difficult
endeavor.  The driver is only available when it is done.
And some who start the effort do not complete the journey.

As far as I know, no one has yet committed to developing for the
LiDE 70.

Good luck on your search.

Gerald





[sane-devel] LSB DDK: Support for scanner drivers/SANE into LSB 3.2?

2007-06-26 Thread Gerald Murray

 Ren? Rebe wrote:

 I take a look into what is necessary to get SANE into the LSB over
 the weekend.


 Did you already find out something?

Hi Till,
I took a quick look.  It looks like the lsb project wants headers
--stripped of all comments and programmer remarks;
the library would be empty functions, as 'basic' as possible.

Possibly headers: sane.h, saneopts.h would be enough, as
lsb tools would only test for the presence of sane, so none of
the libraries in /usr/lib/sane/* would be tested?
/usr/lib/libsane.so would be the basic library.

Does the lsb project expect some testing code to be written?
What tests would be needed, or expected, if any?

Regards,
Gerald





[sane-devel] md5 Buffer Error

2007-06-20 Thread Gerald Murray

 /home/User/sane-backends/frontend/scanimage.c:291: undefined reference
to `_md5_buffer'

There should be two leading underscores before md5_buffer.
This is resolved in the frontend/Makefile by $(LIBLIB)
which links lib/liblib.a   Header is include/md5.h

Perhaps the compiler/linker being used has a problem with
two leading underscores?   Or not using the frontend/Makefile?

Regards,
Gerald





[sane-devel] Canon Canoscan 3000ex

2007-06-16 Thread Gerald Murray
REPOST (original lost in transit?)

 How can I start to write a backend?
Hello, welcome!

read:
sane-backends-1.0.18/doc/backend-writing.txt
http://www.xs4all.nl/~ljm/SANE-faq.html

what is known about the scanner  documentation is in
http://www.sane-project.org/unsupported/canon-3000.html

good luck with your effort.

regards,
Gerald






[sane-devel] Fnctl Functions

2007-06-12 Thread Gerald Murray

 sanei_usb.c: In function `sanei_usb_open':
 sanei_usb.c:1049: warning: implicit declaration of function `fcntl'
 sanei_usb.c:1049: error: `F_GETFL' undeclared (first use in this function)
^ typo
 sanei_usb.c:1049: error: (Each undeclared identifier is reported only once
 sanei_usb.c:1049: error: for each function it appears in.)
 sanei_usb.c:1052: error: `F_SETFD' undeclared (first use in this function)
 sanei_usb.c:1052: error: `FD_CLOEXEC' undeclared (first use in this function)


Be sure that your Makefile includes -I/usr/include in its flags
(check your platform ( MinGW?) for similar dependencies)
On linux all are included in normal Makefile.  Mine are:

sanei_usb.c:
#include fcntl.h

/usr/include/fcntl.h:
#include bits/fcntl.h

/usr/include/bits/fcntl.h:
#ifndef _FCNTL_H
# error Never use bits/fcntl.h directly; include fcntl.h instead.
#endif
..
#define F_GETFD   1 /* Get file descriptor flags.  */
#define F_SETFD   2 /* Set file descriptor flags.  */
..
#define FD_CLOEXEC  1 /* actually anything with low bit set goes */

regards,
Gerald





[sane-devel] Sane-Find-Scanner Detects Mouse

2007-05-20 Thread Gerald Murray
Quoting Hugh McMaster dasjournal at gmail.com:

 Hi everyone,

 I just ran the sane-find-scanner command on my computer, and I noticed
 that in the verbose output, the programme detected my USB mouse.

 I assume that is would be the behaviour of libusb, since it detects
 most USB devices.  Is that correct?  Libusb detected my scanner (Canon
 3000F) as well.

Normal would be that a mouse has a driver assigned, such as usbhid,
and sane-find-scanner should leave it alone.  I could not get  
sane-find-scanner
to list my mouse even after I put the vendor and product numbers in
sane.d/genesys.conf.  Perhaps there is an incorrect vendor/product entry
in the *.conf files that you have?

libusb is able to communicate with almost any usb device.

regards,
Gerald




[sane-devel] Adding Scanner to Backend Configuration

2007-05-12 Thread Gerald Murray
Quoting Hugh McMaster dasjour...@gmail.com:


 My scanner (Canon Lide 70) is not supported currently, but (I hope)
 will be supported by the Genesys backend sometime soon.  Anyway, if I
 added the Scanner IDs to the Genesys backend Conf.in and recompiled,
 would that allow any usage of the scanner at all?

The chipset in the Canon Lide 70 is not yet known, but it did not respond
positively to gl841 or gl646, so it is will not at present work with the 
genesys backend.  It has only 2 bulk endpoints, but no isosynchronous
endpoint, so it is different.  Some work is required to identify the chip, 
and the protocol.  Using usbsnoop on a small scan may provide helpful
information.  In any case, quite a bit of work lies between now and a 
successful sane scan.  I suggest obtaining a usbsnoop log and/or identifying
the chipset.  The recompile is not likely to work or provide useful
information,
in my humble opinion.  Someone needs to initiage and carry that project
forward into development.

Good luck,
Gerald




[sane-devel] canon lide 70 support

2007-04-04 Thread Gerald Murray
Quoting Willi Geffers geff...@informatik.rwth-aachen.de:

 The scanner doesn't appear in the list of supported devices. But the
 list hasn't been updated since july 2006 and most of the supported
 scanners are no longer available.
 
 So I'm wondering whether the Canon LiDE 70 will be supported in a future
 release of sane or which scanner I should use instead

Hello Willi,
There is a more current page for that scanner, dated 2006/Oct.
No developer has yet been interested in pursuing that model.  If you
are interested in doing so, read the links in that page for directions
on how to help.  The chipset used remains unknown, and there are 
hints on where to look for that information.  If you want to use a 
sane-supported scanner, choose from one that is currently supported.

Good luck,
Gerald



[sane-devel] Setting up a Control message

2007-02-15 Thread Gerald Murray
Rene:

The log that you sent me cgb1x1.log was very nearly worthless.
The log showed 2644 URBS out, 639 of those were URB_FUNCTION_RESET_PIPE
ending with 3 URB_FUNCTION_ABORT_PIPE out, and 3 back.
That is about 1 in 4 urbs were resets.
Use only a scanner log that ends in a successful scan, best is a
small scan.

You could get information on the bulk urbs by the command

grep -n PipeHandle cgb1x1.log
bulk endpoints are 81 and 02

I can not encourage you to continue at this point.
You are free to do so, of course.  The minimum information
needed would be documentation on the controller chip: the
registers and what the registers are used for.  With the genesys
backend there was documentation.  So register - value pairs can
be identified, and adjustments can be made from there.  Without
that document it is work best left to the blind.  The level of
difficulty is too steep to spend time on a manufacturer/device
that is not documented; better to work with a scanner that is
documented.

best regards,

Gerald





[sane-devel] Wrong detection of Plustek parallel port scanner

2007-02-04 Thread Gerald Murray
Quoting Frank Beimfohr frank.beimf...@web.de:
 
 I've installed sane 1.0.18 on xubuntu 6.10. scanimage -L returns 
 
 device `plustek_pp:parport0' is a Plustek 600P/6000P parallel port flatbed
 scanner
 
 Unfortunately, my scanner is a Plustek 12000P. The scan result is just trash.
 I haven't found any possibility to make sane using the correct device. Does
 somebody know a solution?
 

man sane-plustek 

This alledges that the manufacturer made incompatible devices under the same
product number.  Also the backend has default options when the exact 
parameters are not supplied in the command.  Be sure to read the manpage,
and in the command set every option, never allowing default.  Post the
command(s)
used if all fails.  The trash returned is really something.  Is it the same size
as
was expected? 

best regards,
Gerald



[sane-devel] request_identity2

2006-12-07 Thread Gerald Murray
Quoting Alessandro Zummo azummo-li...@towertech.it:

 
  Hello,
 
I'm searching documentation for the epson ESC i command,
  used in D1 and D7 scanners and implemented in the request_identity2
 function
  in the epson.c driver.

From earlier documentation on printer Epson JX80, it is a switch that 
controls buffer access:
ESC i1  mode: acts on each character immediately as it is sent to buffer
ESC i0  mode: does not act immediately on the character

The above might not be true for a scanner, but I expect that it will be 
very similar, and the digit following the i will be significant.

Gerald



[sane-devel] Weirdness with Canon FS2720U

2006-08-03 Thread Gerald Murray
Quoting Tabor Kelly tkelly-sane-de...@taborandtashell.net:

 What I would love for someone to take a look at is URB 289-300 in this 
 file 

(https://projects.cecs.pdx.edu/~kellyt/SANE-FS2720U/index.cgi/browser/sniffs/just_preview_color_negative_bw.LOG).
 
   It looks like the windows driver writes 24kB of data to the scanner. 
 But look at the data, it isn't firmware, it is a pretty pattern. Any 
 idea? Was the developer who wrote this driver just having a little fun 
 at my expense?

Hi,
I took a quick look at the urbs, and have seen similar transfers.  I do not
pretend to
be an expert in that area yet, as I have not reached coding phase for the
HP2400c
that I have been involved with.   This may not be a firmware upload.  For the
present
time I have been thinking that there are tables that are uploaded into a
scanner
for the purpose of gamma correction, and for shading tables at the point of
origin
of the data.  Some scanners obtain 48bits of data, but send only a smaller
number of
bits/pixel, such as 42, or 36.  A table could then alter the colors sent back.
Uwe posted some code like those urbs about July 5, 2006. 

regards,
Gerald




[sane-devel] HP Scanjet 2400c for genesys

2006-07-15 Thread Gerald Murray
 
 IIRC, after power up, I just selected mono and started scanning.
 If you want, I can do this again and carefully record the single
 steps.
 
 Bye,
   Uwe

Hi,
For now, I do not it re-done.  I am going to try to get an understanding
of what was done in that log, and why.   From what I have looked into
so far, that program seems to have been less than a straight-forward
design.  I need to try some tests for undocumented register(s) to see if
that changes results.  This may take some time as well, so I do not 
expect results soon.  I am hoping to just use this one log, and then
see if that can get any kind of result.
Thanks for producing that log.

Gerald



[sane-devel] Genesys, Canon LiDE 35/40/50/60

2006-04-28 Thread Gerald Murray

Hello list and Henning,

For Canon LiDE 35 or 50:
What steps are to be followed to gain access to the calibration area?

I have seen on Ebay that Canon sells separately a service manual on
a compact disk.  Does anyone know if that disk would contain the
instructions to service that scanner?



Pierre wrote:

That is probably a calibration problem. There is no easy way to fix
that. What helped Henning was to clean the calibration area. The backend
is currently not able to cope with (much) dirt there.

Regards,

Gerald





[sane-devel] Genesys, Canon LiDE 35/40/50/60

2006-04-25 Thread Gerald Murray
Pierre wrote:

So, if you own a scanner of the Canon LiDE 35/40/50/60 series, please
try the code from the experimental module. The low power mode is used
when scanning at resolutions =600dpi, and during calibration. Errors
are most likely when the scanner does a fast feed to the scanning area.

Also, it would be good if someone owning a gl646 based scanner tests the
code, as the gl646 part tends to break whenever i change something :(

Regards,
  Pierre

Hello,

Tested:
LiDE 35: 150,300,600,1200 using usb-1.1.
Motor ok.  Scans at 150,300 are excellent quality.  
At 600, 1200 minor image flaws: there is faint but noticable streaks
down the longest length of the image, from color reception or brightness
not being quite right.  Also a few slices across the image, possibly from a
jerk of the head at that point in the scan.  On the whole, an acceptable
image.

HP2400: no change, not working.

Best regards,
Gerald






[sane-devel] Canon Lide 50 (Genesys) - Added threshold for BW (lineart)

2006-03-27 Thread Gerald Murray
Quoting Pierre Willenbrock pie...@pirsoft.dnsalias.org:

 Laurent Charpentier schrieb:
  Hi Everyone,
  
  I would like to submit a patch for the genesys backend (Canon LIDE 50).
 The
  patch adds the threshold feature for black/white mode (in 1.0.17 the
 threshold
  is set to 50% and can't be changed).
  
  The attached patch is relative to sane-backends-1.0.17 (files genesys.c,
  genesys.h, genesys_gl841.c, genesys_low.h).
  
  Thank you to apply this patch.
 
 I will take a look at the patch when i find some time. I guess this
 should be done for software b/w as used by the gl646 part, too.
 
 Regards,
   Pierre
 
Hi all,
I tested Laurent's patch as submitted, against 1.0.17 and it works fine here.
regards,
Gerald



[sane-devel] Any further with canoscan LiDE 500F?

2006-03-27 Thread Gerald Murray
Quoting Jeff Shrowder shrow...@uniting.com.au:
 I've used SnoopPro to log the traffic over the usb and got this enormous 
 log :-) but where to from here? I can do 'lots of staring at usb logs' - 
 there's plenty to stare at :-) What am I looking for?
 
 Jeff

A comparison of log data with canon LiDE35/50 should show how the frontend
is loaded for image acquisition.  The chip uses remains unknown at this point.
A comparison shouls also show whether the image transport is similar to genesys
GL841.  A small image sould be enough to tell.  
regards,
Gerald




[sane-devel] gunt

2006-03-23 Thread Gerald Murray
Quoting Nehpets Farnkiln plamt...@yahoo.com:

 So I'm working on a project wherein I've removed the CCD and stepper motor
 from the case, and have it mounted elsewhere. 
   
   I'm looking to get the image data from the scanner one scanline at a  time
 (rather than the entirety of all the scanlines at once), and I'm  also
 looking to make the scanner keep scanning until I signal it to  stop (rather
 than returning the carriage back it's starting point after  11 inches or
 whatever).  But I'm fairly pathetic in my programming  skills.  Are the
 backends capable of doing these things?
   
   -Stephen Franklin

Hi Stephen,
Your question is quite general.  The answer is more dependent upon the
scanner and its firmware/interfaces.  Inside the scanner is some kind 
of a processor with its instruction/register set.  Some scanners are capable
of doing what you want; others are not.  For those that are not capable of
that, the scanner receives all the parameters.  At the point where the 
scan starts, the backend no longer has any control until all of the image
bytes have been transfered.  Then the backend can regain control, and 
ask if the bytes sent are the exact number of the bytes expected.  If yes,
the scan succeeded; else it failed.  When the command to scan is sent,
that scanner has in its program a shuffle.   When the scanner cannot
send more bytes because the buffer is already full, the scanner then does
its shuffle until the buffer has the room to accomidate.  Upon completion
of the image transfer, the head is sent home.  
You will need to customize the backend and then test to do your agenda.

Good luck,
Gerald



[sane-devel] Any further with canoscan LiDE 500F?

2006-03-21 Thread Gerald Murray

 So, what do I need to log the data moving over the USB bus?
 
 Jeff

Hi Jeff

Search the mail archive list for usbsnoopy.   The search should yield a site
where that program for use on windows can be obtained, and there should
be examples in the list that have answers on how to use it as well.  The 
most recent emails that I remember were by Stef Voltz in response to 
requests from other searchers.  

usbsnoopy questions are asked fairly frequently, so the answers should be
available as far as using the program is concerned.  The problems encountered
with newer hardware might not be available yet, so do ask if you do not find.

best regards,
Gerald






[sane-devel] Writinng a driver for canoscan 3000

2006-02-10 Thread Gerald Murray
Quoting Marbrier Sebastien sebastien.marbr...@laposte.net:

 About the matter about the controller I tried to open my other scanner but I
saw the design is made to destroy it if I try to remove the metal plate above

I was thinking that the metal plate is there to guard against rf interference.
If the removal/reinsertion of the metal plate is expected to destroy the 
use of the scanner, could you elaborate on what you are suggesting?
Or am I mistaken about what you appear to be suggesting?

regards,
Gerald
 
 the main board. I have to be careful about it .
 
 Sebastien. 




Subject: Re: [sane-devel] USB sanner only as root

2006-01-19 Thread Gerald Murray

Any idea how to change this permanentely?
Any help appreciated

--
mvh Mogens J?ger


UDEV can be used to manage permissions.
I am using udev.rules (ubuntu hoary, udev-075, linux-2.6.14)
(the kernel must be at least 2.6.10 or newer; use may vary by distribution)
I also have /etc/hotplug/usb/libusbscanner script that sets the
group to 'scanner'

The scanner is brought up with these permissions:
-rw-rw  1 root scanner 57 2006-01-18 04:15 /proc/bus/usb/001/005

/etc/udev/udev.rules --- selected entries ---
# permissions for USB scanner devices
BUS=usb, KERNEL=scanner[0-15], NAME=scanner%e, MODE=0660, GROUP=saned

# USB devices
BUS=usb, KERNEL=scanner[0-15],  NAME=usb/%k
--end--

Some similar changes are possible for SCSI or Firewire.

regards,
Gerald





[sane-devel] Does the Canon Lide 80 work?

2005-12-29 Thread Gerald Murray
Quoting Henning Meier-Geinitz henn...@meier-geinitz.de:

 Hi,
 
 On Tue, Dec 27, 2005 at 08:35:39PM -0500, golan...@aol.com wrote:
  I've noticed lots of talk of the genesys backend working with canon 
  lide 35, 40, 50 and 60 but what of Lide 80?  Is support already in 
  there or is it planned?
 
 It doesn't work yet.
 
 As none of the genesys developers seems to own such a scanner, it's up
 to you to add it to the backend. See the ongoing discussions on this
 list about the genesys backend.
 
 As a quick'n'dirty trst. you could get the source code of
 sane-backends (1.0.17 at least) and change the code of
 backend/genesys_devices.c (at the end):
 
 Change
 
   {0x04a9, 0x221c, canon_lide_60_model},
 
 to
 
   {0x04a9, 0x2214, canon_lide_60_model},
   
 
 and also add
 
 usb 0x04a9 0x2214
 
 to genesys.conf.
 
 Bye,
   Henning

For quick, that provides a nice start.  If I remember from some of the
available comments, the LiDE 80 has  a Holtek HT82V36 chip which 
has some registers to initialize in the frontend, so differences might
be needed there.

best regards,
Gerald



[sane-devel] Genesys backend update to Dec 06, cvs

2005-12-07 Thread Gerald Murray
Hi all,

# These tests results are using sane-backends-20051206-cvs:

GL841 - Canoscan lide35:

This has changed for the worse since Nov 24.
I have previously made scans at 150, 300, 600, in color.
Now the 'image' is no longer recognizable.

color, 75dpi, (scan fails, obtaining 0 feed steps, then stops)

color, 150dpi (unrecognizable image created)
warmup(?) is very odd.
move head, wink lite, park head -repeated several times.
Usually a warmup would keep the light on, move to strip, scan, rescan if
necessary.  I am not sure where this is coming from.
flag GENESYS_FLAG_SKIP_WARMUP is still there.

color, 300dpi -  SAME as 150dpi

color 1200dpi - Very slow, backtracks 195 times on a 107mm scan length.
image size was 100 megabytes, for about 1/3 of the available scan area.
(Note: using usb 1.1 fullspeed, not hi-speed)

GL646 - HP 2400:

The inconsistent response from the device is no longer a problem.
The frontend code still does not work, so no image.


Stef:

Thanks for your comment on the no warmup will succeed area.  I had
not thought about that.   I will continue working on it, my pace is
rather slow, and I am missing the log that would show values to test/try
in the registers, as I am only using Linux to work with.
I am willing to do some tests with mine.  Not knowing the range of values
that are workable does pose some risk to the device here.

best regards,
Gerald


-- 




[sane-devel] Genesys HP scanjet 2400

2005-12-04 Thread Gerald Murray
Hello all,

Scanner: hp scanjet 2400
using sane-backends-cvs20051124

Expected completion date: unknown, it is ready when it is ready

Update from previous post:
key: - previously reported; + update :

- Head moves two times the expected distance.
- Excessive time in genesys_warmup_lamp()
+ excessive time appears to be a result of an incorrect formula.
  (the source was patched to force SANE_STATUS_GOOD, thereby ignoring
  the frontend setup, and attempting to be sure that head movements were
  OK.  I am to look into the frontend setup later)
- There was no image in the STDOUT output (file size 1523712)
- Status register for lamp reports OFF, but lamp remains ON.
- Head remains where the scan stopped.
+ This is a FEATURE, not a bug.  The scan process depends on every detail
  being expected and correct.  When a status other than SANE_STATUS_GOOD
  is encountered, all processing stops whereever it was.  This is good,
  because it assures that there can be no damage to the scanner as a
  result of an unexpected reply from the device.  The cause of the
  problem was a result SANE_IO_ERROR, reported at the end
  of the scan (miscalculation of bytes expected/received)
- In lineart mode, depth:1 was what I expected.  depth:8 was reported.

NEW:
+ The device responds inconsistently to the same scan request.
  When the same request is executed sequentially many times, on the
  odd-numbered attempts, the scan completes, and goes to end of task.
  On even-numbered attempts, the scan head never moves off of the home
  position.  (reading bulk data: Error during device I/O)
  The error comes from not properly setting up the frontend during
  the lamp warmup.
  NOTE: to duplicate this problem, install from cvs referenced above.
  The source code is patched (see below) to force SANE_STATUS_GOOD
  in function genesys_warmup_lamp().
  Use scanimage from SOURCE_TOP_DIR/frontend/scanimage.
  Execute the bash command as shown below, substituting your
  {BUS}/{DEVNUM} as shown in /proc/bus/usb/devices file for your scanner.
  REMEMBER to keep the image size small until the size of the image
  is corrected.

#!/bin/sh
scanimage -d genesys:libusb:{BUS}:{DEVNUM} --resolution 150 --mode color -t 1 -l
80 -x100 -y 30 2scan.log 1image.pnm
#end
PATCH (DO NOT APPLY) This patch was how SANE_STATUS_GOOD was forced
  from genesys_warmup_lamp().  The frontend is not setup right, so
  the image is not correct, but it demonstrates motor handling of
  the scan head and the inconsistent response from the device.

--- sane-backend-20051124/backend/genesys.c 2005-12-02 00:25:55.0
-0600 
+++ sane-backend-hack/backend/genesys.c 2005-12-02 00:24:45.0 -0600
@@ -3419,6 +3419,12 @@
   DBG (DBG_error,
   genesys_warmup_lamp: warmup timed out after %d seconds. Lamp
defective?\n,
   seconds); 
+  if (seconds  40) {  /* FIXME GPM: remove 6 lines here */
+DBG(DBG_info, 
+   genesys_warmup_lamp: ** ENOUGH (FIXME) **\n);
+status = SANE_STATUS_GOOD;
+goto FIXME_hack_trick;
+  } 
   status = SANE_STATUS_IO_ERROR;
 }
   else
@@ -3427,6 +3433,7 @@
   genesys_warmup_lamp: warmup succeeded after %d seconds\n,
   seconds);
 }
+FIXME_hack_trick:  /* FIXME remove this GPM */
   free (first_line);
   free (second_line);
   return status;
 end-of-patch

best regards,
Gerald


-- 




[sane-devel] sanei_usb.c

2005-06-29 Thread Gerald Murray
Quoting Paul Smedley p...@smedley.info:

 Hi Gerald,
=20
 On 28/6/2005, Gerald Murray gmur...@cloudnet.com wrote:
=20
 Quoting Paul Smedley p...@smedley.info:
  One query I have though is about devname
 =20
  I see in sanei_usb.h that the libusb format for this is
 libusb:busno:devno
 =20
  Is this defined for all devices or just ones that sanei_usb_init thi=
nks=20
  are scanners?
 
 It is defined for each usb device.  Having this naming scheme allows t=
he=20
 OS to use the same functionality that applies to filenames for usb dev=
ices.
 So the permissions on that filename can be used to indicate the permis=
sions
 for its associated usb device.=20
 Well permissions are pretty much non-existent on os/2...
=20
  I assume that the format of devname really isn't important - so long=
 as=20
  it's useful to the usb method being used (ie kernel, libusb or usbca=
lls=20
  for OS/2) in determining which usb device is being attached to?
 =20
  In which case, I could use usbcalls:deviceno or even just deviceno?
 
 For portability, it would be best to use just one system for all usb
 devices
 within that operating system.  This is a problem for the OS you are us=
ing..
 I don't see why it's a problem?

To clarify, I was suggesting that there should be a uniform way of using
the devices, and that 'problem' lies more in the OS, and less in the=20
driver author.  It eases portability in adapting any driver to another
system or in converting programs to any one specific computer.
I did not intend to suggest that there is an obstacle for you there.

 usbcalls uses a device number for each usb device that's attached to th=
e
 system.
=20
 Using the format above, I could have for eg.
 usbcalls:0 - ie my USB Floppy
 usbcalls:1 - ie my USB Printer
 usbcalls:2 - ie my USB Scanner
=20
 When usbcalls:2 is passed to sanei_usb_open, I know to open device numb=
er
 2 via usbcalls?  Or am I missing something?

Looks like you are on the right path.

regards,
Gerald





[sane-devel] sanei_usb.c

2005-06-28 Thread Gerald Murray
Quoting Paul Smedley p...@smedley.info:

 Hi All,
 I'm working on adding support for USB scanners for Sane on OS/2.
=20
 OS/2 doesn't have libusb, but has a library usbcalls that provides=20
 similar functionality, albeit most of the calls use different syntax.
=20
 I have sane-find-scanner working now for most scanners, and have starte=
d=20
 work on remaining functions in sanei_usb.c
=20
 One query I have though is about devname
=20
 I see in sanei_usb.h that the libusb format for this is libusb:busno:de=
vno
=20
 Is this defined for all devices or just ones that sanei_usb_init thinks=
=20
 are scanners?

It is defined for each usb device.  Having this naming scheme allows the=20
OS to use the same functionality that applies to filenames for usb device=
s.
So the permissions on that filename can be used to indicate the permissio=
ns
for its associated usb device.=20

 I assume that the format of devname really isn't important - so long as=
=20
 it's useful to the usb method being used (ie kernel, libusb or usbcalls=
=20
 for OS/2) in determining which usb device is being attached to?
=20
 In which case, I could use usbcalls:deviceno or even just deviceno?

For portability, it would be best to use just one system for all usb devi=
ces
within that operating system.  This is a problem for the OS you are using=
.

 usbcalls doesn't just bus/deviceno - it just has a device number for=20
 each device attached.
=20
 Thanks for listening - I hope to have some patches (and probably some=20
 more questions!!) soonish :)
=20
 Cheers,
=20
 Paul.

regards,

Gerald
--=20





[sane-devel] Back-end for CanoScan 3200F?

2005-06-27 Thread Gerald Murray
Quoting Lauri Pirttiaho lauri.pirtti...@luukku.com:

 Hello,
=20
 A while back there was some discussion about the back-end
 for CanoScan 3200F, a currently unsupported scanner.
 I would like to know if someone is actively working on
 this scanner. Also if anyone has definitive information
 about the on-board controller ASIC, I would be very
 thankful. Especially if someone has soldered open
 the EMI shield of the controller board, I would like
 to hear what is there beneath.

The genesys backend gl841 MAY be the closest to what=20
you are describing here, but some details you mention
show small variance from the gl841.  The backend for the
gl841 probably best described as an early start, or a stalled
project.  The project remains blocked due to access to the=20
registers, and unknown vendor read/write commands.  From my
tests on Canon LiDE 35 that scanner NAKs every attempt I have
tried so far. =20

 What I know so-far is that the suspected chip is some
 of the SQ chips and that there is on-board MCS51
 micro controller (MCU), either built-in to the controller
 ASIC or as a separate chip.
=20
 From analyzing the USB traffic in Windows XP I have
 already deduced the working boot procedure, some scan
 head control commands and partial procedure to make a
 full plate scan.
=20
 The controlling procedure involves three types of=20
 control commands. There are direct writes to/reads from
 the external memory space of the MCU, some high addresses
 of which seem to be memory mapped peripherals.
 These are the single byte vendor write and read requests
 0x0c (read) and 0x04 (write) to wValue 0x00e1 (read)
 and 0x00e0 (write) with the address at wIndex.

Providing details on what went down the usb bus would=20
certainly help.  The log from a scan may provide some clues
to what is currently unknown.  It would also be helpful is
someone with a Canon LiDE 35 could post a log so that more
information would become available to that project.

 Then there are command with varying values and
 indices of varying length (some of which have easy
 to find uses (like write to value 0x0071 index 0 which=20
 homes the scan head, read form value 0x0040 index 0
 which returns some status information like whether
 the scan head is moving and if it is at home position,

My read of the gl841 registers show that the home position
sensor would be in register 0x0041

 values 0x0023 and 0x0024 index 0 which move the

Here the gl841 seems to show register 0x0022 and 0x0023
for this, probably.

 scan head forward and backward by given length etc.)
 Some are not so easy to deduce.
 Third type of command is upload of several blocks
 of data to the external memory space of the MCU
 (at address 0xdd00) which seem to contain various
 masking, ramping etc. data details of which is
 unknown to me but which directly affects e.g. whether
 the scan comes out as all black or something visible
 and also seems to affect the motor operation.

The logs that would show data being written to the address
of a MPU are of interest, as the gl841 still has some=20
unknown problems that stall that backend.
=20
 If anyone can deduce from the description above more
 about the on-board controller, I would like to hear.
=20
 I am in process of preparing a more detailed collection
 of my findings, but if there is already a project to
 make the back-end for this scanner, I would like
 to submit the findings to that common pool.


I hope you will keep this list informed of your effort.
The genesys gl646 portion of the genesys backend has been mentioned
as ready, but the other gl841 is positively not ready to be included
in the sane CVS.  I think the gl646 could use more testing.  The project
can be accessed in the sane CVS, co experimental.

=20
 With best regards,
=20
 Lauri Pirttiaho
 Oulu
 Finland
=20

Thanks for your news.  Good luck with your efforts.

Gerald=20
--=20





[sane-devel] hp 5200c usb problem

2005-06-21 Thread Gerald Murray
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.2.2
X-Originating-IP: 209.188.109.9


T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxC=
^^   
bus is 001/002 device


What do I do?
I use kernel 2.6.7 and hotplug to manage permissions. However hotplug has s
ome
problems: It cannot chown and chmod of /proc/bus/usb/001/003 which might be
my scanner device. (I think it should be 001:001). I don't always get this

You do need to get the permissions set on the right device.
In the procfs, the T: line identifys the device and provides information.
You do not have to guess in the sysfs either.  This command
will list all the device numbers first, followed (in the same order)
by idVendor or idProduct (by manufacturer may fail because some do not
supply their name.  idVendor and idProduct are required by USB specifications)

cat /sys/bus/usb/devices/*/{devnum,idVendor}

From the sane-project site:

Support for models 5200C/62X0C/63X0C connected to the USB  require  the
kernel scanner driver or libusb. See sane-usb(5) for more details.

Best regards,

Gerald



--