Arduino Dock - avrdude: AVR device not responding
I have an Onion Omega2 running the latest firmware version. 0.3.2 (b233) which is connected to the Arduino Dock 2.
I followed the Flashing the Arduino Dock tutorial.
But when I try to run the Blinky sketch, I get the following error:
I had a look at the Known Firmware Issues document. Is this the same problem caused by the Cannot flash Arduino Dock if arduino-dock-2 is installed when LEDE package repos are active issue?
If it is the same issue, I would need to resolve it using Option 2: If already Installed. But one of the steps is: deactivate the LEDE package repos by commenting them out in. My question is how do I identify the LEDE packages that need to be commented out from the list of packages?
I just made sure it was running the latest firmware and ran the package installation steps again:
opkg update opkg install arduino-dock-2
@jonty That really is step one when you strike a problem. Install the latest firmware, otherwise you're troubleshooting issues that may already have been fixed.
@crispyoz I am using Onion Omega2 with Arduino Dock 2 as well and I am encountering the same Arduino upload error even after updating to the latest firmware and reinstalling the opkg Arduino package. Any suggestions for how I can get over this issue?
Thanks in advance!
@Noniono Please post a screenshot of your :
- Firmware version
@crispyoz Here are the screenshots of the Arduino IDE showing the "AVR device not responding" error.
And I have the latest firmware installed.
I have tried Option 2 for deactivating the LEDE package repos mentioned in the Known Firmware Issues doc, but it has not helped with the error.
I have also tried manually flashing the sketch by uploading the precompiled hex file to omega and then flashing through the omega terminal, but that has also not solved the issue.
This issue came and went earlier, and I chalked it up to the Arduino Dock probably getting overheated. But now the error comes every time I try to upload a sketch. Kindly help me out, please.
@Noniono When you tried to upload hex file via Omega what message did you receive?
@crispyoz Manually flashing hex file through the Omega terminal also gives the same error as in the Arduino IDE "AVR device not responding".
@Noniono Try running
opkg list-installed | grep avrto see which version is installed.
You'll want to have 6.1-1
@Lazar-Demin Thank you for your suggestion. I ran the command and it seems that I have v6.3-3 of avr. How can I downgrade it to the 6.1-1 version?
I had tried Option 2 in the Known Firmware issues, but there are no listings of the LEDE package repos in
/etc/opkg/distfeeds.conf. So I tried following this guide to enable OpenWRT package repos. But it still installed the v6.3-3 of avrdude even after doing that.
I had tried Option 2 in the Known Firmware issues, but there are no listings of the LEDE package repos in /etc/opkg/distfeeds.conf.
The Known Firmware Issues page is a little out of date, when it says LEDE package repos, it means OpenWRT package repos.
(We'll update this page)
So I tried following this guide to enable OpenWRT package repos. But it still installed the v6.3-3 of avrdude even after doing that.
You need to disable the OpenWRT package repos!
opkg will try to install the highest version number available. If the only version available is 6.1-1 from the Onion package repos it will only install that.
Another option is to:
- Remove avrdude v6.3-3
- Download the avrdude 6.1-1 package file directly: http://repo.onioniot.com.s3.amazonaws.com/omega2/packages/onion/avrdude_6.1-1_mipsel_24kc.ipk
- Install the package file:
opkg install avrdude_6.1-1_mipsel_24kc.ipk
This post is deleted!
@Lazar-Demin Thank you for providing the detailed steps to install avrdude v6.1-1.
I downloaded the avrdude 6.1-1 package file directly and installed it on my omega. However, it is still giving the same error when I am trying to flash a sketch.
Below I have attached a screenshot of the error when I manually flash the hex file as well as the grep command showing the version of the installed package.
I am not sure what else can be done to fix this issue now, please provide any suggestions that you have. Thanks!
@Noniono First I would suggest making sure your program isn't the issue. So try flashing just the default blink example to your Arduino Dock. Perhaps try both ways, wirelessly through the Arduino IDE and then manually through the command line.
If it still doesn't work, then we've confirmed the sketch itself is not the problem.
In that case, I suggest trying to program the MCU on the Arduino Dock using your computer (and not the Omega2).
There are two options for this:
Using the ICSP header and another Arduino
You'll use the ICSP header on the Arduino Dock:
Make sure there's no Omega connected to the Arduino Dock, then you can try using the Arduino IDE and another arduino as a programmer.
Here's a guide on the process: https://www.microcontrollertips.com/programming-avr-microcontrollers-arduinos-arduino-isp/
Use a USB-to-Serial Converter
You can use a USB-to-Serial converter to try programming the MCU on the Arduino Dock:
Again, you'll need to make sure there's no Omega connected to the Arduino Dock, and you can try flashing the MCU using the Arduino IDE, a USB-to-Serial Converter, and the UART TX/RX pins on the Arduino Dock.
Here's a few resources on this process:
@Lazar-Demin So to program the Arduino Dock v2 we need an external programmer?
@jonty No. The wireless Arduino IDE method outlined in our documentation has worked consistently since the launch of the Arduino Dock 2 back in 2016.
In @Noniono's case, using a programmer is meant to test the MCU.
It isn't responding to the Omega. If it also doesn't respond to the programmer, then we know the MCU has somehow gotten into a bad state or has been damaged.