avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Problems with Avrdude error usb_bulk_read


From: Xiaofan Chen
Subject: Re: [avrdude-dev] Problems with Avrdude error usb_bulk_read
Date: Sat, 24 Dec 2011 19:39:30 +0800

On Sat, Dec 24, 2011 at 12:30 PM, Xiaofan Chen <address@hidden> wrote:
> On Sat, Dec 24, 2011 at 2:33 AM, Ed <address@hidden> wrote:
>> Libusb-0.1.13 comes from:
>> http://www.ellert.se/PKGS/libusb-2011-10-29/src/libusb-2011-10-29-svn-macosx.tar.gz
>> Patches applied:
>> libusb-64bit.patch
>> libusb-cxx.patch
>> libusb-endian.patch
>> libusb-runloop.patch
>> This version of libusb comes from this web site:
>> http://www.ellert.se/twain-sane/
>>
>> I installed the latest libusb-compat from sources and could
>> not get Avrdude to recognize its existance.  So I found this
>> version and it installed fine.
>
> I see. In this case you are using the legacy libusb-0.1
> branch which is now unmaintained and may have more bugs
> than the patches cover.
>
> I will suggest you try libusb-1.0 git and then the
> released version of libusb-compat (0.1.3).
>

If that does not help, you may want try the following
avrdude patch.

https://github.com/nedos/homebrew/commit/46000043d7c6a9bed6651f35b680c655f40fd165
https://raw.github.com/nedos/homebrew/46000043d7c6a9bed6651f35b680c655f40fd165/Library/Formula/avrdude.rb

diff --git a/usb_libusb.c b/usb_libusb.c
index c61bdbd..d72bbb9 100644
--- a/usb_libusb.c
+++ b/usb_libusb.c
@@ -444,14 +444,19 @@ static int usbdev_drain(union filedescriptor
*fd, int display)
   usb_dev_handle *udev = (usb_dev_handle *)fd->usb.handle;
   int rv;

+  /*
+   * On some USB devices (specifically LUFA based AVRISPmkII's
+   * this actually causes a problem and doesn't appear to be
+   * required on USB anyway.
+   */
+  return 0;
+
   do {
     rv = usb_bulk_read(udev, fd->usb.ep, usbbuf, USBDEV_MAX_XFER, 100);
     if (rv > 0 && verbose >= 4)
       fprintf(stderr, "%s: usbdev_drain(): flushed %d characters\n",
              progname, rv);
   } while (rv > 0);
-
-  return 0;
 }

 /*


-- 
Xiaofan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]