Go Down

Topic: UNO Trouble uploading on XP ... not in sync/ protocol error (Read 16115 times) previous topic - next topic

mcb1

Guys
I'm also interested in the outcome of this post.
I have a Windows 2000 machine which uploads just fine to Duemillanove, but won't upload to Uno, without the
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


I've downloaded the Flip program and flashed the Atmega8u2 with the latest version of Arduino-usbserial-uno.hex from Arduino 0022.
This worked fine with no issues.
The USB port works for everything else that gets plugged into it, and the com port shows up correctly, with no conflicts.

While I can appreciate that Windows can cause an issue, the fact that the programmer is getting some responses that are different to what it expects, leads me to thinking its something other than windows.

So I'm also keen to see some useful things to try, to resolve this issue.

Thanks
Mark

karistouf

Hi Nick.

There seems to be a real mis-understanding point here:

If I had mentionned DMX devices it s because I have some users using arduino.
we are using professionnaly DMX devices and that is a common point that maybe perhaps a clue.
arduino is a great interface we deal with to handle things in real life inside of a show.
thats why i have written a dialog with it in my app. and i m very happy of the arduino project.

But I m not really happy to be the guy "once a year".

I understand fully you cant know what s lying on the computer: antivirus / bad installation / computer not uptodate / usb power perhaps too low,  etc...
I would rather have helping technical answers than this one. Something like, ok we have a procedure to clean registry or to check default voltage on usb is too low power. i dont know. something !

Now you take has you want informations i have given there.
If you think there is no bug, ok there is no bug.
What could I say ?
A user told me about this trouble on an duemillanove, I have this trouble on an UNO, another has it on a Mega... hu hu... it makes 3 people I know very well...

And to have realeased a previous freeware, very used in theatre field ( its not the arduino, of course, but im talking about something like 5 000 users minimum), I know perfectly that people dont get in touch if something is not working.
The people saying they have a problem are not that much, like the visible part of the Iceberg, less than 1%, rather a 0.2%.

Quote
While I can appreciate that Windows can cause an issue, the fact that the programmer is getting some responses that are different to what it expects, leads me to thinking its something other than windows.


I agree completely with Mark's point of view.





nickgammon

Well, I am just trying to help, bearing in mind that I am nowhere near your computers. In response to other similar queries, some of my suggestions have worked in the past, and people thank me for that. Such as:


  • Check the right board type is selected

  • Try a different USB port on the PC

  • Download the most up-to-date FTDI driver

  • Try a different USB cable (yes I know, but apparently that helped)

  • Try powering the Uno externally as well as by USB

  • Try resetting the device before programming

  • Completely power off the device before programming (sometimes this helps me after changing board types)

  • Try re-uploading the bootloader from the IDE, if that is possible

  • Put an oscilloscope on the Vcc line in AC mode and check for line noise.

  • It is possible the USB supply on the problem PC is marginal. Try measuring the voltage on the Uno with an accurate meter. Also the voltage on the +5V side (after voltage regulation). Check the 3.3V pin.

  • Try rebooting Windows in "safe" mode (this may not work, but you could try).

  • Try rebooting the PC with Ubuntu (or similar Linux) using one of the "run from CDROM" disks. This will not change your Windows installation. Then, if possible, install Arduino (you may need a fair bit of spare RAM) and try programming under Ubuntu. That would narrow it down to hardware on the PC, or a problem with Windows.
  • Also try a different programmer. For example the USBtinyISP:

    http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=46

    I used one of them to reflash the bootloader on a Uno I got which was supplied with the wrong one.

  • Re-flash the bootloader using USBtinyISP if you can't do it using the IDE process.



Does this happen with a single Uno, or do you have a batch of them, and it happens to all of them?


I hope these suggestions are technical enough, and helping.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

nickgammon

Some more suggestions:


  • If you are using a USB hub, stop using it and connect directly to the PC.

  • Make sure your USB port is USB 2, and not USB 1.

  • Make sure no wireless devices are nearby. If you have a wireless router, move it further away. If the PC has inbuilt wireless connection, move the board around or to the other side, to get away from the aerial. Ditto for Bluetooth.

Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

karistouf

hi nick. thanks for this real nice list.
i will try to give you news around it next week ( on touring, with not the faulty computer).
but this is really far clear to make a serious check and see.
merci

mcb1

#50
Apr 21, 2011, 03:36 pm Last Edit: Apr 21, 2011, 03:41 pm by markB Reason: 1
Nick
Thanks for taking the time to make some suggestions.
Let me go through your list, to rule out a few.
# Check the right board type is selected
Yep tried both UNO and Duemillanove, with the expected response issue.
# Try a different USB port on the PC
Tried that also
# Download the most up-to-date FTDI driver
The latest driver is in 0022, and yes as i stated I tried reflashing the Atmega8u2
# Try a different USB cable (yes I know, but apparently that helped)
The cable works just fine in the Duemillanove, and it flashed the 8u2...so it works.
# Try powering the Uno externally as well as by USB
Can't exactly see the point in that one
# Try resetting the device before programming
Tried that, no change
# Completely power off the device before programming (sometimes this helps me after changing board types)
Yep even tried that one, same result
# Try re-uploading the bootloader from the IDE, if that is possible
Now here is something that may be a cause......
In the meantime I might try swopping the 328 from the Duemillanove to the UNO.
# Put an oscilloscope on the Vcc line in AC mode and check for line noise.
The problem as stated many times is that the programe gets the wrong response back.

# It is possible the USB supply on the problem PC is marginal. Try measuring the voltage on the Uno with an accurate meter.
USB power isn't the issue, as it would be a problem on the Duemillanove. The leds work fine.
Also the voltage on the +5V side (after voltage regulation). Check the 3.3V pin.
This is worth a check....

# Try rebooting Windows in "safe" mode (this may not work, but you could try).
Safe mode stops all drivers, its unlikely to be much help.

# Try rebooting the PC with Ubuntu (or similar Linux) using one of the "run from CDROM" disks. This will not change your Windows installation. Then, if possible, install Arduino (you may need a fair bit of spare RAM) and try programming under Ubuntu. That would narrow it down to hardware on the PC, or a problem with Windows.
# Also try a different programmer. For example the USBtinyISP:

OK one thing I did notice, is that Windows (and the new inf file is no different), loads usbser.sys.
This has a few versions, but is relatively the same through to Service pack 4 in Win2k.

The new inf file loads usbser.sys...could this be the mystery windows issue.
For the record I changed mine to 5.1.2600.0, with no luck.
Many other machines possbly use USB2.0 which uses a different usb driver.


I have tried swopping the 328 that came with the UNO into the Duemillanove, Neither chip will program when swopped, even allowing the change in the program for the target.
Basically a Duemillanove Board uses FDTI to program, while the UNO Board uses usbser.sys.
The two other boards I have are Seeedunio and they use FTDI either onboard or adaptor.


I did note that Bret75 had a problem with USB1, and this may be the problem I'm having.
I've run out of time to check it on another machine with USB2.0......

Karistouf, can you check what driver windows is using, and do you know if your machine is USB1 or USB2.0
(Trying putting 20-50MB onto a memory stick, and see how long it takes, if you can't tell)

So...the mystery continues, and I'm really glad this wasn't my first experience with Arduino.

Thanks
Mark

nickgammon

Quote
# Download the most up-to-date FTDI driver
The latest driver is in 0022, and yes as i stated I tried reflashing the Atmega8u2


The FTDI driver in 0022 is dated 24 December 2010. The driver I downloaded from:

http://www.ftdichip.com/Drivers/VCP.htm

is dated 12 April 2011. So, you don't have the latest driver.


Quote
# Try a different USB cable (yes I know, but apparently that helped)
The cable works just fine in the Duemillanove, and it flashed the 8u2...so it works.


Translation: I did not try a different  USB cable.

Quote
# Try powering the Uno externally as well as by USB
Can't exactly see the point in that one


So you did not do that.

Quote
# Put an oscilloscope on the Vcc line in AC mode and check for line noise.
The problem as stated many times is that the programe gets the wrong response back.


So you did not do that.

Quote
# Try rebooting Windows in "safe" mode (this may not work, but you could try).
Safe mode stops all drivers, its unlikely to be much help.


Confirmed.



Quote
OK one thing I did notice, is that Windows (and the new inf file is no different), loads usbser.sys.
This has a few versions, but is relatively the same through to Service pack 4 in Win2k.

The new inf file loads usbser.sys...could this be the mystery windows issue.
For the record I changed mine to 5.1.2600.0, with no luck.
Many other machines possbly use USB2.0 which uses a different usb driver.



There is stuff here about the usbser driver:

http://arduino.cc/forum/index.php/topic,50610.msg362970.html#msg362970


Quote
I did note that Bret75 had a problem with USB1, and this may be the problem I'm having.
I've run out of time to check it on another machine with USB2.0......


I did suggest USB 2.

Quote
So...the mystery continues, and I'm really glad this wasn't my first experience with Arduino.


You said you had quite a few computers, and it works on most of them.



There is something unusual in your setup. Perhaps it is power-related. Perhaps drivers. Perhaps a marginal cable. When you don't try suggested driver updates, "can't see the point" in some suggestions, and don't try simple things like a different cable, I wonder if you are not ruling out in your mind the very thing that might solve it.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

mcb1

Nick

I think you are getting confused.
FTDI relates to the USB to Serial, and is the chip used on the Duemillanove board.

I suggest you have a look in F:\Development\Arduino\hardware\arduino\Boards.txt.
The UNO has a completely different entry to all the others, as it uses the Atmega8u2.

Just for the others reading this.
USB2.0 is not available on this hardware.
The same feedback with incorrect response (check the start of this thread, or below), is being observed by others from other countries.

The board actually talks to the computer, and reports what it is.
It is able to have the Atmega8U2 chip reprogrammed using the same cord, and this computer.
The same USB cord works just fine to upload on a Duemillanove Board.


The oscilloscope is nowhere near the setup, so its a tad difficult to see what, at the very best stretch of the imagination is likely to be a glitch, but the same fault is reliably repeated on a number of other UNO boards located in various contries around the world.

#msg362970 relates to Vista, and doesn't have the same response error messages as this thread relates to.
Quote
I wonder if you are not ruling out in your mind the very thing that might solve it.


Nick, while your input is appreciated, I'm wondering if you haven't actually read what responses are being received.
I haven't spent 30 odd years as an Electronics Technician to take a scatter gun approach, to fixing a repeatable problem, which affects not just my setup but others as well.
Quote
You said you had quite a few computers, and it works on most of them.

I didn't say this at all.
However I can confirm that I have now tried the UNO Board using the SAME USB CABLE on an XP desktop and an XP Laptop, and the same sketch can be uploaded using them.

Sooooo...
If anyone else is having the same issues
Code: [Select]
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


If you could check if the hardware is USB1 or USB2 would be great to help narrow it down.
If someone more familar with the inner workings could indicate what the feedback message means, would be great.
Can someone confirm that any AtMega328 should be able to used in any board, OR does it have to be specially programmed for that particular board.??

Thanks
Mark


mcb1

karistouf
I have managed to fix my issues after many days of trying things.
See http://arduino.cc/forum/index.php/topic,59801.0.html

Be interested if it fixes your issues.

mark

karistouf

#54
Aug 19, 2011, 09:30 pm Last Edit: Aug 19, 2011, 09:57 pm by karistouf Reason: 1
Ok, back to this subject.

I finally reinstalled completely this computer with windows, wich solves everything.

BUT i m now encountering exactly same problme on my new asus ( less than one year ) wich returns exactly same error for an arduino like ( jeelink v3)

This computer works well with UNO and ARDUINO, but concerning the Jeelink i have to set its COMPORT from 10 to 1 ( was not working). And now... i m coming back to same problem.

So, definitively i think that reseting a computer is not a solution, and thatsomeone should have a look in this mess with windows and drivers and what is really done hidden in windows.

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x20

Go Up