[sane-devel] Adding Scanner to Backend Configuration
Stéphane VOLTZ
stef.dev at free.fr
Wed May 23 04:51:59 UTC 2007
Le mercredi 23 mai 2007, gmurray at cloudnet.com a écrit :
> Hugh wrote:
> > I wanted to know if anyone would like to look at them.
>
> I would like to see the filtered output. Please post/send me
> a url.
>
> In the initial URBS there seemed to be a lot of unnecessary data
> sent. In the first 1393 URB numbers, there is a block of
> 0x0200 bytes that is resent to the device 312 times. The
> block is constant, except for the first byte. Sending the
> block to the device returns an URB with just 1 byte.
> That byte becomes the first byte of the 0x0200 byte block
> in the next resend. Mysterious, but interesting.
>
> regards,
> Gerald
For me it is a bulk read on endpoint 0x83. Which is consistent with the lsusb
output. The windows driver sends out a useless buffer of 512 bytes, while the
actual data is the one byte read back.
With a modified 'parse1.awk' that doesn't skip this, the USB log look like:
URB 8 bulk_out len 4 wrote 0x01 0x46 0x01 0x00
URB 9 bulk_in len 1 read 0x08
URB 10 bulk_out len 5 wrote 0x00 0x02 0x01 0x00 0x01
URB 11 bulk_out len 5 wrote 0x00 0x02 0x01 0x00 0x00
URB 12 bulk_out len 5 wrote 0x00 0x01 0x01 0x00 0x00
URB 13 bulk_out len 5 wrote 0x00 0x01 0x01 0x00 0x28
URB 14 bulk_out len 5 wrote 0x00 0x90 0x01 0x00 0x4f
URB 15 bulk_out len 5 wrote 0x00 0x92 0x01 0x00 0xff
URB 16 bulk_out len 4 wrote 0x01 0x91 0x01 0x00
URB 17 bulk_in len 1 read 0x00
URB 18 bulk_out len 5 wrote 0x00 0x93 0x01 0x00 0x00
URB 19 bulk_out len 5 wrote 0x00 0x91 0x01 0x00 0x1f
URB 20 bulk_out len 5 wrote 0x00 0x95 0x01 0x00 0x1f
URB 21 bulk_out len 5 wrote 0x00 0x97 0x01 0x00 0x1f
URB 22 bulk_out len 5 wrote 0x00 0x9b 0x01 0x00 0x00
URB 23 bulk_out len 5 wrote 0x00 0x9c 0x01 0x00 0x07
.....
URB 37 bulk_out len 5 wrote 0x00 0x99 0x01 0x00 0x28
URB 38 bulk_out len 5 wrote 0x00 0x9a 0x01 0x00 0x03
URB 39 bulk_out len 5 wrote 0x00 0x80 0x01 0x00 0x10
URB 40 bulk_out len 5 wrote 0x00 0x8d 0x01 0x00 0x00
URB 41 bulk_out len 5 wrote 0x00 0x8d 0x01 0x00 0x04
URB 42 bulk_out len 4 wrote 0x01 0x8b 0x01 0x00
URB 43 bulk_in len 1 read 0x00
URB 44 bulk_out len 4 wrote 0x01 0x8b 0x01 0x00
URB 45 bulk_in len 1 read 0x00
These look single register read/write for me:
first byte read/write flag, second is register index, then a LSB register
count. Then there is the value written, or a bulk in for the value read (on
endpoint 83). There read/write flag of value 0x02, 0x04 and 0x05. 0x05 is for
data reading.
When processed with custom scripts it gives a pseudo code like this:
write(0x8d,1)=0x00
write(0x8d,1)=0x04
read_reg(0x8b,1)=0x00
read_reg(0x8b,1)=0x00
write(0x85,1)=0x00
write(0x87,1)=0x00
write(0x88,1)=0x70
read_reg(0x8b,1)=0x00
read_reg(0x8b,1)=0x00
write(0x85,1)=0x03
write(0x87,1)=0x00
write(0x88,1)=0x28
read_reg(0x8b,1)=0x00
read_reg(0x8b,1)=0x00
write(0x85,1)=0x06
write(0x87,1)=0x00
write(0x88,1)=0x28
read_reg(0x00,1)=0x40
read_reg(0x01,1)=0x28
read_reg(0x02,1)=0x00
read_reg(0x03,1)=0x00
read_reg(0x04,1)=0x0c
read_reg(0x05,1)=0x00
.....
..... all values from 0x00 to 0xFE, look like a 255 registers ASIC
.....
read_reg(0xfd,1)=0x00
read_reg(0xfe,1)=0x00
write(0x60,1)=0x15
write(0x10,1)=0x05
write(0x9b,1)=0x01
read_reg(0x46,1)=0x08
write(0x80,1)=0x12
write(0x11,1)=0x25
write(0x9b,1)=0x01
read_reg(0x46,1)=0x08
read_reg(0x46,1)=0x08
read_reg(0x46,1)=0x08
write(0x80,1)=0x12
write(0x11,1)=0x25
write(0x01,1)=0x28
write(0x04,1)=0x0c
write(0x05,1)=0x00
write(0x06,1)=0x00
write(0x01,1)=0x29
write(0x71,1)=0x01
URB 595 bulk_out len 5 wrote 0x02 0x30 0x01 0x00 0x11
write(0x71,1)=0x16
write(0x72,1)=0x01
Does it look familiar to anyone ? What ASIC could it be ?
Regards,
Stef
More information about the sane-devel
mailing list