|
From: Dan M. <dan...@gm...> - 2007-04-11 14:53:18
|
Hi,
I used the DebugView, but when I use the bulk program, it only returns two
blank lines. When I use the test program, it returns lots of things. Here
are the logs:
*bulk.c:*
(two blank lines).
*test program:*
[2116] LIBUSB_DLL: info: usb_os_init: driver version: 0.1.12.1
[2116] LIBUSB_DLL: info: usb_os_find_busses: found bus-0
LIBUSB-DRIVER - get_descriptor(): buffer size 18
LIBUSB-DRIVER - get_descriptor(): type 0001
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 5000
[2116] LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0001--0x0547-0x1002 <file://./libusb0-0001--0x0547-0x1002> on
bus-0
LIBUSB-DRIVER - get_descriptor(): buffer size 18
LIBUSB-DRIVER - get_descriptor(): type 0001
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 5000
LIBUSB-DRIVER - get_descriptor(): buffer size 18
LIBUSB-DRIVER - get_descriptor(): type 0001
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 5000
[2116] LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0002--0x0547-0x1002 <file://./libusb0-0002--0x0547-0x1002> on
bus-0
LIBUSB-DRIVER - get_descriptor(): buffer size 18
LIBUSB-DRIVER - get_descriptor(): type 0001
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 5000
[2116] LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0003--0x0547-0x1002 <file://./libusb0-0003--0x0547-0x1002> on
bus-0
LIBUSB-DRIVER - get_descriptor(): buffer size 8
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 46
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 8
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
[2116] LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0004--0x0547-0x1002 <file://./libusb0-0004--0x0547-0x1002> on
bus-0
LIBUSB-DRIVER - get_descriptor(): buffer size 46
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 8
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 46
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 8
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 46
LIBUSB-DRIVER - get_descriptor(): type 0002
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0001
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0002
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0001
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0002
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0001
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0002
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0001
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0000
LIBUSB-DRIVER - get_descriptor(): language id 0000
LIBUSB-DRIVER - get_descriptor(): timeout 1000
LIBUSB-DRIVER - get_descriptor(): buffer size 255
LIBUSB-DRIVER - get_descriptor(): type 0003
LIBUSB-DRIVER - get_descriptor(): recipient 0000
LIBUSB-DRIVER - get_descriptor(): index 0002
LIBUSB-DRIVER - get_descriptor(): language id 1033
LIBUSB-DRIVER - get_descriptor(): timeout 1000
*And here goes the device's descriptors:*
DLL version: 0.1.12.1
Driver version: 0.1.12.1
bus/device idVendor/idProduct
bus-0/\\.\libusb0-0001--0x0547-0x1002 0547/1002
- Manufacturer : Micro-Star
- Product : USB TESTER
wTotalLength: 46
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 4
bInterfaceClass: 255
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 02h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 86h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 88h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bus-0/\\.\libusb0-0002--0x0547-0x1002 0547/1002
- Manufacturer : Micro-Star
- Product : USB TESTER
wTotalLength: 46
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 4
bInterfaceClass: 255
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 02h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 86h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 88h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bus-0/\\.\libusb0-0003--0x0547-0x1002 0547/1002
- Manufacturer : Micro-Star
- Product : USB TESTER
wTotalLength: 46
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 4
bInterfaceClass: 255
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 02h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 86h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 88h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bus-0/\\.\libusb0-0004--0x0547-0x1002 0547/1002
- Manufacturer : Micro-Star
- Product : USB TESTER
wTotalLength: 46
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: 80h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 4
bInterfaceClass: 255
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 02h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 04h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 86h
bmAttributes: 01h
wMaxPacketSize: 1024
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 88h
bmAttributes: 02h
wMaxPacketSize: 512
bInterval: 0
bRefresh: 0
bSynchAddress: 0
I made some tests and got even more confused: if I jump the first and second
devices, testing the third (or fourth) device first, I still get the same
error. So would it be a power or bandwidth problem? I'll think of some more
tests to do and will post here if I find something that could help.
Thanks and cheers!
Dan
On 4/10/07, Stephan Meyer <ste...@we...> wrote:
>
>
> What kind of error messages does DebugView
> (http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx)
> capture when you try to configure your devices?
>
> Also, it would be helpfull if you would post your device's descriptors
> (output
> of testlibusb-win.exe).
>
> Stephan
>
>
> > Hi Stephan,
> >
> >
> >
> > 1- I tried to find the error definitions before posting, and in errno.hI get this only:
> >
> >
> >
> >
> > #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_ */
> >
> > 2- There's no value named bMaxPower, but there is a MaxPower value,
> which is 50.
> >
> >
> >
> > 3- The devices are bus-powered.
> >
> >
> >
> > 4- I don't know if the endpoints have these characteristics, but I can
> interrupt write and read, so I guess the device has interrupt endpoints.
> About being isochronous, I can't really assure it is. It might be, as it is
> a 2.0 device.
> >
> >
> >
> > When I put three of these devices, I get this error, but if I put two
> devices and another bus-powered device, such as a pen-drive, it works fine.
> >
> >
> >
> > But if the problem is really windows refusing to configure the device,
> is there a way to make the SO not refuse it?
> >
> >
> >
> > Thanks for the answers Stephan!
> >
> >
> >
> > Cheers!
> >
> >
> >
> > Dan
> >
> >
> >
> > On 4/10/07, Stephan Meyer <ste...@we...> wrote:
> >
> >
> > > Hi there,
> > >
> > >
> > >
> > > Is there a table of the function's return values?
> >
> >
> > The error code are defined in errno.h. -5 means EIO (i/o error)
> >
> > >
> > >
> > >
> > > I'm using a test board that has four devices with the same
> characteristics, such as vendor and product
> > > ids, number of and address of endpoints, and all others. But when I
> try to use more than two of these
> >
> > > devices, I get a -5 error from the function usb_set_configuration() on
> the third device (after accessing
> > > writing and reading from the other two).
> >
> > This could be either a power or bandwidth problem. Windows will refuse
> to configure
> >
> > the devices of they request too much power or bandwidth.
> >
> > What's the bMaxPower value of your device's config descriptor? Are your
> four
> > devices connected to a bus-powered or to a self-powered hub?
> >
> > Do your devices have interrupt or isochronous endpoints?
> >
> > Stephan
> >
> >
> >
> > >
> > >
> > >
> > > Does anyone know what might be happening? Thanks in advance.
> > >
> > >
> > >
> > > Dan Leite Martins
> >
> > >
> > > -----------------------------------------------------------------
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> >
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > -----------------------------------------------------------------
> > > _______________________________________________
> >
> > > Libusb-win32-devel mailing list
> > > Lib...@li...
> > >
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > >
> >
> >
> > _______________________________________________________________
> > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> >
> > kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
> >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> >
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >
> >
> > -----------------------------------------------------------------
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > -----------------------------------------------------------------
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >
>
>
> _______________________________________________________________
> SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
|