| 
      
      
      From: Ampfing <Mic...@gm...> - 2007-11-09 07:45:40
       | 
| 
Hi,
I have a VisualC++ 6.0-application (MFC) for Windows XP.
This application is supposed to communicate with a microcontroller using
Bulk writes over USB.
With an older version of libusb (can't tell you the version, but it's from
05 August 2006) the application works fine. Now I downloaded the newest
version of libusb (not the filter-driver!) and created a new inf-file.
After installing the new driver the application does not work any more!
The relevant code is:
---------------------------------------------------
usb_init();
usb_find_busses();
usb_find_devices();
for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
{
	struct usb_device *dev;
	for (dev = m_bus->devices; dev; dev = dev->next)
	{
		if (dev->descriptor.bDeviceClass == 0xff)	//find for vendor specific class
		{
			m_dev = usb_open(dev);
			if (m_dev)
			{
				if ((dev->descriptor.idVendor == USB_VENDOR) && 
				(dev->descriptor.idProduct == USB_PRODUCT))
				{
					int err;
					err = usb_set_configuration(m_dev, 1);
					if (err)
					{
						char* s= usb_strerror();
						m_strInitStatus = s;
						UpdateData(FALSE);
						return;
					}
					err = usb_claim_interface(m_dev, 0);
					if (err)
					{
						char* s= usb_strerror();
						m_strInitStatus = s;
						UpdateData(FALSE);
						return;
					}
				}
			}
		}
	}
}
------------------------------------------------------------------------------------
With the new version of libusb the usb_set_configuration(...) call returns
with an error and tells me, that configuration 1 could not be set because
the parameter is invalid...
If I use the new libusb0.dll, the new libusb.lib and the OLD libusb0.sys the
application works fine again.
Can someone please tell me where I am going wrong?
Thank you in advantage for your help
-- 
View this message in context: http://www.nabble.com/application-works-with-older-libusb-win32-but-not-with-version-0.1.12.1-tf4770195.html#a13644735
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
 | 
| 
      
      
      From: Stephan M. <Ste...@ia...> - 2007-11-09 09:35:01
       | 
| What's the error message returned
by usb_strerror()?
Stephan
> 
> Hi,
> 
> I have a VisualC++ 6.0-application (MFC) for Windows XP.
> This application is supposed to communicate with a microcontroller using
> Bulk writes over USB.
> With an older version of libusb (can't tell you the version, but it's 
from
> 05 August 2006) the application works fine. Now I downloaded the newest
> version of libusb (not the filter-driver!) and created a new inf-file.
> After installing the new driver the application does not work any more!
> The relevant code is:
> ---------------------------------------------------
> usb_init();
> usb_find_busses();
> usb_find_devices();
> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
> {
>    struct usb_device *dev;
>    for (dev = m_bus->devices; dev; dev = dev->next)
>    {
>       if (dev->descriptor.bDeviceClass == 0xff)   //find for vendor 
> specific class
>       {
>          m_dev = usb_open(dev);
>          if (m_dev)
>          {
>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
>             (dev->descriptor.idProduct == USB_PRODUCT))
>             {
>                int err;
>                err = usb_set_configuration(m_dev, 1);
>                if (err)
>                {
>                   char* s= usb_strerror();
>                   m_strInitStatus = s;
>                   UpdateData(FALSE);
>                   return;
>                }
>                err = usb_claim_interface(m_dev, 0);
>                if (err)
>                {
>                   char* s= usb_strerror();
>                   m_strInitStatus = s;
>                   UpdateData(FALSE);
>                   return;
>                }
>             }
>          }
>       }
>    }
> }
> 
------------------------------------------------------------------------------------
> 
> With the new version of libusb the usb_set_configuration(...) call 
returns
> with an error and tells me, that configuration 1 could not be set 
because
> the parameter is invalid...
> If I use the new libusb0.dll, the new libusb.lib and the OLD libusb0.sys 
the
> application works fine again.
> 
> Can someone please tell me where I am going wrong?
> Thank you in advantage for your help
> -- 
> View this message in context: http://www.nabble.com/application-
> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> tf4770195.html#a13644735
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> 
> 
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
 | 
| 
      
      
      From: Ampfing <Mic...@gm...> - 2007-11-09 10:39:35
       | 
| 
Hi,
the error message is
"usb_set_configuration: could not set config 1: win error: The parameter is
incorrect.".
Michael
Stephan Meyer-2 wrote:
> 
> What's the error message returned
> by usb_strerror()?
> 
> Stephan
> 
> 
>> 
>> Hi,
>> 
>> I have a VisualC++ 6.0-application (MFC) for Windows XP.
>> This application is supposed to communicate with a microcontroller using
>> Bulk writes over USB.
>> With an older version of libusb (can't tell you the version, but it's 
> from
>> 05 August 2006) the application works fine. Now I downloaded the newest
>> version of libusb (not the filter-driver!) and created a new inf-file.
>> After installing the new driver the application does not work any more!
>> The relevant code is:
>> ---------------------------------------------------
>> usb_init();
>> usb_find_busses();
>> usb_find_devices();
>> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
>> {
>>    struct usb_device *dev;
>>    for (dev = m_bus->devices; dev; dev = dev->next)
>>    {
>>       if (dev->descriptor.bDeviceClass == 0xff)   //find for vendor 
>> specific class
>>       {
>>          m_dev = usb_open(dev);
>>          if (m_dev)
>>          {
>>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
>>             (dev->descriptor.idProduct == USB_PRODUCT))
>>             {
>>                int err;
>>                err = usb_set_configuration(m_dev, 1);
>>                if (err)
>>                {
>>                   char* s= usb_strerror();
>>                   m_strInitStatus = s;
>>                   UpdateData(FALSE);
>>                   return;
>>                }
>>                err = usb_claim_interface(m_dev, 0);
>>                if (err)
>>                {
>>                   char* s= usb_strerror();
>>                   m_strInitStatus = s;
>>                   UpdateData(FALSE);
>>                   return;
>>                }
>>             }
>>          }
>>       }
>>    }
>> }
>> 
> ------------------------------------------------------------------------------------
>> 
>> With the new version of libusb the usb_set_configuration(...) call 
> returns
>> with an error and tells me, that configuration 1 could not be set 
> because
>> the parameter is invalid...
>> If I use the new libusb0.dll, the new libusb.lib and the OLD libusb0.sys 
> the
>> application works fine again.
>> 
>> Can someone please tell me where I am going wrong?
>> Thank you in advantage for your help
>> -- 
>> View this message in context: http://www.nabble.com/application-
>> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> tf4770195.html#a13644735
>> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>> 
>> 
>> 
> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Libusb-win32-devel mailing list
>> Lib...@li...
>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
-- 
View this message in context: http://www.nabble.com/application-works-with-older-libusb-win32-but-not-with-version-0.1.12.1-tf4770195.html#a13664629
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
 | 
| 
      
      
      From: Stephan M. <Ste...@ia...> - 2007-11-09 11:42:07
       | 
| > err = usb_set_configuration(m_dev, 1);
* is '1' a valid configuration value?
  This value must by the config-descriptors 'bConfigurationValue'
* try usb_set_configuration(m_dev, dev->config[0].bConfigurationValue) 
Stephan
> 
> Hi,
> 
> the error message is
> "usb_set_configuration: could not set config 1: win error: The parameter 
is
> incorrect.".
> 
> Michael
> 
> 
> Stephan Meyer-2 wrote:
> > 
> > What's the error message returned
> > by usb_strerror()?
> > 
> > Stephan
> > 
> > 
> >> 
> >> Hi,
> >> 
> >> I have a VisualC++ 6.0-application (MFC) for Windows XP.
> >> This application is supposed to communicate with a microcontroller 
using
> >> Bulk writes over USB.
> >> With an older version of libusb (can't tell you the version, but it's 
> > from
> >> 05 August 2006) the application works fine. Now I downloaded the 
newest
> >> version of libusb (not the filter-driver!) and created a new 
inf-file.
> >> After installing the new driver the application does not work any 
more!
> >> The relevant code is:
> >> ---------------------------------------------------
> >> usb_init();
> >> usb_find_busses();
> >> usb_find_devices();
> >> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
> >> {
> >>    struct usb_device *dev;
> >>    for (dev = m_bus->devices; dev; dev = dev->next)
> >>    {
> >>       if (dev->descriptor.bDeviceClass == 0xff)   //find for vendor 
> >> specific class
> >>       {
> >>          m_dev = usb_open(dev);
> >>          if (m_dev)
> >>          {
> >>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
> >>             (dev->descriptor.idProduct == USB_PRODUCT))
> >>             {
> >>                int err;
> >>                err = usb_set_configuration(m_dev, 1);
> >>                if (err)
> >>                {
> >>                   char* s= usb_strerror();
> >>                   m_strInitStatus = s;
> >>                   UpdateData(FALSE);
> >>                   return;
> >>                }
> >>                err = usb_claim_interface(m_dev, 0);
> >>                if (err)
> >>                {
> >>                   char* s= usb_strerror();
> >>                   m_strInitStatus = s;
> >>                   UpdateData(FALSE);
> >>                   return;
> >>                }
> >>             }
> >>          }
> >>       }
> >>    }
> >> }
> >> 
> > 
> 
------------------------------------------------------------------------------------
> >> 
> >> With the new version of libusb the usb_set_configuration(...) call 
> > returns
> >> with an error and tells me, that configuration 1 could not be set 
> > because
> >> the parameter is invalid...
> >> If I use the new libusb0.dll, the new libusb.lib and the OLD 
libusb0.sys 
> > the
> >> application works fine again.
> >> 
> >> Can someone please tell me where I am going wrong?
> >> Thank you in advantage for your help
> >> -- 
> >> View this message in context: http://www.nabble.com/application-
> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> tf4770195.html#a13644735
> >> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> >> 
> >> 
> >> 
> > 
-------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems?  Stop.
> >> Now Search log events and configuration files using AJAX and a 
browser.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> Libusb-win32-devel mailing list
> >> Lib...@li...
> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> > 
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a 
browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/application-
> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> tf4770195.html#a13664629
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> 
> 
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
 | 
| 
      
      
      From: Ampfing <Mic...@gm...> - 2007-11-09 11:55:14
       | 
| 
Hi,
> is '1' a valid configuration value?
well, it should be as the application can be run with the older version of
libusb...
I tried using your code and now the application runs over the
usb_set_configuration. But now the next call (the one to
usb_claim_interface()) returns an error...
Here is the message:
"usb_claim_interface: could not claim interface 0, invalid configuration 0".
So as I understand configuration 0 is set by the set_configuration and is
not valid. But why?? I mean it does work (with the older version of the
library)!
Thanks in advance
Stephan Meyer-2 wrote:
> 
>> err = usb_set_configuration(m_dev, 1);
> 
> * is '1' a valid configuration value?
>   This value must by the config-descriptors 'bConfigurationValue'
> * try usb_set_configuration(m_dev, dev->config[0].bConfigurationValue) 
> 
> Stephan
> 
> 
>> 
>> Hi,
>> 
>> the error message is
>> "usb_set_configuration: could not set config 1: win error: The parameter 
> is
>> incorrect.".
>> 
>> Michael
>> 
>> 
>> Stephan Meyer-2 wrote:
>> > 
>> > What's the error message returned
>> > by usb_strerror()?
>> > 
>> > Stephan
>> > 
>> > 
>> >> 
>> >> Hi,
>> >> 
>> >> I have a VisualC++ 6.0-application (MFC) for Windows XP.
>> >> This application is supposed to communicate with a microcontroller 
> using
>> >> Bulk writes over USB.
>> >> With an older version of libusb (can't tell you the version, but it's 
> 
>> > from
>> >> 05 August 2006) the application works fine. Now I downloaded the 
> newest
>> >> version of libusb (not the filter-driver!) and created a new 
> inf-file.
>> >> After installing the new driver the application does not work any 
> more!
>> >> The relevant code is:
>> >> ---------------------------------------------------
>> >> usb_init();
>> >> usb_find_busses();
>> >> usb_find_devices();
>> >> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
>> >> {
>> >>    struct usb_device *dev;
>> >>    for (dev = m_bus->devices; dev; dev = dev->next)
>> >>    {
>> >>       if (dev->descriptor.bDeviceClass == 0xff)   //find for vendor 
>> >> specific class
>> >>       {
>> >>          m_dev = usb_open(dev);
>> >>          if (m_dev)
>> >>          {
>> >>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
>> >>             (dev->descriptor.idProduct == USB_PRODUCT))
>> >>             {
>> >>                int err;
>> >>                err = usb_set_configuration(m_dev, 1);
>> >>                if (err)
>> >>                {
>> >>                   char* s= usb_strerror();
>> >>                   m_strInitStatus = s;
>> >>                   UpdateData(FALSE);
>> >>                   return;
>> >>                }
>> >>                err = usb_claim_interface(m_dev, 0);
>> >>                if (err)
>> >>                {
>> >>                   char* s= usb_strerror();
>> >>                   m_strInitStatus = s;
>> >>                   UpdateData(FALSE);
>> >>                   return;
>> >>                }
>> >>             }
>> >>          }
>> >>       }
>> >>    }
>> >> }
>> >> 
>> > 
>> 
> ------------------------------------------------------------------------------------
>> >> 
>> >> With the new version of libusb the usb_set_configuration(...) call 
>> > returns
>> >> with an error and tells me, that configuration 1 could not be set 
>> > because
>> >> the parameter is invalid...
>> >> If I use the new libusb0.dll, the new libusb.lib and the OLD 
> libusb0.sys 
>> > the
>> >> application works fine again.
>> >> 
>> >> Can someone please tell me where I am going wrong?
>> >> Thank you in advantage for your help
>> >> -- 
>> >> View this message in context: http://www.nabble.com/application-
>> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> >> tf4770195.html#a13644735
>> >> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>> >> 
>> >> 
>> >> 
>> > 
> -------------------------------------------------------------------------
>> >> This SF.net email is sponsored by: Splunk Inc.
>> >> Still grepping through log files to find problems?  Stop.
>> >> Now Search log events and configuration files using AJAX and a 
> browser.
>> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> >> _______________________________________________
>> >> Libusb-win32-devel mailing list
>> >> Lib...@li...
>> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> > 
>> > 
>> > 
> -------------------------------------------------------------------------
>> > This SF.net email is sponsored by: Splunk Inc.
>> > Still grepping through log files to find problems?  Stop.
>> > Now Search log events and configuration files using AJAX and a 
> browser.
>> > Download your FREE copy of Splunk now >> http://get.splunk.com/
>> > _______________________________________________
>> > Libusb-win32-devel mailing list
>> > Lib...@li...
>> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> > 
>> > 
>> 
>> -- 
>> View this message in context: http://www.nabble.com/application-
>> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> tf4770195.html#a13664629
>> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>> 
>> 
>> 
> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Libusb-win32-devel mailing list
>> Lib...@li...
>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
-- 
View this message in context: http://www.nabble.com/application-works-with-older-libusb-win32-but-not-with-version-0.1.12.1-tf4770195.html#a13665547
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
 | 
| 
      
      
      From: Stephan M. <Ste...@ia...> - 2007-11-09 12:03:06
       | 
| dev->config[0].bConfigurationValue should be >=1.
Could you please post your configuration descriptor(s)?
Stephan
> 
> Hi,
> 
> > is '1' a valid configuration value?
> well, it should be as the application can be run with the older version 
of
> libusb...
> I tried using your code and now the application runs over the
> usb_set_configuration. But now the next call (the one to
> usb_claim_interface()) returns an error...
> Here is the message:
> "usb_claim_interface: could not claim interface 0, invalid configuration 
0".
> 
> So as I understand configuration 0 is set by the set_configuration and 
is
> not valid. But why?? I mean it does work (with the older version of the
> library)!
> 
> Thanks in advance
> 
> 
> Stephan Meyer-2 wrote:
> > 
> >> err = usb_set_configuration(m_dev, 1);
> > 
> > * is '1' a valid configuration value?
> >   This value must by the config-descriptors 'bConfigurationValue'
> > * try usb_set_configuration(m_dev, dev->config[0].bConfigurationValue) 
> > 
> > Stephan
> > 
> > 
> >> 
> >> Hi,
> >> 
> >> the error message is
> >> "usb_set_configuration: could not set config 1: win error: The 
parameter 
> > is
> >> incorrect.".
> >> 
> >> Michael
> >> 
> >> 
> >> Stephan Meyer-2 wrote:
> >> > 
> >> > What's the error message returned
> >> > by usb_strerror()?
> >> > 
> >> > Stephan
> >> > 
> >> > 
> >> >> 
> >> >> Hi,
> >> >> 
> >> >> I have a VisualC++ 6.0-application (MFC) for Windows XP.
> >> >> This application is supposed to communicate with a microcontroller 
> > using
> >> >> Bulk writes over USB.
> >> >> With an older version of libusb (can't tell you the version, but 
it's 
> > 
> >> > from
> >> >> 05 August 2006) the application works fine. Now I downloaded the 
> > newest
> >> >> version of libusb (not the filter-driver!) and created a new 
> > inf-file.
> >> >> After installing the new driver the application does not work any 
> > more!
> >> >> The relevant code is:
> >> >> ---------------------------------------------------
> >> >> usb_init();
> >> >> usb_find_busses();
> >> >> usb_find_devices();
> >> >> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
> >> >> {
> >> >>    struct usb_device *dev;
> >> >>    for (dev = m_bus->devices; dev; dev = dev->next)
> >> >>    {
> >> >>       if (dev->descriptor.bDeviceClass == 0xff)   //find for 
vendor 
> >> >> specific class
> >> >>       {
> >> >>          m_dev = usb_open(dev);
> >> >>          if (m_dev)
> >> >>          {
> >> >>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
> >> >>             (dev->descriptor.idProduct == USB_PRODUCT))
> >> >>             {
> >> >>                int err;
> >> >>                err = usb_set_configuration(m_dev, 1);
> >> >>                if (err)
> >> >>                {
> >> >>                   char* s= usb_strerror();
> >> >>                   m_strInitStatus = s;
> >> >>                   UpdateData(FALSE);
> >> >>                   return;
> >> >>                }
> >> >>                err = usb_claim_interface(m_dev, 0);
> >> >>                if (err)
> >> >>                {
> >> >>                   char* s= usb_strerror();
> >> >>                   m_strInitStatus = s;
> >> >>                   UpdateData(FALSE);
> >> >>                   return;
> >> >>                }
> >> >>             }
> >> >>          }
> >> >>       }
> >> >>    }
> >> >> }
> >> >> 
> >> > 
> >> 
> > 
> 
------------------------------------------------------------------------------------
> >> >> 
> >> >> With the new version of libusb the usb_set_configuration(...) call 
> >> > returns
> >> >> with an error and tells me, that configuration 1 could not be set 
> >> > because
> >> >> the parameter is invalid...
> >> >> If I use the new libusb0.dll, the new libusb.lib and the OLD 
> > libusb0.sys 
> >> > the
> >> >> application works fine again.
> >> >> 
> >> >> Can someone please tell me where I am going wrong?
> >> >> Thank you in advantage for your help
> >> >> -- 
> >> >> View this message in context: http://www.nabble.com/application-
> >> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> >> tf4770195.html#a13644735
> >> >> Sent from the LibUSB Dev - Win32 mailing list archive at 
Nabble.com.
> >> >> 
> >> >> 
> >> >> 
> >> > 
> > 
-------------------------------------------------------------------------
> >> >> This SF.net email is sponsored by: Splunk Inc.
> >> >> Still grepping through log files to find problems?  Stop.
> >> >> Now Search log events and configuration files using AJAX and a 
> > browser.
> >> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> >> _______________________________________________
> >> >> Libusb-win32-devel mailing list
> >> >> Lib...@li...
> >> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> > 
> >> > 
> >> > 
> > 
-------------------------------------------------------------------------
> >> > This SF.net email is sponsored by: Splunk Inc.
> >> > Still grepping through log files to find problems?  Stop.
> >> > Now Search log events and configuration files using AJAX and a 
> > browser.
> >> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> > _______________________________________________
> >> > Libusb-win32-devel mailing list
> >> > Lib...@li...
> >> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> > 
> >> > 
> >> 
> >> -- 
> >> View this message in context: http://www.nabble.com/application-
> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> tf4770195.html#a13664629
> >> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> >> 
> >> 
> >> 
> > 
-------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems?  Stop.
> >> Now Search log events and configuration files using AJAX and a 
browser.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> Libusb-win32-devel mailing list
> >> Lib...@li...
> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> > 
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a 
browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/application-
> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> tf4770195.html#a13665547
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> 
> 
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
 | 
| 
      
      
      From: Ampfing <Mic...@gm...> - 2007-11-09 12:15:50
       | 
| 
Well, since the application on the controller is not written by me I can't
give you the code. But I can post what TestLibUsb gives me:
  wTotalLength:         46
  bNumInterfaces:       1
  bConfigurationValue:  0
  iConfiguration:       0
  bmAttributes:         80h
  MaxPower:             50
    bInterfaceNumber:   0
    bAlternateSetting:  0
    bNumEndpoints:      4
    bInterfaceClass:    255
    bInterfaceSubClass: 0
    bInterfaceProtocol: 0
    iInterface:         0
      bEndpointAddress: 01h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 81h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 02h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 82h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
As you can see, the bConfigurationValue is 0, not 1. Is that the problem?
And if it is, why does it work with the older version of the lib? Do I have
to change the value to 1 (which might be a problem as I can't flash the
controller...)?
Best regards
Stephan Meyer-2 wrote:
> 
> dev->config[0].bConfigurationValue should be >=1.
> Could you please post your configuration descriptor(s)?
> 
> Stephan
> 
>> 
>> Hi,
>> 
>> > is '1' a valid configuration value?
>> well, it should be as the application can be run with the older version 
> of
>> libusb...
>> I tried using your code and now the application runs over the
>> usb_set_configuration. But now the next call (the one to
>> usb_claim_interface()) returns an error...
>> Here is the message:
>> "usb_claim_interface: could not claim interface 0, invalid configuration 
> 0".
>> 
>> So as I understand configuration 0 is set by the set_configuration and 
> is
>> not valid. But why?? I mean it does work (with the older version of the
>> library)!
>> 
>> Thanks in advance
>> 
>> 
>> Stephan Meyer-2 wrote:
>> > 
>> >> err = usb_set_configuration(m_dev, 1);
>> > 
>> > * is '1' a valid configuration value?
>> >   This value must by the config-descriptors 'bConfigurationValue'
>> > * try usb_set_configuration(m_dev, dev->config[0].bConfigurationValue) 
> 
>> > 
>> > Stephan
>> > 
>> > 
>> >> 
>> >> Hi,
>> >> 
>> >> the error message is
>> >> "usb_set_configuration: could not set config 1: win error: The 
> parameter 
>> > is
>> >> incorrect.".
>> >> 
>> >> Michael
>> >> 
>> >> 
>> >> Stephan Meyer-2 wrote:
>> >> > 
>> >> > What's the error message returned
>> >> > by usb_strerror()?
>> >> > 
>> >> > Stephan
>> >> > 
>> >> > 
>> >> >> 
>> >> >> Hi,
>> >> >> 
>> >> >> I have a VisualC++ 6.0-application (MFC) for Windows XP.
>> >> >> This application is supposed to communicate with a microcontroller 
> 
>> > using
>> >> >> Bulk writes over USB.
>> >> >> With an older version of libusb (can't tell you the version, but 
> it's 
>> > 
>> >> > from
>> >> >> 05 August 2006) the application works fine. Now I downloaded the 
>> > newest
>> >> >> version of libusb (not the filter-driver!) and created a new 
>> > inf-file.
>> >> >> After installing the new driver the application does not work any 
>> > more!
>> >> >> The relevant code is:
>> >> >> ---------------------------------------------------
>> >> >> usb_init();
>> >> >> usb_find_busses();
>> >> >> usb_find_devices();
>> >> >> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
>> >> >> {
>> >> >>    struct usb_device *dev;
>> >> >>    for (dev = m_bus->devices; dev; dev = dev->next)
>> >> >>    {
>> >> >>       if (dev->descriptor.bDeviceClass == 0xff)   //find for 
> vendor 
>> >> >> specific class
>> >> >>       {
>> >> >>          m_dev = usb_open(dev);
>> >> >>          if (m_dev)
>> >> >>          {
>> >> >>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
>> >> >>             (dev->descriptor.idProduct == USB_PRODUCT))
>> >> >>             {
>> >> >>                int err;
>> >> >>                err = usb_set_configuration(m_dev, 1);
>> >> >>                if (err)
>> >> >>                {
>> >> >>                   char* s= usb_strerror();
>> >> >>                   m_strInitStatus = s;
>> >> >>                   UpdateData(FALSE);
>> >> >>                   return;
>> >> >>                }
>> >> >>                err = usb_claim_interface(m_dev, 0);
>> >> >>                if (err)
>> >> >>                {
>> >> >>                   char* s= usb_strerror();
>> >> >>                   m_strInitStatus = s;
>> >> >>                   UpdateData(FALSE);
>> >> >>                   return;
>> >> >>                }
>> >> >>             }
>> >> >>          }
>> >> >>       }
>> >> >>    }
>> >> >> }
>> >> >> 
>> >> > 
>> >> 
>> > 
>> 
> ------------------------------------------------------------------------------------
>> >> >> 
>> >> >> With the new version of libusb the usb_set_configuration(...) call 
> 
>> >> > returns
>> >> >> with an error and tells me, that configuration 1 could not be set 
>> >> > because
>> >> >> the parameter is invalid...
>> >> >> If I use the new libusb0.dll, the new libusb.lib and the OLD 
>> > libusb0.sys 
>> >> > the
>> >> >> application works fine again.
>> >> >> 
>> >> >> Can someone please tell me where I am going wrong?
>> >> >> Thank you in advantage for your help
>> >> >> -- 
>> >> >> View this message in context: http://www.nabble.com/application-
>> >> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> >> >> tf4770195.html#a13644735
>> >> >> Sent from the LibUSB Dev - Win32 mailing list archive at 
> Nabble.com.
>> >> >> 
>> >> >> 
>> >> >> 
>> >> > 
>> > 
> -------------------------------------------------------------------------
>> >> >> This SF.net email is sponsored by: Splunk Inc.
>> >> >> Still grepping through log files to find problems?  Stop.
>> >> >> Now Search log events and configuration files using AJAX and a 
>> > browser.
>> >> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> >> >> _______________________________________________
>> >> >> Libusb-win32-devel mailing list
>> >> >> Lib...@li...
>> >> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> >> > 
>> >> > 
>> >> > 
>> > 
> -------------------------------------------------------------------------
>> >> > This SF.net email is sponsored by: Splunk Inc.
>> >> > Still grepping through log files to find problems?  Stop.
>> >> > Now Search log events and configuration files using AJAX and a 
>> > browser.
>> >> > Download your FREE copy of Splunk now >> http://get.splunk.com/
>> >> > _______________________________________________
>> >> > Libusb-win32-devel mailing list
>> >> > Lib...@li...
>> >> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> >> > 
>> >> > 
>> >> 
>> >> -- 
>> >> View this message in context: http://www.nabble.com/application-
>> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> >> tf4770195.html#a13664629
>> >> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>> >> 
>> >> 
>> >> 
>> > 
> -------------------------------------------------------------------------
>> >> This SF.net email is sponsored by: Splunk Inc.
>> >> Still grepping through log files to find problems?  Stop.
>> >> Now Search log events and configuration files using AJAX and a 
> browser.
>> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> >> _______________________________________________
>> >> Libusb-win32-devel mailing list
>> >> Lib...@li...
>> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> > 
>> > 
>> > 
> -------------------------------------------------------------------------
>> > This SF.net email is sponsored by: Splunk Inc.
>> > Still grepping through log files to find problems?  Stop.
>> > Now Search log events and configuration files using AJAX and a 
> browser.
>> > Download your FREE copy of Splunk now >> http://get.splunk.com/
>> > _______________________________________________
>> > Libusb-win32-devel mailing list
>> > Lib...@li...
>> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>> > 
>> > 
>> 
>> -- 
>> View this message in context: http://www.nabble.com/application-
>> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
>> tf4770195.html#a13665547
>> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>> 
>> 
>> 
> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Libusb-win32-devel mailing list
>> Lib...@li...
>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> 
> 
-- 
View this message in context: http://www.nabble.com/application-works-with-older-libusb-win32-but-not-with-version-0.1.12.1-tf4770195.html#a13665771
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
 | 
| 
      
      
      From: Stephan M. <Ste...@ia...> - 2007-11-09 12:49:47
       | 
| > As you can see, the bConfigurationValue is 0, not 1. Is that the 
problem?
> And if it is, why does it work with the older version of the lib? Do I 
have
> to change the value to 1 (which might be a problem as I can't flash the
> controller...)?
A configuration value of '0' is invalid (see USB spec
for details). So the only solution is to fix your device's
firmware.
It worked with the old DLL because the old version of 
usb_set_configuration() treated the 'config' parameter as
an index, which was wrong. Whereas the new version treats
the parameter as a value that must be equal to one of the
descriptor's bConfigurationValue values.
Stephan
> 
> Well, since the application on the controller is not written by me I 
can't
> give you the code. But I can post what TestLibUsb gives me:
> 
>   wTotalLength:         46
>   bNumInterfaces:       1
>   bConfigurationValue:  0
>   iConfiguration:       0
>   bmAttributes:         80h
>   MaxPower:             50
>     bInterfaceNumber:   0
>     bAlternateSetting:  0
>     bNumEndpoints:      4
>     bInterfaceClass:    255
>     bInterfaceSubClass: 0
>     bInterfaceProtocol: 0
>     iInterface:         0
>       bEndpointAddress: 01h
>       bmAttributes:     02h
>       wMaxPacketSize:   64
>       bInterval:        0
>       bRefresh:         0
>       bSynchAddress:    0
>       bEndpointAddress: 81h
>       bmAttributes:     02h
>       wMaxPacketSize:   64
>       bInterval:        0
>       bRefresh:         0
>       bSynchAddress:    0
>       bEndpointAddress: 02h
>       bmAttributes:     02h
>       wMaxPacketSize:   64
>       bInterval:        0
>       bRefresh:         0
>       bSynchAddress:    0
>       bEndpointAddress: 82h
>       bmAttributes:     02h
>       wMaxPacketSize:   64
>       bInterval:        0
>       bRefresh:         0
>       bSynchAddress:    0
> 
> As you can see, the bConfigurationValue is 0, not 1. Is that the 
problem?
> And if it is, why does it work with the older version of the lib? Do I 
have
> to change the value to 1 (which might be a problem as I can't flash the
> controller...)?
> 
> Best regards
> 
> 
> 
> Stephan Meyer-2 wrote:
> > 
> > dev->config[0].bConfigurationValue should be >=1.
> > Could you please post your configuration descriptor(s)?
> > 
> > Stephan
> > 
> >> 
> >> Hi,
> >> 
> >> > is '1' a valid configuration value?
> >> well, it should be as the application can be run with the older 
version 
> > of
> >> libusb...
> >> I tried using your code and now the application runs over the
> >> usb_set_configuration. But now the next call (the one to
> >> usb_claim_interface()) returns an error...
> >> Here is the message:
> >> "usb_claim_interface: could not claim interface 0, invalid 
configuration 
> > 0".
> >> 
> >> So as I understand configuration 0 is set by the set_configuration 
and 
> > is
> >> not valid. But why?? I mean it does work (with the older version of 
the
> >> library)!
> >> 
> >> Thanks in advance
> >> 
> >> 
> >> Stephan Meyer-2 wrote:
> >> > 
> >> >> err = usb_set_configuration(m_dev, 1);
> >> > 
> >> > * is '1' a valid configuration value?
> >> >   This value must by the config-descriptors 'bConfigurationValue'
> >> > * try usb_set_configuration(m_dev, 
dev->config[0].bConfigurationValue) 
> > 
> >> > 
> >> > Stephan
> >> > 
> >> > 
> >> >> 
> >> >> Hi,
> >> >> 
> >> >> the error message is
> >> >> "usb_set_configuration: could not set config 1: win error: The 
> > parameter 
> >> > is
> >> >> incorrect.".
> >> >> 
> >> >> Michael
> >> >> 
> >> >> 
> >> >> Stephan Meyer-2 wrote:
> >> >> > 
> >> >> > What's the error message returned
> >> >> > by usb_strerror()?
> >> >> > 
> >> >> > Stephan
> >> >> > 
> >> >> > 
> >> >> >> 
> >> >> >> Hi,
> >> >> >> 
> >> >> >> I have a VisualC++ 6.0-application (MFC) for Windows XP.
> >> >> >> This application is supposed to communicate with a 
microcontroller 
> > 
> >> > using
> >> >> >> Bulk writes over USB.
> >> >> >> With an older version of libusb (can't tell you the version, 
but 
> > it's 
> >> > 
> >> >> > from
> >> >> >> 05 August 2006) the application works fine. Now I downloaded 
the 
> >> > newest
> >> >> >> version of libusb (not the filter-driver!) and created a new 
> >> > inf-file.
> >> >> >> After installing the new driver the application does not work 
any 
> >> > more!
> >> >> >> The relevant code is:
> >> >> >> ---------------------------------------------------
> >> >> >> usb_init();
> >> >> >> usb_find_busses();
> >> >> >> usb_find_devices();
> >> >> >> for (m_bus = usb_get_busses(); m_bus; m_bus = m_bus->next)
> >> >> >> {
> >> >> >>    struct usb_device *dev;
> >> >> >>    for (dev = m_bus->devices; dev; dev = dev->next)
> >> >> >>    {
> >> >> >>       if (dev->descriptor.bDeviceClass == 0xff)   //find for 
> > vendor 
> >> >> >> specific class
> >> >> >>       {
> >> >> >>          m_dev = usb_open(dev);
> >> >> >>          if (m_dev)
> >> >> >>          {
> >> >> >>             if ((dev->descriptor.idVendor == USB_VENDOR) && 
> >> >> >>             (dev->descriptor.idProduct == USB_PRODUCT))
> >> >> >>             {
> >> >> >>                int err;
> >> >> >>                err = usb_set_configuration(m_dev, 1);
> >> >> >>                if (err)
> >> >> >>                {
> >> >> >>                   char* s= usb_strerror();
> >> >> >>                   m_strInitStatus = s;
> >> >> >>                   UpdateData(FALSE);
> >> >> >>                   return;
> >> >> >>                }
> >> >> >>                err = usb_claim_interface(m_dev, 0);
> >> >> >>                if (err)
> >> >> >>                {
> >> >> >>                   char* s= usb_strerror();
> >> >> >>                   m_strInitStatus = s;
> >> >> >>                   UpdateData(FALSE);
> >> >> >>                   return;
> >> >> >>                }
> >> >> >>             }
> >> >> >>          }
> >> >> >>       }
> >> >> >>    }
> >> >> >> }
> >> >> >> 
> >> >> > 
> >> >> 
> >> > 
> >> 
> > 
> 
------------------------------------------------------------------------------------
> >> >> >> 
> >> >> >> With the new version of libusb the usb_set_configuration(...) 
call 
> > 
> >> >> > returns
> >> >> >> with an error and tells me, that configuration 1 could not be 
set 
> >> >> > because
> >> >> >> the parameter is invalid...
> >> >> >> If I use the new libusb0.dll, the new libusb.lib and the OLD 
> >> > libusb0.sys 
> >> >> > the
> >> >> >> application works fine again.
> >> >> >> 
> >> >> >> Can someone please tell me where I am going wrong?
> >> >> >> Thank you in advantage for your help
> >> >> >> -- 
> >> >> >> View this message in context: 
http://www.nabble.com/application-
> >> >> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> >> >> tf4770195.html#a13644735
> >> >> >> Sent from the LibUSB Dev - Win32 mailing list archive at 
> > Nabble.com.
> >> >> >> 
> >> >> >> 
> >> >> >> 
> >> >> > 
> >> > 
> > 
-------------------------------------------------------------------------
> >> >> >> This SF.net email is sponsored by: Splunk Inc.
> >> >> >> Still grepping through log files to find problems?  Stop.
> >> >> >> Now Search log events and configuration files using AJAX and a 
> >> > browser.
> >> >> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> >> >> _______________________________________________
> >> >> >> Libusb-win32-devel mailing list
> >> >> >> Lib...@li...
> >> >> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> >> > 
> >> >> > 
> >> >> > 
> >> > 
> > 
-------------------------------------------------------------------------
> >> >> > This SF.net email is sponsored by: Splunk Inc.
> >> >> > Still grepping through log files to find problems?  Stop.
> >> >> > Now Search log events and configuration files using AJAX and a 
> >> > browser.
> >> >> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> >> > _______________________________________________
> >> >> > Libusb-win32-devel mailing list
> >> >> > Lib...@li...
> >> >> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> >> > 
> >> >> > 
> >> >> 
> >> >> -- 
> >> >> View this message in context: http://www.nabble.com/application-
> >> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> >> tf4770195.html#a13664629
> >> >> Sent from the LibUSB Dev - Win32 mailing list archive at 
Nabble.com.
> >> >> 
> >> >> 
> >> >> 
> >> > 
> > 
-------------------------------------------------------------------------
> >> >> This SF.net email is sponsored by: Splunk Inc.
> >> >> Still grepping through log files to find problems?  Stop.
> >> >> Now Search log events and configuration files using AJAX and a 
> > browser.
> >> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> >> _______________________________________________
> >> >> Libusb-win32-devel mailing list
> >> >> Lib...@li...
> >> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> > 
> >> > 
> >> > 
> > 
-------------------------------------------------------------------------
> >> > This SF.net email is sponsored by: Splunk Inc.
> >> > Still grepping through log files to find problems?  Stop.
> >> > Now Search log events and configuration files using AJAX and a 
> > browser.
> >> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> > _______________________________________________
> >> > Libusb-win32-devel mailing list
> >> > Lib...@li...
> >> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> >> > 
> >> > 
> >> 
> >> -- 
> >> View this message in context: http://www.nabble.com/application-
> >> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> >> tf4770195.html#a13665547
> >> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> >> 
> >> 
> >> 
> > 
-------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems?  Stop.
> >> Now Search log events and configuration files using AJAX and a 
browser.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> Libusb-win32-devel mailing list
> >> Lib...@li...
> >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> > 
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a 
browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Libusb-win32-devel mailing list
> > Lib...@li...
> > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/application-
> works-with-older-libusb-win32-but-not-with-version-0.1.12.1-
> tf4770195.html#a13665771
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
> 
> 
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
 | 
| 
      
      
      From: Graeme G. <gr...@ar...> - 2007-11-10 16:22:40
       | 
| Stephan Meyer wrote: > A configuration value of '0' is invalid (see USB spec > for details). So the only solution is to fix your device's > firmware. You're absolutely right, but it doesn't solve the users problem, and they can't solve it either, since they aren't responsible for creating the device. libusb-win32 looks bad if the device used to work, and (presumably) still works with other usb drivers. Is there a way of making libusb-win32 more robust in the face of such (badly behaved) devices, rather than simply failing ? Graeme Gill. | 
| 
      
      
      From: Dan E. <dan...@ne...> - 2007-11-12 15:47:07
       | 
| Graeme Gill wrote: > > Stephan Meyer wrote: > > A configuration value of '0' is invalid (see USB spec > > for details). So the only solution is to fix your device's > > firmware. > > You're absolutely right, but it doesn't solve the users > problem, and they can't solve it either, since they > aren't responsible for creating the device. libusb-win32 looks > bad if the device used to work, and (presumably) still works > with other usb drivers. > > Is there a way of making libusb-win32 more robust in the > face of such (badly behaved) devices, rather than simply > failing ? > Having a configuration descriptor with a value of zero is very broken - there is no way to select it. When the host issues SET_CONFIGURATION with wValue = 0, to select that configuration, the device should enter the low power state, and the host should assume that the device has no active endpoints. The library doesn't have a coherent way of dealing with a device with a configuration with value zero, since it keeps track of which endpoints are valid to send data on. What would be your suggestion for a solution? Dan. | 
| 
      
      
      From: Graeme G. <gr...@ar...> - 2007-11-12 21:50:00
       | 
| Dan Ellis wrote: > Having a configuration descriptor with a value of zero is very broken - > there is no way to select it. When the host issues SET_CONFIGURATION > with wValue = 0, to select that configuration, the device should enter > the low power state, and the host should assume that the device has no > active endpoints. > > The library doesn't have a coherent way of dealing with a device with a > configuration with value zero, since it keeps track of which endpoints > are valid to send data on. > > What would be your suggestion for a solution? I would imagine that the simplest thing may be to assume that the descriptor is in error, since (from what you say), it would make no sense for a device to actually have a maximum configuration value of 0. The sort of thing I've done in such cases (dealing with broken implementation of standards) is to have a configurable "forgiving" mode, with appropriate debug messages being available to track what's going on. So with libusb set to a "try and correct broken configuration desciptors" mode, it would internally treat a configuration descriptor with a value of zero as a value of 1, which (I would guess), might solve the original posters problem. Graeme Gill. |