[sane-devel] Backend for plustek Opticbook 3600

Chris Berry s0457957 at sms.ed.ac.uk
Wed Dec 30 10:15:49 UTC 2009

Ok thanks stef, i've been experimenting a little with the logs, there 
was a small error/issue with the parse1.awk script you sent me. I don't 
know if you have encountered this but around line 113 there is an if 
statement along the lines of:

if ($5 == "0x0000002]")

this fails because of what I suspect is an end of line character in $5, 
so i replaced it with:

if (index($5, "0x0000002]") > 0) endpoint = "BULK_OUT"

and so on for the following values. I'm not very good with awk so I 
don't know if this is the best way of fixing this but it works for now.

After some playing I think I have the CCD settings right and the motor 
seems to be working so I havent really changed that much. I also think 
the GPIO settings are right which leads me to believe the DAC is the 
main issue at the moment.

 From my understanding the front end is accessed through registers 
0x51(address), 0x3a and 0x3b (values) but im not sure how this 
translates to the settings in genesys_devices.c:

   {DAC_PLUSTEK_3600,{0x00, 0x3d, 0x08, 0x00}
    , {0x00, 0x00, 0x00}
    , {0xe1, 0xe1, 0xe1}
    , {0x93, 0x93, 0x93}
    , {0x00, 0x19, 0x06}

Now I think the first 4 values correspond to addresses 0x00 - 0x03 of 
the DAC, but the following arrays are a bit of a mystery to me. I have 
had a look at the log from run-genesys and it seems that they are trying 
to set many DAC registers but the Snoop reveals that only fe_writes to 
addresses 0x00 - 0x07 are made.

As when I try a scan everything (aside from the light not being on) 
seems to be reasonable but results in a garbled image I think it might 
just be a case of getting the light on and setting up the DAC properly. 
If you could help me understand the DAC settings I might be able to 
investigate the matter further.



On 12/29/2009 07:46 AM, stef wrote:
> Le jeudi 24 décembre 2009 06:07:23 Chris Berry, vous avez écrit :
>> Just a quick update, I had to take a little time off from the project
>> but I should be able to work on it more now. I have an update at
>> http://sites.google.com/site/bez625/updates-1/update with new log files
>> for smaller scan and preview snoops.
>> Stef is there any chance you could explain the layout of your script to
>> me a little, for instance
>> URB  7278  control  0xc0 0x0c 0x8e 0x20 len     1 read  0x01
>> I take it this means:
>> URB<URB Num>  <URB Type>  <4 hex values>  len<Length>  <r/w>  <data>
>> What are the 4 hex values for? Also anything else helpful will be
>> appreciated. I'm not certain how I can better find the values I need for
>> genesys_devices.c, I look for the hex values of the registers that need
>> to be set and cant find them in the new reduced log files. Maybe some of
>> these values are only set at power up and not before a scan or preview?
>> Chris
> 	Hello,
> 	these numbers are to be converted in sanei_usb_control_msg() function calls.
> You can have a look at the defines in genesys_low.h around line 113 for the
> known values. The 0x8e value isn't defined and currently used in the genesys
> backend. However, after looking at the logs you posted, I think it is some
> data reading. The trouble is that currently there is no such access to data
> for the supported models. While I think it could be turned to something like
> sanei_genesys_bulk_read(), you'll need to experiment. As far I understand,
> these are vendor specific accesses. I couldn't find these values in any USB
> documents.
> 	You are right that some register values don't change much and are set up
> early, and not at every scan.
> Regards,
> 	Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20091230/eb05b604/attachment-0001.htm>

More information about the sane-devel mailing list