libftdi Archives

Subject: Re: Vendor and Product ID are 0x0000

From: Marius Kintel <kintel@xxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 15 Apr 2009 18:09:45 +0200
On Apr 15, 2009, at 14:13 PM, Bodo Alaze wrote:

The returncode from ftdi_usb_open() is "-8: get product description failed"


Hm, looking at the source code, ftdi_usb_open() should never return this error:
Are you using the latest version of libftdi from git?

int ftdi_usb_open(struct ftdi_context *ftdi, int vendor, int product)
{
    return ftdi_usb_open_desc(ftdi, vendor, product, NULL, NULL);
}

int ftdi_usb_open_desc(struct ftdi_context *ftdi, int vendor, int product,
                       const char* description, const char* serial)
{
[...]
                if (description != NULL)
                {
if (usb_get_string_simple(ftdi->usb_dev, dev- >descriptor.iProduct, string, sizeof(string)) <= 0)
                    {
                        usb_close (ftdi->usb_dev);
ftdi_error_return(-8, "unable to fetch product description");
                    }
[...]



Try tracing through the source in a debugger and see what really happens. It might be that libftdi or libusb gets confused by a "corrupt" eeprom, and you may have to slightly patch libftdi or ftdi-eeprom to ignore one or more "harmless" errors to force it to open the device.

~/= Marius

--
We are Elektropeople for a better living.





--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread