<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hi ,</FONT></DIV>
<DIV><FONT face=Arial size=2>Thank u it worked the mode was in ECP+EPP . Im 
using a program to detect scanner devices but I cant retrieve the device by 
calling sane_get_devices() function .The </FONT></DIV>
<DIV><FONT face=Arial size=2>SANE_Device structure is NULL.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>%%%%%%%%%%%%scanner.h%%%%%%%</FONT></DIV><FONT 
face=Arial size=2>
<DIV><BR>#include <sane/sane.h><BR>#define SANE_MAX_USERNAME_LEN 
128<BR>#define SANE_MAX_PASSWORD_LEN 128<BR>typedef void 
(*SANE_Authorization_Callback)<BR>      
(SANE_String_Const resource,<BR>       SANE_Char 
username[SANE_MAX_USERNAME_LEN],<BR>       
SANE_Char password[SANE_MAX_PASSWORD_LEN]);<BR>SANE_Status 
initialize_scanner(SANE_Int* version,SANE_Authorization_Callback 
callback);<BR>void exit_scanner(void);<BR>SANE_Status get_scanners(const 
SANE_Device*** device, SANE_Bool local);<BR></DIV>
<DIV>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</DIV>
<DIV>//scanner.c</DIV>
<DIV> </DIV></FONT>
<DIV><FONT face=Arial size=2>#include <stdio.h><BR>#include 
"scanner.h"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>int main()<BR>{<BR>  SANE_Status status= 0; 
<BR>  const SANE_Device** dev;<BR>  int i = 0;<BR>  status = 
initialize_scanner(NULL,NULL);<BR>  if(status != 
SANE_STATUS_GOOD)<BR>  {<BR>  printf("Scanner not properly 
initialized...\nExit code: %d\n",status);<BR>  exit(0);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>  }<BR>  else</FONT></DIV>
<DIV><FONT face=Arial size=2>  { 
<BR>        status = 
get_scanners(&dev,1);<BR>        
if(status == 
SANE_STATUS_GOOD)<BR>          
{ </FONT></DIV>
<DIV><FONT face=Arial size=2>        
    /*</FONT></DIV>
<DIV><FONT face=Arial size=2>        
    dev[i] is NULL</FONT></DIV>
<DIV><FONT face=Arial size=2>        
    
*/<BR>            
while(dev[i] != NULL)<BR>        
        {<BR>       
            printf("Name - %s\n", 
((const SANE_Device*)dev[i])->name);<BR>        
            printf("Vendor - 
%s\n",((const SANE_Device*)dev[i])->vendor);<BR>    
                
printf("Model - %s\n",((const 
SANE_Device*)dev[i])->model);<BR>        
            printf("Type - 
%s\n\n",((const SANE_Device*)dev[i])->type);<BR>    
                
i++;<BR>            
    
}<BR>           }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>         
</FONT></DIV>
<DIV><FONT face=Arial size=2>  }</FONT></DIV>
<DIV><FONT face=Arial size=2>  exit_scanner();  </FONT></DIV>
<DIV><FONT face=Arial size=2>  return 0;<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>SANE_Status initialize_scanner(SANE_Int* 
version,SANE_Authorization_Callback callback)<BR>{<BR>  return sane_init 
(version,callback);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>void exit_scanner(void)<BR>{</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>  sane_exit();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>SANE_Status get_scanners(const SANE_Device*** device, SANE_Bool 
local)<BR>{<BR>  <BR>  return  sane_get_devices 
(device,local);</DIV>
<DIV> </DIV>
<DIV>}<BR></DIV>
<DIV>Thanks in advance</DIV>
<DIV>Aneesh</DIV></FONT></FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=aneeshmraj@hotmail.com href="mailto:aneeshmraj@hotmail.com">aneesh m 
  raj</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=sane-devel@www.mostang.com 
  href="mailto:sane-devel@www.mostang.com">sane-devel@www.mostang.com</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, June 13, 2003 2:59 PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [sane-devel] problem with UMAX 
  2000P printer</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>
  <DIV><FONT face=Arial size=2>Hi ,</FONT></DIV>
  <DIV><FONT face=Arial size=2>Im using a UMAX 2000P parallel port printer 
  and I have downloaded SANE and the patch for UMAX, when I run the umax_pp 
  tool I receive a message "No scanner found Status 134 not expected" .Im using 
  debian linux kernel 2.2.20. Any help is appreciated.</FONT></DIV>
  <DIV><FONT face=Arial size=2>Regards</FONT></DIV>
  <DIV><FONT face=Arial 
size=2>Aneesh</FONT></DIV></FONT></DIV></BLOCKQUOTE></BODY></HTML>