| 
      
      
      From: Mark B. <mc...@ec...> - 2006-06-22 16:44:46
      
     | 
| That's libusb's error.h. I meant errno.h from the compiler's standard 
headers - maybe I wasn't as clear as I could have been. MinGW has a 
comment by each value here, can't comment on how helpful other compilers 
might be:
#define    EIO        5    /* Input/output error */
Mark.
Andrew Xiang wrote:
>Here is the errno.h,  I don't see -5.
>
>-Andrew
>
>#ifndef __ERROR_H__
>#define __ERROR_H__
>
>/* Connection timed out */
>#define ETIMEDOUT 116
>
>typedef enum {
>  USB_ERROR_TYPE_NONE = 0,
>  USB_ERROR_TYPE_STRING,
>  USB_ERROR_TYPE_ERRNO,
>} usb_error_type_t;
>
>
>void usb_error(char *format, ...);
>void usb_message(char *format, ...);
>const char *usb_win_error_to_string(void);
>int usb_win_error_to_errno(void);
>
>
>
>#endif /* _ERROR_H_ */
>
>
>----- Original Message ----- 
>From: "Mark Bourne" <mb...@ze...>
>To: "Andrew Xiang" <xi...@gr...>;
><lib...@li...>
>Sent: Wednesday, June 21, 2006 4:22 PM
>Subject: Re: [Libusb-win32-devel] win-libusb async read
>
>
>  
>
>>You can set an environment variable USB_DEBUG to 1 or 2 for debug
>>messages. Also the C header file errno.h may give some clue as to what
>>the error numbers mean.
>>
>>Mark.
>>
>>
>>Andrew Xiang wrote:
>>
>>    
>>
>>>Where do  I find out the file that keep a list of error like -5? And how
>>>      
>>>
>can
>  
>
>>>I enable the usberror output? I guess I have to have the DDK to recompile
>>>it? I don't have  the DDK installed.
>>>
>>>I cannot use multiple of 64, because there is the only way to detect end
>>>      
>>>
>of
>  
>
>>>the packet. Each block is 64bytes, if the block is not 64 blocks, that
>>>      
>>>
>means
>  
>
>>>it is the last block. This is the only way in the device I am using.
>>>      
>>>
>Maybe I
>  
>
>>>am missing something.
>>>
>>>I think I might have some hardware noise problem. Because I did not see
>>>      
>>>
>the
>  
>
>>>problem on another hardware.
>>>
>>>
>>>-Andrew
>>>
>>>
>>>----- Original Message ----- 
>>>From: "Stephan Meyer" <ste...@we...>
>>>To: <lib...@li...>; "Andrew Xiang"
>>><xi...@gr...>
>>>Sent: Wednesday, June 21, 2006 3:49 PM
>>>Subject: Re: [Libusb-win32-devel] win-libusb async read
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>>#define BUF_SIZE (64*20+11)
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>Can you always guarantee that the last packet your device
>>>>sends is 11 bytes or less? If not, then set  BUF_SIZE to a multiple
>>>>of the endpoint's buffer size. Otherwise your device might produce
>>>>'data overrun' errors (this may cause the -5 error you got).
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>while(end_thread==0)
>>>>>{
>>>>>usb_bulk_setup_async(dev, &context0, EP_IN);
>>>>>  usb_submit_async(context0, tmp1, sizeof(tmp1));
>>>>>bytesread=usb_reap_async(context0, INFINITE);
>>>>>printf("%d bytes read back\n", bytesread);
>>>>>}
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>You forgot to free 'context', call usb_free_async().
>>>>_____________________________________________________________________
>>>>Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
>>>>http://smartsurfer.web.de/?mc=100071&distributionid=000000000071
>>>>
>>>>
>>>>All the advantages of Linux Managed Hosting--Without the Cost and Risk!
>>>>Fully trained technicians. The highest number of Red Hat certifications
>>>>        
>>>>
>in
>  
>
>>>>the hosting industry. Fanatical Support. Click to learn more
>>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
>>>>_______________________________________________
>>>>Libusb-win32-devel mailing list
>>>>Lib...@li...
>>>>https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>All the advantages of Linux Managed Hosting--Without the Cost and Risk!
>>>Fully trained technicians. The highest number of Red Hat certifications
>>>      
>>>
>in
>  
>
>>>the hosting industry. Fanatical Support. Click to learn more
>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
>>>_______________________________________________
>>>Libusb-win32-devel mailing list
>>>Lib...@li...
>>>https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>>>
>>>
>>>      
>>>
>>All the advantages of Linux Managed Hosting--Without the Cost and Risk!
>>Fully trained technicians. The highest number of Red Hat certifications in
>>the hosting industry. Fanatical Support. Click to learn more
>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
>>_______________________________________________
>>Libusb-win32-devel mailing list
>>Lib...@li...
>>https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>>
>>    
>>
>
>
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Libusb-win32-devel mailing list
>Lib...@li...
>https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>  
>
 |