[sane-devel] problem with UMAX 2000P scanner
aneesh m raj
aneeshmraj at hotmail.com
Fri Jun 13 12:46:18 BST 2003
Hi ,
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
SANE_Device structure is NULL.
%%%%%%%%%%%%scanner.h%%%%%%%
#include <sane/sane.h>
#define SANE_MAX_USERNAME_LEN 128
#define SANE_MAX_PASSWORD_LEN 128
typedef void (*SANE_Authorization_Callback)
(SANE_String_Const resource,
SANE_Char username[SANE_MAX_USERNAME_LEN],
SANE_Char password[SANE_MAX_PASSWORD_LEN]);
SANE_Status initialize_scanner(SANE_Int* version,SANE_Authorization_Callback callback);
void exit_scanner(void);
SANE_Status get_scanners(const SANE_Device*** device, SANE_Bool local);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//scanner.c
#include <stdio.h>
#include "scanner.h"
int main()
{
SANE_Status status= 0;
const SANE_Device** dev;
int i = 0;
status = initialize_scanner(NULL,NULL);
if(status != SANE_STATUS_GOOD)
{
printf("Scanner not properly initialized...\nExit code: %d\n",status);
exit(0);
}
else
{
status = get_scanners(&dev,1);
if(status == SANE_STATUS_GOOD)
{
/*
dev[i] is NULL
*/
while(dev[i] != NULL)
{
printf("Name - %s\n", ((const SANE_Device*)dev[i])->name);
printf("Vendor - %s\n",((const SANE_Device*)dev[i])->vendor);
printf("Model - %s\n",((const SANE_Device*)dev[i])->model);
printf("Type - %s\n\n",((const SANE_Device*)dev[i])->type);
i++;
}
}
}
exit_scanner();
return 0;
}
SANE_Status initialize_scanner(SANE_Int* version,SANE_Authorization_Callback callback)
{
return sane_init (version,callback);
}
void exit_scanner(void)
{
sane_exit();
}
SANE_Status get_scanners(const SANE_Device*** device, SANE_Bool local)
{
return sane_get_devices (device,local);
}
Thanks in advance
Aneesh
----- Original Message -----
From: aneesh m raj
To: sane-devel at www.mostang.com
Sent: Friday, June 13, 2003 2:59 PM
Subject: [sane-devel] problem with UMAX 2000P printer
Hi ,
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.
Regards
Aneesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20030613/474fe944/attachment.htm>
More information about the sane-devel
mailing list