<DIV>I have a Question that I encounter when I debug microtek2.c there is an Authorization function , when it will use ? is it when open xsane as a user not as a root so I must login first not as root and after that I can use the scanner , there is a problem that I don't understand where is goes wrong in this situation:</DIV> <DIV> </DIV> <DIV>1. when I use user login not root and then open xsane will have error the scanner I / O Port failed and the when I debug step by step to look for the error , it seems step into the sane_open function, and when after usb_open is open the handle device and after that step to usb_claim_interface it return error code. </DIV> <DIV> </DIV> <DIV>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</DIV> <DIV>sane_open (SANE_String_Const devicename, SANE_Handle *handle)<BR>{/*This function may return with one of the
following status codes.<BR> 1.SANE_STATUS_IO_ERROR: An error occured while communicating with the device.<BR> 2.SANE_STATUS_NO_MEM: An insufficent amount of memory is available.<BR> 3.SANE_STATUS_GOOD: XSane Open successfully.<BR> */</DIV> <DIV> Microtek_Scanner *ms = NULL;<BR> Microtek_Device *pdev;<BR></DIV> <DIV> if (devicename[0])<BR> {/* selected */<BR> for(pdev = pdevFirst;pdev; pdev = pdev->next)<BR> if(!strcmp(devicename,pdev->sane.name))<BR> break;<BR> /* no dynamic post-registration */<BR> }else<BR> {<BR> pdev=pdevFirst;<BR> }</DIV> <DIV> if (!pdev)<BR> return SANE_STATUS_INVAL;<BR> <BR> ms = (Microtek_Scanner *)calloc(1,
sizeof(Microtek_Scanner));<BR> if(!ms)<BR> return SANE_STATUS_NO_MEM;</DIV> <DIV> ms->dev = pdev;<BR> ms->next = ms_first_handle; /* register open handle */<BR> ms_first_handle = ms;<BR> //ms->model = pdev->model; /* memorize model */<BR> /* open and prepare USB scanner handle */<BR> ms->hdev = usb_open(pdev->dev);</DIV> <DIV> if (!ms->hdev)<BR> return SANE_STATUS_IO_ERROR;/*SetError(this,SANE_STATUS_IO_ERROR, "cannot open scanner device"); */<BR><FONT color=#ff0000> if (usb_claim_interface(ms->hdev, 0))<BR> return SANE_STATUS_IO_ERROR</FONT><FONT color=#007f40>;/*SetError(this,SANE_STATUS_IO_ERROR, "cannot claim IF"); */<BR></FONT> if (usb_set_configuration(ms->hdev, 1))<BR> return SANE_STATUS_IO_ERROR;/*SetError(this,SANE_STATUS_IO_ERROR, "cannot set USB config 1");
*/</DIV> <DIV>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</DIV> <DIV> </DIV> <DIV>after has appear this SANE_STATUS_IO_ERROR , I try to plug off the USB cable or plug off the power adapter from scanner and after 2 seconds, I plug on it again and after that I re-run the xsane and it succesfull open xsane, but when I restart the computer and use other to login not root it still have the problem SANE _STATUS_IO_ERROR, where is goes wrong ? it seems need root authorization isn't it ? because I use root there is no problem with IO ERROR. </DIV> <DIV> </DIV> <DIV>I use REDHAT 9 kernel 2.4.20-8 and sane-backend 1.0.15 and xsane.0.97 </DIV> <DIV> </DIV> <DIV>Thanks for your help</DIV> <DIV> </DIV> <DIV>Best regards,</DIV> <DIV>sofian</DIV><p>
                <hr size=1>New Yahoo! Messenger with Voice. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman5/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com">Call regular phones from your PC</a> and save big.