|
From: Stephan M. <ste...@we...> - 2007-04-10 20:14:12
|
> 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 |
|
From: Stephan M. <ste...@we...> - 2007-04-10 20:46:40
|
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.h I 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 |
|
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
>
|
|
From: Dan M. <dan...@gm...> - 2007-04-11 16:24:54
|
Hi there, One more thing to add: when I call the function usb_set_configuration(devH, 1), if I change the 1 to zero, then I pass thru the configuration, but then I don't get to claim the interface (get an error on this function: usb_claim_interface(devH, 0) . I tried changing the number on this function too, but it didn't work. Hope that helped a bit. Dan On 4/11/07, Dan Martins <dan...@gm...> wrote: > > 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 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 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 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 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.h I 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 <http://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 <http://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 > > > > |
|
From: Stephan M. <ste...@we...> - 2007-04-11 17:13:55
|
>=20 > I used the DebugView, but when I use the bulk program, it only returns t= wo blank lines. When I use the=20 > test program, it returns lots of things. Here are the logs: Add usb=5Fset=5Fdebug(255) after usb=5Finit() to bulk.c.=20 It should print out some debug information then. What errors do you see=3F >=20 > [...] >=20 > And here goes the device's descriptors: >=20 Thanks, that explains why Windows won't configure your four devices: * each device has two isochronous endpoints (bmAttributes =3D=3D 0x01) * each of these endpoints has a wMaxPacketSize value of 1024 and a bInterval value of 1 According to the USB spec (section 9.6.6) your four devices would require the following bandwidth to operate (I assume that your devices are high-sp= eed USB): * interval: bInterval =3D=3D 1 =3D> 2^(bInterval - 1) * 125=B5s =3D> 125=B5s * bandwidth of one endpoint: 1024/125=B5s * 1000 =3D 8Mbytes/s * bandwidth of one device: 8Mbytes/s * 2 =3D 16Mbytes/s * bandwidth of four devices: 64MBytes/s !! One single host controller just can't handle this amount of data. That's why Windows refuses to configure more than two devices. =20 But it should work if you spread your devices across multiple host controllers. Apart from that, your device's firmware is not compliant with the USB specification. Quote from the spec, section 5.6.3: "All device default interface settings must not include any isochronous=20 endpoints with non-zero data payload sizes (specified via wMaxPacketSize=20 in the endpoint descriptor). Alternate interface settings may specify non= -zero=20 data payload sizes for isochronous endpoints. If the isochronous endpoint= s=20 have a large data payload size, it is recommended that additional alternat= e=20 configurations or interface settings be used to specify a range of data pa= yload=20 sizes. This increases the chance that the device can be used successfully= in combination with other USB devices." Hope this helps, Stephan > =20 >=20 >=20 > DLL version: 0.1.12.1 > Driver version: 0.1.12.1 >=20 >=20 > bus/device idVendor/idProduct > bus-0/\\.\libusb0-0001--0x0547-0x1002 0547/1002 > - Manufacturer : Micro-Star > - Product : USB TESTER > wTotalLength: 46 > bNumInterfaces: 1 > bConfigurationValue: 1 >=20 > iConfiguration: 0 > bmAttributes: 80h > MaxPower: 50 > bInterfaceNumber: 0 > bAlternateSetting: 0 > bNumEndpoints: 4 > bInterfaceClass: 255 > bInterfaceSubClass: 0 >=20 > bInterfaceProtocol: 0 > iInterface: 0 > bEndpointAddress: 02h > bmAttributes: 01h > wMaxPacketSize: 1024 > bInterval: 1 > bRefresh: 0 > bSynchAddress: 0 >=20 > 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 >=20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/=3Fmc=3D021192 |
|
From: Stephan M. <ste...@we...> - 2007-04-11 17:18:23
|
That's sounds plausible. Configuration 0 contains no interfaces and thus consumes no bandwidth. Stephan > Hi there, > > One more thing to add: > > when I call the function usb_set_configuration(devH, 1), if I change the 1 to zero, then I pass thru the > configuration, but then I don't get to claim the interface (get an error on this function: > usb_claim_interface(devH, 0) . I tried changing the number on this function too, but it didn't work. > > Hope that helped a bit. > > Dan > > > > On 4/11/07, Dan Martins <dan...@gm...> wrote: > > 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 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 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 > 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 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.h I 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 > > > > > ----------------------------------------------------------------- > ------------------------------------------------------------------------- > 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 |
|
From: Dan M. <dan...@gm...> - 2007-04-11 17:58:48
|
Hello Stephan,
First of all, thank you for being so helpful and so quick! :D
Now let's get back to the problems:
1- I can't spread the devices as I have only one EHCI host controller.
2- I won't be able to use configuration 0, as if there's no interface, I
cannot transfer data, right?
3- Isn't there a way to lower the packetsize?
About the packetsize, the amount of data I can transfer has something
to do with it? Because I usually transfer 2048 bytes, and if I transfer onl=
y
64 bytes I'm still not able to use the third device. And if the maxpacktsiz=
e
is 1024, why can I transfer 2048? Could you point me something to read abou=
t
this?
4- Here goes DebugView log:
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
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 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 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 - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 905
LIBUSB-DRIVER - transfer_complete(): sequence 905: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 906
LIBUSB-DRIVER - transfer_complete(): sequence 906: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 907
LIBUSB-DRIVER - transfer_complete(): sequence 907: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 908
LIBUSB-DRIVER - transfer_complete(): sequence 908: 2048 bytes transmitted
LIBUSB-DRIVER - release_interface(): interface 0
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 909
LIBUSB-DRIVER - transfer_complete(): sequence 909: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 910
LIBUSB-DRIVER - transfer_complete(): sequence 910: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 911
LIBUSB-DRIVER - transfer_complete(): sequence 911: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 912
LIBUSB-DRIVER - transfer_complete(): sequence 912: 2048 bytes transmitted
LIBUSB-DRIVER - release_interface(): interface 0
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): 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
LIBUSB-DRIVER - get_descriptor(): buffer size 9
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 5000
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 5000
LIBUSB-DRIVER - set_configuration(): found interface 0
LIBUSB-DRIVER - set_configuration(): setting configuration 1 failed: status=
:
0xc0000001, urb-status: 0x80000700
You can see I make four transfers with each device: bulk write and read and
interrupt write and read. When I get to the third device, I get this error.
In my program, now I get the following error message:
Opened Device 3.
Configuring Device 3...................LIBUSB_DLL: error:
usb_set_configuration:
could not set config 1: win error: *Um dispositivo conectado ao sistema n=
=D2o
est=DF
funcionando.*
[error: setting config 1 failed]
The message in portuguese says: "a device conected to the system is not
working".
Any thoughts?
Cheers,
Dan
On 4/11/07, Stephan Meyer <ste...@we...> wrote:
>
>
> That's sounds plausible. Configuration 0 contains no interfaces
> and thus consumes no bandwidth.
>
> Stephan
>
>
>
> > Hi there,
> >
> > One more thing to add:
> >
> > when I call the function usb_set_configuration(devH, 1), if I change th=
e
> 1 to zero, then I pass thru the
> > configuration, but then I don't get to claim the interface (get an erro=
r
> on this function:
> > usb_claim_interface(devH, 0) . I tried changing the number on this
> function too, but it didn't work.
> >
> > Hope that helped a bit.
> >
> > Dan
> >
> >
> >
> > On 4/11/07, Dan Martins <dan...@gm...> wrote:
> >
> > 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 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 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
> > 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 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 t=
he
> same error. So would it be a power or bandwidth problem? I'll think of so=
me
> 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.h I get this only:
> > >
> > >
> > >
> > >
> > > #ifndef __ERROR_H__
> > > #define __ERROR_H__
> > >
> > >
> > > /* Connection timed out */
> > > #define ETIMEDOUT 116
> > >
> > >
> > > typedef enum {
> > > USB_ERROR_TYPE_NONE =3D 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 ca=
n
> 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 fin=
e.
> > >
> > >
> > >
> > > 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 refus=
e
> 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 cas=
h
> > > >
> > >
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
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=3D021192
> >
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > 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=3Djoin.php&p=3Dsourceforge&CID=3D=
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=3Djoin.php&p=3Dsourceforge&CID=3D=
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=3D021192
> >
> >
> >
> -------------------------------------------------------------------------
> >
> > 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=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> >
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >
> >
> >
> >
> > ------------...
[truncated message content] |
|
From: Stephan M. <ste...@we...> - 2007-04-11 18:37:52
|
> Hello Stephan, > > First of all, thank you for being so helpful and so quick! :D > > Now let's get back to the problems: > > 1- I can't spread the devices as I have only one EHCI host controller. That's bad. Buy a second PCI-EHCI controller card. They're cheap. > > 2- I won't be able to use configuration 0, as if there's no interface, I cannot transfer data, right? Exactly. > > 3- Isn't there a way to lower the packetsize? Yes, fix the firmware, move the isochronous endpoints to a second alternate interface setting. > > About the packetsize, the amount of data I can transfer has something to do with it? No, if you transfer more than max-packet-size then the host controller will automatically split your data into multiple packets. > Because I usually transfer 2048 bytes, and if I transfer only 64 bytes I'm still not able to use the third > device. And if the maxpacktsize is 1024, why can I transfer 2048? Could you point me something to > read about this? First of all, according to the log, your program transfers data to and from bulk endpoints, not to or from isochronous endpoints. Second, it's irrelevant how much data you *want* to transfer. In order to transfer data you first have to configure the device. But Windows won't do this since your device requests too much bandwidth, so you won't be able to transfer any single byte. > > 4- Here goes DebugView log: > And here's the relevant error: > LIBUSB-DRIVER - set_configuration(): setting configuration 1 failed: status: 0xc0000001, urb-status: > 0x80000700 0x80000700 means USBD_STATUS_NO_BANDWIDTH (from usbdi.h) The error should be self explanatory, Stephan _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 |
|
From: Dan M. <dan...@gm...> - 2007-04-11 19:17:29
|
So, for what I understood, I only have two options: 1 - Get another EHCI Host controller, so I can split the devices. 2 - Fix the firmware, so that the default interface setting has non isochrounous endpoints. Is that correct? If so, do you know any tool to edit the firmware? The hardware I'm using was not made by me, so I'll something to change ther firmware. Thanks Stephan, and Cheers! Dan On 4/11/07, Stephan Meyer <ste...@we...> wrote: > > > > Hello Stephan, > > > > First of all, thank you for being so helpful and so quick! :D > > > > Now let's get back to the problems: > > > > 1- I can't spread the devices as I have only one EHCI host controller. > > That's bad. Buy a second PCI-EHCI controller card. They're cheap. > > > > > 2- I won't be able to use configuration 0, as if there's no interface, I > cannot transfer data, right? > > Exactly. > > > > > 3- Isn't there a way to lower the packetsize? > > Yes, fix the firmware, move the isochronous endpoints to a second > alternate interface setting. > > > > > About the packetsize, the amount of data I can transfer has > something to do with it? > > No, if you transfer more than max-packet-size then the host controller > will > automatically split your data into multiple packets. > > > Because I usually transfer 2048 bytes, and if I transfer only 64 bytes > I'm still not able to use the third > > device. And if the maxpacktsize is 1024, why can I transfer 2048? Could > you point me something to > > read about this? > > First of all, according to the log, your program transfers data to and > from bulk endpoints, > not to or from isochronous endpoints. > Second, it's irrelevant how much data you *want* to transfer. In order to > transfer data > you first have to configure the device. But Windows won't do this since > your device > requests too much bandwidth, so you won't be able to transfer any single > byte. > > > > > 4- Here goes DebugView log: > > > > And here's the relevant error: > > > LIBUSB-DRIVER - set_configuration(): setting configuration 1 failed: > status: 0xc0000001, urb-status: > > 0x80000700 > > 0x80000700 means USBD_STATUS_NO_BANDWIDTH (from usbdi.h) > > The error should be self explanatory, > > Stephan > > _______________________________________________________________ > 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 > |
|
From: Stephan M. <ste...@we...> - 2007-04-11 20:10:46
|
> So, for what I understood, I only have two options: > > 1 - Get another EHCI Host controller, so I can split the devices. > That would be a workaround, but no solution. A new firmware would be a solution. > 2 - Fix the firmware, so that the default interface setting has non isochrounous endpoints. > > Is that correct? > If so, do you know any tool to edit the firmware? The hardware I'm using was not made by me, so I'll > something to change ther firmware. You need the firmware's source code to fix it, unless you want to spend endless hours reverse engineering hex files. Apart from that, by fixing the firmware on your own you will void the manufacturer's warranty. But, what about a third option?: Contact the manufacturer, tell them about the broken firmware and ask for a software update. If they won't do this, then send the device back and request a refund. Stephan _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 |
|
From: Dan M. <dan...@gm...> - 2007-04-11 21:13:43
|
Hello,
Stephan, thank you for all the information. I'll try to contact the
manufacturer as you suggested, but this will certainly take a lot of time.
Meanwhile, I'll try to workaround.
But I question raised in my mind: these devices have four endpoints. Two
isochronous (0x01) and two bulk (0x02), isn't that right? The endpoints I'm
using are isochronous and they work fine until I have the bandwidth issue.
But whenever I try to use the other two endpoints, the application just
freezes. There's no error message, no nothing. The program stops and I can't
even close it using Window's task manager. Do you have any idea why that
happens? If I could use the bulk endpoints, at least the bandwidth wouldn't
be a problem anymore, right?
here goes the testlib's log again:
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
Cheers!
Dan
On 4/11/07, Stephan Meyer <ste...@we...> wrote:
>
>
> > So, for what I understood, I only have two options:
> >
> > 1 - Get another EHCI Host controller, so I can split the devices.
> >
>
> That would be a workaround, but no solution. A new firmware would
> be a solution.
>
> > 2 - Fix the firmware, so that the default interface setting has non
> isochrounous endpoints.
> >
> > Is that correct?
> > If so, do you know any tool to edit the firmware? The hardware I'm using
> was not made by me, so I'll
> > something to change ther firmware.
>
> You need the firmware's source code to fix it, unless you want to spend
> endless
> hours reverse engineering hex files.
> Apart from that, by fixing the firmware on your own you will void the
> manufacturer's
> warranty.
>
> But, what about a third option?:
>
> Contact the manufacturer, tell them about the broken firmware and ask
> for a software update. If they won't do this, then send the device back
> and
> request a refund.
>
> Stephan
>
>
>
>
>
> _______________________________________________________________
> 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
>
|
|
From: Dan M. <dan...@gm...> - 2007-04-12 13:57:47
|
Hi there,
I made some tests using all the endpoints to see what messages I would get
from Debug View logs. Here are the results:
I can only write using endpoint 0x04. If I use endpoint 0x02, the
application freezes. If I use endpoints 0x86 or 0x88, I get invalid endpoint
error (error: _usb_setup_async: invalid endpoint 0x86-0x88).
Writing with endpoint 0x04, I made tests to see where I could read from.
Endpoint 0x88 works fine, but then I get the bandwidth problem. Using
endpoint 0x02, I get the invalid endpoint error (error: _usb_setup_async:
invalid endpoint 0x02). When I try the endpoint 0x86, I get the worst
result: application freezes and I can't even close it using Windows task
manager.
Debug View logs and the application error messages are shown below. Hope
this helps.
------------------------------------------------------------
*endpoint 0x02 direction OUT
endpoint 0x88-0x86-0x04 direction IN:*
------------------------------------------------------------
*DEBUG VIEW:*
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): 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
LIBUSB-DRIVER - get_descriptor(): buffer size 9
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 5000
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 5000
LIBUSB-DRIVER - set_configuration(): found interface 0
LIBUSB-DRIVER - update_pipe_info(): interface 0
LIBUSB-DRIVER - update_pipe_info(): endpoint address 0x02
LIBUSB-DRIVER - update_pipe_info(): endpoint address 0x04
LIBUSB-DRIVER - update_pipe_info(): endpoint address 0x86
LIBUSB-DRIVER - update_pipe_info(): endpoint address 0x88
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x02
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 0
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x02
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - call_usbd(): request timed out
*APPLICATION ERROR MESSAGES:*
No messages. Freeze.
*************************************************************************
*************************************************************************
------------------------------------------
*endpoint 0x86 direction OUT
endpoint 0x88 direction IN:
*------------------------------------------
*DEBUG VIEW:*
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 12
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x88
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - transfer_complete(): sequence 12: timeout error
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 13
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x88
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - transfer_complete(): sequence 13: timeout error
LIBUSB-DRIVER - release_interface(): interface 0
*APPLICATION ERROR MESSAGES:*
LIBUSB_DLL: info: usb_os_find_busses: found bus-0
LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0002--0x0547-0x1002<file://./libusb0-0002--0x0547-0x1002>on
bus-0
-------------------------------------
Opening Device 1 / 334d80.
Vendor ID: 1351
MY_VID: 1351
Product ID: 4098
MY_PID: 4098
EP_IN: 88
EP_OUT: 86
Opened Device 1.
Configuring Device 1...................Configurations Set.
Claiming Device's 1 Interface................Interface Claimed.
---->Bulk writing.................LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x86
Wrote -22 bytes em 0.005949 segundos [error: bulk write failed]
---->Bulk reading..................LIBUSB_DLL: error: usb_reap:
timeout error
Read -116 bytes em 0.509017 segundos [error: bulk read failed]
---->Interrupt writing............LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x86
Wrote -22 bytes em 0.006580 segundos [error: interrupt write failed]
---->Interrupt reading.............LIBUSB_DLL: error: usb_reap:
timeout error
Read -116 bytes em 0.530581 segundos [error: interrupt read failed]
Releasing Interface..............Interface Realeased
*************************************************************************
*************************************************************************
------------------------------------------
*endpoint 0x88 direction OUT
endpoint 0x88 direction IN:
*------------------------------------------
*DEBUG VIEW:*
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 16
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x88
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - transfer_complete(): sequence 16: timeout error
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x88
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 17
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x88
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - transfer_complete(): sequence 17: timeout error
LIBUSB-DRIVER - release_interface(): interface 0
*APPLICATION ERROR MESSAGES:*
LIBUSB_DLL: info: usb_os_find_busses: found bus-0
LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0002--0x0547-0x1002<file://./libusb0-0002--0x0547-0x1002>on
bus-0
-------------------------------------
Opening Device 1 / 334d80.
Vendor ID: 1351
MY_VID: 1351
Product ID: 4098
MY_PID: 4098
EP_IN: 88
EP_OUT: 88
Opened Device 1.
Configuring Device 1...................Configurations Set.
Claiming Device's 1 Interface................Interface Claimed.
---->Bulk writing.................LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x88
Wrote -22 bytes em 0.006056 segundos[error: bulk write failed]
---->Bulk reading..................LIBUSB_DLL: error: usb_reap:
timeout error
Read -116 bytes em 0.522915 segundos[error: bulk read failed]
---->Interrupt writing............LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x88
Wrote -22 bytes em 0.005569 segundos[error: interrupt write failed]
---->Interrupt reading.............LIBUSB_DLL: error: usb_reap:
timeout error
Read -116 bytes em 0.530075 segundos[error: interrupt read failed]
Releasing Interface..............Interface Realeased
*************************************************************************
*************************************************************************
------------------------------------------
*endpoint 0x04 direction OUT
endpoint 0x02 direction IN:*
------------------------------------------
*DEBUG VIEW:*
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 51
LIBUSB-DRIVER - transfer_complete(): sequence 51: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 52
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x04
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - transfer_complete(): sequence 52: timeout error
LIBUSB-DRIVER - release_interface(): interface 0
*APPLICATION ERROR MESSAGES*:
LIBUSB_DLL: info: usb_os_find_busses: found bus-0
LIBUSB_DLL: info: usb_os_find_devices: found
\\.\libusb0-0002--0x0547-0x1002<file://./libusb0-0002--0x0547-0x1002>on
bus-0
-------------------------------------
Opening Device 1 / 334d80.
Vendor ID: 1351
MY_VID: 1351
Product ID: 4098
MY_PID: 4098
EP_IN: 02
EP_OUT: 04
Opened Device 1.
Configuring Device 1...................Configurations Set.
Claiming Device's 1 Interface................Interface Claimed.
---->Bulk writing.................Wrote 2048 bytes em 0.002735segundos
---->Bulk reading..................LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x02
Read -22 bytes em 0.000351 segundos[error: bulk read failed]
---->Interrupt writing............LIBUSB_DLL: error: usb_reap:
timeout error
Wrote -116 bytes em 0.519622 segundos[error: interrupt write failed]
---->Interrupt reading.............LIBUSB_DLL: error:
_usb_setup_async: invalid endpoint 0x02
Read -22 bytes em 0.000248 segundos[error: interrupt read failed]
Releasing Interface..............Interface Realeased
*************************************************************************
*************************************************************************
------------------------------------------
*endpoint 0x04 direction OUT
endpoint 0x86 direction IN:
*------------------------------------------
*DEBUG VIEW*:
LIBUSB-DRIVER - set_configuration(): configuration 1
LIBUSB-DRIVER - set_configuration(): timeout 5000
LIBUSB-DRIVER - claim_interface(): interface 0
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction out
LIBUSB-DRIVER - transfer(): endpoint 0x04
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 16
LIBUSB-DRIVER - transfer_complete(): sequence 16: 2048 bytes transmitted
LIBUSB-DRIVER - transfer(): bulk or interrupt transfer
LIBUSB-DRIVER - transfer(): direction in
LIBUSB-DRIVER - transfer(): endpoint 0x86
LIBUSB-DRIVER - transfer(): size 2048
LIBUSB-DRIVER - transfer(): sequence 17
LIBUSB-DRIVER - abort_endpoint(): endpoint 0x86
LIBUSB-DRIVER - abort_endpoint(): timeout 5000
LIBUSB-DRIVER - call_usbd(): request timed out
*APPLICATION ERROR MESSAGES*:
No messages. Freeze.
On 4/11/07, Dan Martins <dan...@gm...> wrote:
>
> Hello,
>
> Stephan, thank you for all the information. I'll try to contact the
> manufacturer as you suggested, but this will certainly take a lot of time.
> Meanwhile, I'll try to workaround.
>
> But I question raised in my mind: these devices have four endpoints. Two
> isochronous (0x01) and two bulk (0x02), isn't that right? The endpoints I'm
> using are isochronous and they work fine until I have the bandwidth issue.
> But whenever I try to use the other two endpoints, the application just
> freezes. There's no error message, no nothing. The program stops and I can't
> even close it using Window's task manager. Do you have any idea why that
> happens? If I could use the bulk endpoints, at least the bandwidth wouldn't
> be a problem anymore, right?
>
> here goes the testlib's log again:
>
> 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
>
> Cheers!
>
> Dan
>
>
> On 4/11/07, Stephan Meyer <ste...@we...> wrote:
> >
> >
> > > So, for what I understood, I only have two options:
> > >
> > > 1 - Get another EHCI Host controller, so I can split the devices.
> > >
> >
> > That would be a workaround, but no solution. A new firmware would
> > be a solution.
> >
> > > 2 - Fix the firmware, so that the default interface setting has non
> > isochrounous endpoints.
> > >
> > > Is that correct?
> > > If so, do you know any tool to edit the firmware? The hardware I'm
> > using was not made by me, so I'll
> > > something to change ther firmware.
> >
> > You need the firmware's source code to fix it, unless you want to spend
> > endless
> > hours reverse engineering hex files.
> > Apart from that, by fixing the firmware on your own you will void the
> > manufacturer's
> > warranty.
> >
> > But, what about a third option?:
> >
> > Contact the manufacturer, tell them about the broken firmware and ask
> > for a software update. If they won't do this, then send the device back
> > and
> > request a refund.
> >
> > Stephan
> >
> >
> >
> >
> >
> > _______________________________________________________________
> > SMS schreiben mit WEB.DE <http://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
> >
>
>
|
|
From: Dan M. <dan...@gm...> - 2007-04-10 20:35:57
|
Hi Stephan,
1- I tried to find the error definitions before posting, and in errno.h I
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
>
|