Avrdude + AVRISP mkII + USB connection = Not Working

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've just tried to use the new version of AVRDUDE GUI v2.0, as posted on the sites opening page, as it may sort out how I distribute code updates to customers.

But I'm struggling, I don't use AVRdude so it may be something simple.

Genuine AVRISP mk2 on USB, via hub
Avrdude 5.11-Patch#7610 as supplied with AVRDUDE GUI

Command line sent to avrdude...

avrdude.exe -p ATMEGA32 -c avrispmkII -P usb -v -U fuse:r:"fuse.txt":r -U lfuse:r:"lfuse.txt":r -U hfuse:r:"hfuse.txt":r -U efuse:r:"efuse.txt":r -U signature:r:"signat.txt":r

Error message...

Using Port                    : usb
Using Programmer              : avrispmkII
avrdude.exe: usbdev_open(): did not find any USB device "usb"

I know the AVRUSB works because I can talk to it in Studio v6 and Codevision.

Any suggestions?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've just tired all three variants of programmer...

avrisp2 (Atmel AVR ISP mkII)
avrispmkII (Atmel AVR ISP mkII)
avrispv2 (Atmel AVR ISP V2)

...still no joy. Although I can't see what the difference between them is.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I know the AVRUSB works because I can talk to it in Studio v6

That is likely your problem. With Atmel USB tools (that use the Jungo driver) it's usually a case of either/or when using AS6 or avrdude.

The fact is that AS6 talks to Jungo which talks to the AVRISPmkII.

When you run avrdude it talks to libusb abd libusb cannot "see" your AVRISPmkII as it's being controlled by Jungo.

The solution is to install a different version of libusb (the USB driver avrdude uses). They have a "filter driver" that does not try to talk directly to the VID/PID of the AVRISPmkII but, instead talks through the already installed Jungo driver.

On this page:

http://sourceforge.net/apps/trac...

Go to the "filter driver installer" section and get that.

To be honest, if the users you are targetting are likely to have some Atmel tool (AS4/5/6) and hence the accompanying Jungo driver installed it may be easier to use avrispmkii.exe (AS4) or atprogram,.exe (AS6) which are Atmel written command line utilities with interfaces similar to avrdude. The alternative is to talk the people through the installation of the filter driver which could be "fun".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Cliff, nice to know I'm not going mad.

The problem I have is needing a way for non-technical customers to upgrade stuff without having to install too much stuff on their PCs. I'd hoped that driving avrdude through a GUI, talking to a 109 bootloader, might solve it.

I'm rapidly coming to the conclusion that I'm going to have to sit down and write something from scratch which is either...

a) a simple windows standalone .exe which talks serial over USB to a bootloader and sends over the upgrade or

b) implement a USB interface to a virtual mass storage device so that they can plug in and drag a file over to the device or

c) fit an SD card slot so they can plug in a card which is then read by the bootloader or

d) implement a USB host so they can copy the upgrade to a USB stick and plug it in.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'd hoped that driving avrdude through a GUI, talking to a 109 bootloader, might solve it.

Well I was going to say "forget the physical programmers such AVRISPmkII and just use a bootloader instead" but it seems that is your plan. To me it sounds like the best plan. So the distant users will not have issues about USB connections to programmers because they'll simply be using avrdude to talk to a USB-RS232 converter.

To be honest then I don't really see what the problem is here. The reason you could not "contact" the target AVR above is because you have an AVRISPmkII and were trying to drive that with avrdude but Jungo was "getting in the way". This does not represent the environment your users will have. They'll just have a USB-RS232 between the PC and the AVR (maybe it's an FTDI on the device itself?) and they'll run avrdude in a different mode telling it "-c avr109 -P com3" rather than "-c avrispmkii". So they won't be trying to talk "atmel speak" over USB but just target the data to a given COM port.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're right; I'd mentally combined the two things into one problem.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well  finding this post helped me a lot

 

My original Atmel Avrisp mkII  has been updated to fw 1.17  by the new As6.2,  it was working only in Atmel Studio, not avrdude / avrdudess / avrdude gui 1.05  ...

 

The jungo driver was getting in my way has mentioned  earlier in this forum.

 

UNTIL i found out about zading,  a tool to install driver ... changed the MKII   USB\VID_03EB&PID_2104 associated with jungo to libusb 1.2.6.0 and installed the driver, 

 

AND VOILA   it works with avrdude again  on my windows 8.1 x64,  will try later with AS6.2 ...

 

thanks a lot for the tip   hopes it helps other.

 

Edit :   you have to check  witch driver is running the adapter, jungo tries sometime to overwrite the libusbxx driver, if it happens  use zadig to correct it again ... no reboot needed.

 

Last Edited: Sun. Apr 26, 2015 - 12:35 PM