[sane-devel] hp backend for HP ScanJet 6200C

Peter Kirchgessner peter@kirchgessner.net
Tue, 14 Jun 2005 22:14:29 +0200


Hello Mohit,

Mohit Kumar schrieb:
> Hi All,
> 
> I have been trying to work with HP ScanJet 6200C and am encountering a
> problem with sane_control_option.
> 
> Firstly, I am extracting the value of "depth" option which in all
> strange behaviour comes out to be of type SANE_String.
> 

it might be unusual, but it is like it is.

> Then I have the following code
> 
> SANE_String depth = "8"; // the scanner shows only 1 as the depth option

The "1" might be the value that is currently set. And it might be the
only one supported because the scanner is in Lineart-mode. But in color
mode the 6200C supports "1", "8", "10", "12"

> SANE_Int info;
> SANE_Status status_loc = sane_control_option(handle, index,
> SANE_ACTION_SET_VALUE, (void*)depth, &info);
> 
> the value of info = 0 ---> document does not mention anything about this'
> 

Documentation says that some bits in this info value are set if some
conditions are met. If no bit is set, none of the conditions was met.
And don't trust this value if the function did not return SANE_STATUS_GOOD.

> however status_loc is not SANE_STATUS_GOOD.
> 
> Can any one tell me what is the problem here?

Maybe the value of status_loc tells what was wrong: unsupported,
invalid, io-error, permission denied.
Before changing the depth you may need to change the scan mode to Color.

--Peter

> 
> Thanks,
> Mohit
> 

-- 
Peter Kirchgessner
http://www.kirchgessner.net
mailto:peter@kirchgessner.net