[sane-devel] help for write back-end

Bertrik Sikken bertrik@zonnet.nl
Fri, 18 Feb 2005 00:34:19 +0100


My first guess at the protocol:

* The scanner has a limited set of register settings
* Registers are written using USB 'vendor' control transfers:
   * the 'value' field indicates some scanner control register index
   * the 'index' field is yet unknown, related to value field
   * 'requesttypereservedbits' = 0x40 for a write, 0xc0 for read
   * 'request' field = 0x0c for a 1-byte transfer, 0x04 otherwise
* The following registers are used
   reg R/W len       remark
   ===|===|=========|======
   23  W   5
   24  W   5
   2b  W   11 or 2
   2c  R   1 or 2
   2d  R   1
   40  R   2 or 4
   50  W   5
   71  W   4

   b0  W   3
   d0  W   3

   e0  W   2         index is some address?
   e1  R   1         data read from 0xe1 is sometimes written to 0xe0

   f0  W   5         always occurs before bulk. = read address?
   f3  W   4         always occurs before bulk = bulk write len * 0x80?
   f4  W   4         always occurs before bulk = bulk read len * 0x80?
* The length of bulk transfers is encoded in registers 0xf3 and 0xf4

Kind regards,
Bertrik

corwin wrote:
> Hi,
> 
> Thanks for all your answers. I created a web page with few usb log 
> files. ( http://www.coriolys.org/Sane/index.html ).
> And I continue to explore the scanner log :) ...
> 
> Ludovic (corwin)
> 
> Bertrik Sikken wrote:
> 
>> corwin wrote:
>>
>>> Hi,
>>>
>>> I have a CanoScan 3200F (Product Id : 2216) and this scanner are not 
>>> supported by sane.
>>> But i'm very interresting for write a back end.
>>>
>>> I use "usb snoopy log" for extract usb log under WinXP. And I had 
>>> writing a perl script (based on awk Thomas Soumarmon's script) for 
>>> genrate c code for replaying log-script under linux (debian, 2.6.9).
>>> For the moment I reading libusb documentation and my first objective 
>>> is to write a small program (sane independant) for activate the scanner.
>>>
>>> But actually i'm completly lost into the log data and i don't know 
>>> how to begin !!!
>>
>>
>>
>> Zip the logs and put them somewhere on your webpage (if you have one),
>> then post a link to the mailing list. This way, other people with
>> previous experience in decoding logs can try to see if there is
>> something that matches an existing protocol.
>>
> 
> 
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005