[sane-devel] Mustek BearPaw 2448CU pro

2008-12-22 Thread damianoro...@paranoici.org



On Sun, 21 Dec 2008 13:25:44 -0800 (PST), Jack McGill
jmcgill85258 at yahoo.com wrote:
 There was a thread about this same scanner last month.

http://lists.alioth.debian.org/pipermail/sane-devel/2008-November/023053.html
 The author got about as far as you did.

I tried xscanimage. Setting correct scan area size motor moves properly.
But I don't understand the meaning of that red image. It doesn't depend on
what I put on the scanner.

 
 Next you are going to have to do some usb snooping on a windows machine
 using either http://www.pcausa.com/Utilities/UsbSnoop/ or
 http://benoit.papillault.free.fr/usbsnoop/.

I think I won't be able to read snoop logs. I'll post them.

 
 Then try to figure out the meaning of the snoop logs. Snoop logs are too
 big to post here, so you will need to find a free web site to post them
to.
 I've used google site for this in the past.
 
 Jack McGill
 

Thank you for reply
Damiano Rossi

 
 --- On Sun, 12/21/08, Damiano Rossi damianorossi at paranoici.org wrote:
 
 From: Damiano Rossi damianorossi at paranoici.org
 Subject: [sane-devel] Mustek BearPaw 2448CU pro
 To: sane-devel at lists.alioth.debian.org
 Date: Sunday, December 21, 2008, 9:39 AM
 I am an owner of the scanner Mustek BearPaw 2448CU pro and
 I'd like to
 use it on linux system. I'm not a programmer but since
 there is a
 backend for a similar scanner (BearPaw 2448 TA pro) I'd
 like to do my
 best to adapt mustek_usb2 backend to support this scanner.
 I'm using ubuntu 8.10 but I downloaded last CVS
 sane-backends
 I changed line 148 in mustek_usb2.c from
 SANE_FALSE,/* Is this a CIS scanner? */
 into
 SANE_TRUE,/* Is this a CIS scanner? */
 Because 2448cu is a CIS scanner and not a CCD one like 2448
 TA
 I think that developer's intention was tu support CIS
 sensors but maybe
 the support is incomplete.
 Then I replaced ProducId 0x409 with 0x408 in
 mustek_usb2_asci.c
 BearPaw 2448CU Pro, /* Device model
 name */ (mustek_usb2.c
 line 128)
 sane_device-model = strdup (BearPaw 2448 CU
 Pro); (mustek_usb2.c line
 2082)
 Now scanner is recognized from lsusb
 when I try to scan with scanimage leds get on, motor start
 but it
 doesn't stop at the end and bumps with a noisy
 tr until I
 unplug the usb cable.
 When I try to scan with xsane leds get on, motor moves and
 suddenly
 stops with a long beep.
 In both cases it seems that rgb data are read but an image
 made of thick
 red vertical lines is returned as output

 I tried to analyze the debug output setting
 SANE_DEBUG_MUSTEK_USB2=255
 but in both cases there is no error. Each asic function
 enter and exit
 without errors.
 What could I do at this point?


 --
 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




[sane-devel] Mustek BearPaw 2448CU pro

2008-12-22 Thread Jack McGill
Hello Damiano,

It is good news that your motor is now moving correctly with xscanimage.

I think that your red image is probably because you are using the settings for 
a CCD detector on a scanner with a CIS detector. I believe that the CCD's use a 
single white light, but the CIS detectors use alternating blue green and red 
colored light. 

Hopefully, by doing a usb snoop, we can figure out how to change change the 
settings to work on your scanner. Go ahead and do the snoops and post a link to 
them here. We can help you intrerpret them.

If you want to start analyzing them yourself, here is a quick tutorial based on 
my very limited experience.

The usb snoop logs are going to have a lot of numbers that don't make much 
sense at first. If you study them long enough, you will start to see a 
patterns. 

The following example is from a snoop I did on a pentax ds mobile sheetfed 
scanner (plustek backend, lm98xx chip):

[6298 ms]URB 17 going down   
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
  PipeHandle   = 86fb9d4c [endpoint 0x0003]
  TransferFlags= 0002 (USBD_TRANSFER_DIRECTION_OUT, 
USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 001f
  TransferBuffer   = 
  TransferBufferMDL= 87454808
: 02 44 00 1b 00 13 02 f9 03 20 00 00 00 00 90 01
0010: 00 00 0b d0 00 09 80 14 01 ee 16 09 00 00 00
  UrbLink  = 
[6299 ms] UsbSnoop - MyInternalIOCTLCompletion(b3395db0) : fido=8748a2f0, 
Irp=86f8b4e0, Context=87580300, IRQL=2

The following lines have the important information:
: 02 44 00 1b 00 13 02 f9 03 20 00 00 00 00 90 01
0010: 00 00 0b d0 00 09 80 14 01 ee 16 09 00 00 00

You can see a whole bunch of two digit numbers (hexadecimal bytes). The first 
four bytes are commands and the rest are settings for individual registers on 
the microprocessor chip (sometimes called an ASIC for application specific 
integrated circuit). 

In this example, the first byte is 02, which is a write command. The second 
byte is 44 which says we are going to start at register number 44. The third 
byte is 00 and doesn't do anything. The forth byte tells the chip to expect 1b 
bytes (that's 27 in decimal). Then starting at the fifth byte, register number 
44 is set to 00, register 45 is set to 13, etc.

The above is an example of a bulk registry write, because multiple regesties 
are being written to in a single URB command. I have also done some snoops on 
the genesys backend in which a single registry is written at a time. The 
following is an example of this:

[345 ms]URB 20 going down   
-- URB_FUNCTION_VENDOR_DEVICE:
  TransferFlags  =  (USBD_TRANSFER_DIRECTION_OUT, 
~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 0002
  TransferBuffer   = 822e6488
  TransferBufferMDL= 
: 6f 08
  UrbLink = 
  RequestTypeReservedBits = 0040
  Request = 0004
  Value   = 0083
  Index   = 

In this example the value 08 is written to registry 6f. On this scanner 
registries are written to one at a time.

Your snoop logs will likely have a different format and you will have to try to 
figure this out. The actual snoop logs are much longer and more complicated. 

Also, there are parsing tools available on the sane website that can convert 
your log to a more human readable output.

I can't find a good data sheet for the SQ113 chip. I found a 3 page datasheet 
that is more like a marketing 
brochure.http://www.datasheet4u.com/html/S/Q/1/SQ113A_SQ.pdf.html. It doesn't 
give a description of what each register does. Maybe someone else here has a 
copy or you could write to the chip manufacturer for one.

Good luck!

Jack McGill


--- On Mon, 12/22/08, damianorossi at paranoici.org damianorossi at 
paranoici.org wrote:

 From: damianorossi at paranoici.org damianorossi at paranoici.org
 Subject: Re: [sane-devel] Mustek BearPaw 2448CU pro
 To: jmcgill85258 at yahoo.com
 Cc: sane-devel at lists.alioth.debian.org
 Date: Monday, December 22, 2008, 5:18 AM
 On Sun, 21 Dec 2008 13:25:44 -0800 (PST), Jack McGill
 jmcgill85258 at yahoo.com wrote:
  There was a thread about this same scanner last month.
 
 http://lists.alioth.debian.org/pipermail/sane-devel/2008-November/023053.html
  The author got about as far as you did.
 
 I tried xscanimage. Setting correct scan area size motor
 moves properly.
 But I don't understand the meaning of that red image.
 It doesn't depend on
 what I put on the scanner.
 
  
  Next you are going to have to do some usb snooping on
 a windows machine
  using either http://www.pcausa.com/Utilities/UsbSnoop/
 or
  http://benoit.papillault.free.fr/usbsnoop/.
 
 I think I won't be able to read snoop logs. I'll
 post them.
 
  
  Then try to figure out the meaning of the snoop logs.
 Snoop logs are too
  big to post here, so you will need to find a free web
 site to post them

[sane-devel] Mustek BearPaw 2448CU pro

2008-12-22 Thread damianoro...@paranoici.org



On Mon, 22 Dec 2008 06:04:00 -0800 (PST), Jack McGill
jmcgill85258 at yahoo.com wrote:
 Hello Damiano,
 
 It is good news that your motor is now moving correctly with xscanimage.
 
 I think that your red image is probably because you are using the
settings
 for a CCD detector on a scanner with a CIS detector. I believe that the
 CCD's use a single white light, but the CIS detectors use alternating
blue
 green and red colored light.
 
 Hopefully, by doing a usb snoop, we can figure out how to change change
 the settings to work on your scanner. Go ahead and do the snoops and post
a
 link to them here. We can help you intrerpret them.
 
 If you want to start analyzing them yourself, here is a quick tutorial
 based on my very limited experience.
 
 The usb snoop logs are going to have a lot of numbers that don't make
much
 sense at first. If you study them long enough, you will start to see a
 patterns.
 
 The following example is from a snoop I did on a pentax ds mobile
sheetfed
 scanner (plustek backend, lm98xx chip):
 
 [6298 ms]URB 17 going down  
 -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
   PipeHandle   = 86fb9d4c [endpoint 0x0003]
   TransferFlags= 0002 (USBD_TRANSFER_DIRECTION_OUT,
 USBD_SHORT_TRANSFER_OK)
   TransferBufferLength = 001f
   TransferBuffer   = 
   TransferBufferMDL= 87454808
 : 02 44 00 1b 00 13 02 f9 03 20 00 00 00 00 90 01
 0010: 00 00 0b d0 00 09 80 14 01 ee 16 09 00 00 00
   UrbLink  = 
 [6299 ms] UsbSnoop - MyInternalIOCTLCompletion(b3395db0) : fido=8748a2f0,
 Irp=86f8b4e0, Context=87580300, IRQL=2
 
 The following lines have the important information:
 : 02 44 00 1b 00 13 02 f9 03 20 00 00 00 00 90 01
 0010: 00 00 0b d0 00 09 80 14 01 ee 16 09 00 00 00
 
 You can see a whole bunch of two digit numbers (hexadecimal bytes). The
 first four bytes are commands and the rest are settings for individual
 registers on the microprocessor chip (sometimes called an ASIC for
 application specific integrated circuit).
 
 In this example, the first byte is 02, which is a write command. The
 second byte is 44 which says we are going to start at register number 44.
 The third byte is 00 and doesn't do anything. The forth byte tells the
chip
 to expect 1b bytes (that's 27 in decimal). Then starting at the fifth
byte,
 register number 44 is set to 00, register 45 is set to 13, etc.
 
 The above is an example of a bulk registry write, because multiple
 regesties are being written to in a single URB command. I have also done
 some snoops on the genesys backend in which a single registry is written
at
 a time. The following is an example of this:
 
 [345 ms]URB 20 going down  
 -- URB_FUNCTION_VENDOR_DEVICE:
   TransferFlags  =  (USBD_TRANSFER_DIRECTION_OUT,
 ~USBD_SHORT_TRANSFER_OK)
   TransferBufferLength = 0002
   TransferBuffer   = 822e6488
   TransferBufferMDL= 
 : 6f 08
   UrbLink = 
   RequestTypeReservedBits = 0040
   Request = 0004
   Value   = 0083
   Index   = 
 
 In this example the value 08 is written to registry 6f. On this scanner
 registries are written to one at a time.
 
 Your snoop logs will likely have a different format and you will have to
 try to figure this out. The actual snoop logs are much longer and more
 complicated.
 
 Also, there are parsing tools available on the sane website that can
 convert your log to a more human readable output.
 
 I can't find a good data sheet for the SQ113 chip. I found a 3 page
 datasheet that is more like a marketing
 brochure.http://www.datasheet4u.com/html/S/Q/1/SQ113A_SQ.pdf.html. It
 doesn't give a description of what each register does. Maybe someone else
 here has a copy or you could write to the chip manufacturer for one.
 
 Good luck!

Thank you Jack! 
I can't spend much time in it but in the next days I'll try to follow your
guide to analyze snoop output.
I spent a lot of time searching for datasheet with no success. It seems
that chip is sq113c and not sq113a
but maybe they are similar. I'll write to the manufacturer for datasheet. 
I'll keep you up to date. 
Bye
Damiano



 
 Jack McGill
 
 
 --- On Mon, 12/22/08, damianorossi at paranoici.org
 damianorossi at paranoici.org wrote:
 
 From: damianorossi at paranoici.org damianorossi at paranoici.org
 Subject: Re: [sane-devel] Mustek BearPaw 2448CU pro
 To: jmcgill85258 at yahoo.com
 Cc: sane-devel at lists.alioth.debian.org
 Date: Monday, December 22, 2008, 5:18 AM
 On Sun, 21 Dec 2008 13:25:44 -0800 (PST), Jack McGill
 jmcgill85258 at yahoo.com wrote:
  There was a thread about this same scanner last month.
 


http://lists.alioth.debian.org/pipermail/sane-devel/2008-November/023053.html
  The author got about as far as you did.

 I tried xscanimage. Setting correct scan area size motor
 moves properly.
 But I don't understand

[sane-devel] Mustek BearPaw 2448CU pro

2008-12-21 Thread Damiano Rossi
I am an owner of the scanner Mustek BearPaw 2448CU pro and I'd like to
use it on linux system. I'm not a programmer but since there is a
backend for a similar scanner (BearPaw 2448 TA pro) I'd like to do my
best to adapt mustek_usb2 backend to support this scanner.
I'm using ubuntu 8.10 but I downloaded last CVS sane-backends 
I changed line 148 in mustek_usb2.c from
SANE_FALSE,/* Is this a CIS scanner? */
into
SANE_TRUE,/* Is this a CIS scanner? */
Because 2448cu is a CIS scanner and not a CCD one like 2448 TA
I think that developer's intention was tu support CIS sensors but maybe
the support is incomplete.
Then I replaced ProducId 0x409 with 0x408 in mustek_usb2_asci.c
BearPaw 2448CU Pro, /* Device model name */ (mustek_usb2.c
line 128)
sane_device-model = strdup (BearPaw 2448 CU Pro); (mustek_usb2.c line
2082)
Now scanner is recognized from lsusb
when I try to scan with scanimage leds get on, motor start but it
doesn't stop at the end and bumps with a noisy tr until I
unplug the usb cable.
When I try to scan with xsane leds get on, motor moves and suddenly
stops with a long beep. 
In both cases it seems that rgb data are read but an image made of thick
red vertical lines is returned as output

I tried to analyze the debug output setting SANE_DEBUG_MUSTEK_USB2=255
but in both cases there is no error. Each asic function enter and exit
without errors. 
What could I do at this point?




[sane-devel] Mustek BearPaw 2448CU pro

2008-12-21 Thread Jack McGill
There was a thread about this same scanner last month.
http://lists.alioth.debian.org/pipermail/sane-devel/2008-November/023053.html
The author got about as far as you did.

Next you are going to have to do some usb snooping on a windows machine using 
either http://www.pcausa.com/Utilities/UsbSnoop/ or 
http://benoit.papillault.free.fr/usbsnoop/. 

Then try to figure out the meaning of the snoop logs. Snoop logs are too big to 
post here, so you will need to find a free web site to post them to. I've used 
google site for this in the past.

Jack McGill


--- On Sun, 12/21/08, Damiano Rossi damianorossi at paranoici.org wrote:

 From: Damiano Rossi damianorossi at paranoici.org
 Subject: [sane-devel] Mustek BearPaw 2448CU pro
 To: sane-devel at lists.alioth.debian.org
 Date: Sunday, December 21, 2008, 9:39 AM
 I am an owner of the scanner Mustek BearPaw 2448CU pro and
 I'd like to
 use it on linux system. I'm not a programmer but since
 there is a
 backend for a similar scanner (BearPaw 2448 TA pro) I'd
 like to do my
 best to adapt mustek_usb2 backend to support this scanner.
 I'm using ubuntu 8.10 but I downloaded last CVS
 sane-backends 
 I changed line 148 in mustek_usb2.c from
 SANE_FALSE,/* Is this a CIS scanner? */
 into
 SANE_TRUE,/* Is this a CIS scanner? */
 Because 2448cu is a CIS scanner and not a CCD one like 2448
 TA
 I think that developer's intention was tu support CIS
 sensors but maybe
 the support is incomplete.
 Then I replaced ProducId 0x409 with 0x408 in
 mustek_usb2_asci.c
 BearPaw 2448CU Pro, /* Device model
 name */ (mustek_usb2.c
 line 128)
 sane_device-model = strdup (BearPaw 2448 CU
 Pro); (mustek_usb2.c line
 2082)
 Now scanner is recognized from lsusb
 when I try to scan with scanimage leds get on, motor start
 but it
 doesn't stop at the end and bumps with a noisy
 tr until I
 unplug the usb cable.
 When I try to scan with xsane leds get on, motor moves and
 suddenly
 stops with a long beep. 
 In both cases it seems that rgb data are read but an image
 made of thick
 red vertical lines is returned as output
 
 I tried to analyze the debug output setting
 SANE_DEBUG_MUSTEK_USB2=255
 but in both cases there is no error. Each asic function
 enter and exit
 without errors. 
 What could I do at this point?
 
 
 -- 
 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