| 
      
      
      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.
 |