[SOLVED]Problems using USBasp with Arduino IDE 1.6.10/Arduino AVR Boards 1.6.12

OldSteve:
The issue that I described happened with avrdude 6.0.1. That was using the "libusb-win32 v1.2.6.0" driver installed using Zadig, (installed to get USBASP working with Win10), along with IDE V1.6.9 and "AVR Arduino Boards" V1.6.12.

Are you sure? Arduino AVR Boards 1.6.12 does install avrdude 6.3.0-arduino2 and cause it to be used by the Arduino IDE but if you have 3rd party AVR boards installed via Boards Manager it may cause avrdude 6.0.1 to be used instead. Things are a real mess right now.

OldSteve:
It won't become a problem for me until I update to IDE V1.6.10, which I can't do until DrAzzy's ATtiny cores are compatible with it and "Boards Manager".

We did make a fix to the ATTinyCore Boards Manager file so it shouldn't cause any problems with Arduino IDE 1.6.10 now. As to whether the new versions of avr-gcc and avrdude will cause issues with that core, I'm not sure.

pert:
Are you sure? Arduino AVR Boards 1.6.12 does install avrdude 6.3.0-arduino2 and cause it to be used by the Arduino IDE

Oh, I didn't realise that installing "Arduino AVR Boards" V1.6.12 also installed avrdude 6.3.0-arduino2. And since IDE V1.6.9 has avrdude V6.01 by default, I just assumed that it was being used. My bad. (When I typed the reply earlier, I'd already rolled back to "Arduino AVR Boards" 1.6.11, so couldn't double-check.)

We did make a fix to the ATTinyCore Boards Manager file so it shouldn't cause any problems with Arduino IDE 1.6.10 now. As to whether the new versions of avr-gcc and avrdude will cause issues with that core, I'm not sure.

I wasn't aware of this. I had a look at the 'spencekonde' ATtiny cores Github webpage yesterday, and there was still a warning to use IDE V1.6.9 and not IDE V1.6.10.

Anyway, since IDE V1.6.10 still seems to have bugs, particularly the one relating to not being able to upload if the *.ino file is directly clicked on to open the IDE, I'll stick with IDE V1.6.9 for now.

It would be lovely to see some of these things sorted out over the next one or two releases. Fingers crossed. :slight_smile:

pert:

  • Plug in USBasp
  • Download Zadig from http://zadig.akeo.ie
  • Start zadig
  • Options > List all devices
  • Select USBasp from the drop down menu
  • Select libusbK(v3.0.7.0) driver
  • Click Install

hi
i ran in the problem with Arduino 1.8.1 . Nothing coulf get the AVRDude to burn the bootloader. The attempt to replace the driver as written above waits for 15 Minutes and than aborts. After that the program says driver installation failed. Is there another way of fixing this problem?
the exact error is:

avrdude: Warning: cannot query manufacturer for device: Input/output error
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Fehler beim Brennen des Bootloaders.

its on Win 10 Pro 1607

any ideas are very welcome

thx

hape

1 Like

hape:
hi
i ran in the problem with Arduino 1.8.1 . Nothing coulf get the AVRDude to burn the bootloader. The attempt to replace the driver as written above waits for 15 Minutes and than aborts. After that the program says driver installation failed. Is there another way of fixing this problem?
the exact error is:

avrdude: Warning: cannot query manufacturer for device: Input/output error
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Fehler beim Brennen des Bootloaders.

its on Win 10 Pro 1607

any ideas are very welcome

thx

hape

Open device manager and check that the USBasp is installed successfully.
Then make sure to use libusbK not libusb-win32.
I had this problem because I was using the win32 driver. Replaced and it worked!

my driver on USBasp: libusbK USB Devices
but....

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

What problem ?

tested on ARDUINO
1.6.9(12) 1.8.2(1)

I think that programmers ARDUINO IDE curves hands or head
Because the problem can not be solved for a long time

I get that error if the USBasp isn't plugged in. Do you see it appear in Device Manager when you plug it in? Using the libusbK driver should definitely fix the problem I described in this thread.

:slight_smile:
Yes, USBasp connected

solved_2 !

i Download original (6.3 version) avrdude
http://download.savannah.gnu.org/releases/avrdude/
and replace avrdude in arduino (and replace avrdude.conf)
and now good

In arduino patched 6.3 version of avrdude
I do not understand why they did this, most likely for some financial purpose.

Definitely not for some financial purpose. The Arduino IDE is free, AVRDUDE is free, where's the money? There are a number of reasons Arduino has their own build of AVRDUDE. The ones I'm familiar with are:

  • ArduinoISP programmer entry in avrdude.conf
  • Extended delays in the ATtiny85 entry to make programming work reliably
  • Backwards compatible handling of unused fuse bits. AVRDUDE recently decided to change the handling of these bits to be consistent with Atmel's standard, which previous versions did not do. So that's good but the problem is this meant that fuse values that used to work no longer verified, making it extremely difficult for 3rd party AVR hardware package authors to offer compatibility with a reasonable range of Arduino AVR Boards package versions

I know there are some other differences you can see at GitHub - arduino/avrdude-build-script: avrdude build scripts for Arduino/Genuino but I'm not sure what the purpose is.

Unfortunately they managed to break compatibility with libusb-win32 in the most recent builds, a problem the official AVRDUDE release does not have.

offtopic...
Yes, arduino is free, but this is only for the first superficial glance.
There are many firms and production lines

eg
Protection from third manufacturers who do not pay ARDUINO deductions for the use of the brand
(Windows for this purpose came up with digital signatures of drivers, and not because they care very much about their users, as they presented it :slight_smile: )

ARDUINO is profitable to use only products under its own brand, and not third-party manufacturers, for example USBASP - to use is not profitable? He does not promote the brand, it is more advantageous as a programmer to use the second card ARDUINO
It spins the name and brings revenue if not direct then indirect.

Programmers are governed by expressing certain preferences and preferences that are quite specific, tied to something (more often to profit)
For programmers this is presented as an element of good, in a neat wrapper, so as not to injure their subtle psyche and not destroy their image of a fighter for justice.

I said the Arduino IDE is free. Of course they are also trying to sell their products or license their name to other manufacturers. I think in this case it's actually a positive thing for the community that Arduino produces income because it allows them to pay the salaries of a team of developers to work on the IDE and libraries. Of course there are other open source projects that have been quite successful without any source of income and some members of the community do contribute a lot to the project. However, generally Arduino users are not very skilled programmers and most of them have no interest in making any contribution. I also see volunteer-based Arduino projects get bogged down in endless discussion without ever reaching a consensus, as opposed to the boss-employee model where a goal is set by management and the employee must progress towards that goal to justify their continued employment. So I just don't see that things would have progressed anywhere near as far as they have without financial support.

Of course there is the danger that the profit motive could cause the Arduino corporation to make decisions that are not in the best interest of the community but I really don't see this happening with the Arduino IDE. Arduino has put a lot of work into making it very easy to add support to the IDE for competing hardware products even though this directly impacts their profits. I have seen them make changes specifically to fix incompatibilities with 3rd party hardware packages, to ensure backwards compatibility to these packages, to support parts not found in any official Arduino hardware in their own hardware cores. They have made no effort to lock out clones. The closest they ever came was during the hottest part of the .cc/.org dispute there was one IDE release that displayed a warning when a .ORG board was plugged in but even then they had an option to not show that warning again and the whole thing was removed on the next release.. They even have tutorials on this very website for how to make your own Arduino. I think in the end this openness will actually be to the financial benefit of Arduino but most companies would not be open minded enough to even consider this possibility.

I really don't see that use of an ISP programmer is a common enough thing that there is significant profit for Arduino in forcing people to use an Arduino as ISP. The typical Arduino user will never have need for a programmer. Of course there are limited development resources available and I'm sure priority is put towards supporting Arduino products but I just don't see them getting together in a secret meeting and saying "shh... let's break support for USBasp". However, I have seen the developers put significant work towards fixing an incompatibility with the AVRISP mkII programmer, which is not sold by Arduino. Unfortunately the USBasp driver issue has not been taken seriously but I believe part of that is I'm the only one who ever reported this issue to the developers, I wasn't able to ever figure out why the official AVRDUDE release does support libusb-win32 but the Arduino release does not. There have been a couple other people who reported what appeared to be the same issue here but I was not able to get any of them to make the extra effort to verify that libusb-win32 did not work and libusbK did work. So for all the developers know it's purely user error on my part or I have something screwy with my system causing the issue, and for all I know they may be right. There are hundreds of open issues in the tracker and more coming in every day so they have plenty to keep them busy. I'm sure the developers would be receptive to someone submitting a pull request fixing the issue or even providing enough information to put them on the right track to a fix the issue.

Now you may argue that the non-open source Arduino Web Editor, which does not support 3rd party hardware, is Arduino showing their true colors as a greedy capitalist corporation. There may some truth to this, but they have stated officially multiple times that supporting 3rd party hardware is one of their future goals for that project.

I allso have this rubbish issue,when i install libusbK for the usbasp it makes everything els on my pc not work,avrdudess dont work now and alot of other stuff that uses the normal libusb driver,its so stupid they need to revert it back,i have to keep rolling back my driver to use everything els,then install libusb STUPID K just to use the arduino ide,its so stupid.Is there any other work around? I would down grade the ide but will need to upgrade back eventualy.If i made avrdudess use the new avdude will it work? but even then all the other stuff like software to talk to usb dont work,how can i make the driver just work on the ide and leave my other 100 plus programs work ok,i get this stupid 0x0000007 error all the time.Also the ide 1.8.1 doesnt work with the digispark eather,god knows what they done to that,why do they insist on breaking stuff,cant they leave alone,if its not broken DONT FIX IT KEEP IT SIMPLE STUPID=ARDUINO

The stock AVRDUDE 6.3 is compatible with libusb-win32, it's only Arduino's AVRDUDE build that doesn't work with it for me. So you could replace the AVRDUDE used by Arduino with:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip
The problem with this is the changes made in the unused fuse bit handling will mean that hardware packages with fuse settings that worked with older AVRDUDE versions won't work with the stock AVRDUDE 6.3.0. Arduino modified their version to be backwards compatible. In the latest IDE/Arduino AVR Boards release (1.8.2/1.6.18) they have updated the fuse values for their boards so it will work fine with any of the Arduino AVR Boards 1.6.18.

If you can verify that libusb-win32 does not work with Arduino's build of AVRDUDE 6.3.0 and that libusbk does work then you could help further the cause of getting this fixed by commenting on my issue report for this problem:

Even better if you can also verify that the issue does not occur when you use the stock build of AVRDUDE, as I have done.
I'm the only one who has reported this problem to the developers, I do think they would make fixing it a priority if it caused a problem for more users. For all they know it's user error on my part or something strange with my system because it's been months with only a single verified report (there was possibly one other but the user disappeared without taking the time to provide enough information for us to verify they were having the same issue).

pert:
That issue is fixed by changing the extended_fuses values in boards.txt as described here: Set unused bits of extended fuse to 1 by descampsa · Pull Request #5182 · arduino/Arduino · GitHub
The problem is that AVRDUDE 6.3 handles unused bits differently and the Arduino developers didn't update boards.txt to account for this.
I was using libusb-win32 v1.2.4.0. Using libusb-win32 turns out to be the problem. Once I updated the driver to libusbK v3.0.7.0 the problem was solved, thanks DrAzzy! Here's how I did it:

  • Plug in USBasp
  • Download Zadig from http://zadig.akeo.ie
  • Start zadig
  • Options > List all devices
  • Select USBasp from the drop down menu
  • Select libusbK(v3.0.7.0) driver
  • Click Install

For some reason the first time I did this it broke avrdude 6.3. Trying to use any programmer now resulted in an immediate "Error burning bootloader". I uninstalled and then reinstalled libusbK and the second time the problem was solved. I can now use the stock USBasp programmers entry, no need for the usbasp-clone modification.I tested with every firmware version I listed in my original post and they all worked so that shouldn't be necessary to fix the issue.

It worked. Thank you for sharing the information Pert!

I'm glad to hear it. I couldn't bear to be without my beloved USBasp!

pert:
I'm glad to hear it. I couldn't bear to be without my beloved USBasp!

Hi Pert,

It did work the first time. I burnt the bootloader and uploaded a sketch onto a standalone ATmega328p chip using usbasp. But doing it for the second time, gave me the following error,

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
        Double check connections and try again, or use -F to override
        this check

I did try what you mentioned in post no. #4 as to reinstall libusbK, but it's not helping. I am getting the same error. Tried it with another board too, having an ATmega328pb, usbasp seems to not work after the very first time i got it working. Just FYI, i am using 8MHz internal clock.
Do i try changing the efuses in the boards.txt file?

Looking forward to your reply. Thanks!

That response indicates a wiring problem.

Curie:
Do i try changing the efuses in the boards.txt file?

No. Don'd do this unless you are the author or maintainer of a third party hardware package and know what you are changing and why.

DrAzzy:
That response indicates a wiring problem.

No. Don'd do this unless you are the author or maintainer of a third party hardware package and know what you are changing and why.

Okay. Will check on the wiring once again.

Okay.

Thank you DrAzzy.

DrAzzy:
That response indicates a wiring problem.

No. Don'd do this unless you are the author or maintainer of a third party hardware package and know what you are changing and why.

Yes, it was a wiring problem. Now i am able to upload through the usbasp once again. Thank you for the guidance.