avrdude: stk500v2_ReceiveMessage(): timeout

Hello again,

Originally I got a permission denied, till I changed the group name/username, that was progress,
till The next upload where I got this error

 charlie@OPTIPLEX-740 ~ $ /home/charlie/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/charlie/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyS0 -b57600 -D -Uflash:w:/tmp/arduino_build_229444/sketch_apr24a.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/charlie/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/charlie/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyS0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

// above, truncated for brevity.

OK.. I looked in the arduino directories, there is no user configuration file.
But it seems to ignore that... and moves on to port andthen, to programmer, where it stops.

Under Tools/Programmer I selected AVR ISP Looking in the <avrdude.config> file it says:

programmer
id = "avrisp";
desc = "Atmel AVR ISP";
type = "stk500";
connection_type = serial;

... so it seems to be correct

Research online, finds a lot of VooDoo, or wishing and hoping info ..
i.e. hold reset button while uploading... remove TX wire ...switch rx-tx
set baud to 57600... all of which seem dumb, but I tried anyway with expected result. _no change.

Even here there are few solutions

I tried a "MEGA 2560 board with no other connections except the USB cable and I now ge

t Arduino: 1.8.5 (Linux), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all
Archiving built core (caching) in: /tmp/arduino_cache_903156/core/core_arduino_avr_mega_cpu_atmega2560_488a79326246a1335cdfc7833b1d7440.a
Sketch uses 4590 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 105 bytes (1%) of dynamic memory, leaving 8087 bytes for local variables. Maximum is 8192 bytes.
/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyS0 -b115200 -D -Uflash:w:/tmp/arduino_build_338839/sketch_apr24a.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
User configuration file is "/home/charlie/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyS0
Using Programmer : wiring
Overriding Baud Rate : 115200

I tried yet again with a new Uno R3 board

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
User configuration file is "/home/charlie/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyS0
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

An error occurred while uploading the sketch

I even changed the USB cables twice.

OK, I have sat on a tomato, spun around 3 times, drank a cup of cold coffee while listening to
Abbey Road album played backwards while wearing a Beatles forever T shirt....recited the
third chapter of Lord of the rings while standing in the rain,.... Spelled J.R.R.Tolkien's name backwards,
( It's Sneiklotrrj )
.and it still doesn't work....
But I think I still have my sense of humor... and a desire toi fix this _)*(& thing!

Charlie

Oh !.
I almost forgot :o ... I use Linux Mint 18.3 Sylvia, installed on a Dell Optiplex 740.

Plug in your ?Arduino/ mega2560/Uno/ Nano and select the correct board and then select Port... ttyS0 isn't the right one.

Thank You ....
I have tried every board listed, and the only one that gives me some cooperation with the uploader is the
arduino Duemilanove. This was suggested by another list member a few days ago. I'm using the UNO R3 (clone?)
from China. He said he had this same board and it worked well with this hoice

The only ports available to me are ttyS0, and ttyUSB0.
Neither of these will allow the programmer to receive....

More info... after the code.

Arduino: 1.8.5 (Linux), Board: "Arduino Duemilanove or Diecimila, ATmega328P"

/home/charlie/arduino-1.8.5/arduino-builder -dump-prefs -logger=machine -hardware /home/charlie/arduino-1.8.5/hardware

>>>>>>>>>>>Snipped<<<<<<<<<<<<

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/home/charlie/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

When using the Mega 2560, I did choose that board and neither ttyS0, or ttyUSB0 reacted any differently.
I've been working on this issue, and researching the web, for the past 3 days.
I wanted to see if I could resolve this myself, prior to asking for help.

Obviously that didn't work out too well....

Charlie

How to Upload a Sketch to an Arduino

Connect your Arduino using the USB cable. The square end of the USB cable connects to your Arduino and the flat end connects to a USB port on your computer.
Choose Tools→Board→Arduino Uno to find your board in the Arduino menu. ...
Choose the correct serial port for your board. ... probably /dev/ttyUSB0
Click the Upload button.

Show us what happens. I don't know whether you have a hand-full of different Arduinos or you are selecting different ones to get your Uno clone to work.

Let's just try to get the Uno clone to work.

My clone

 lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

[$ dmesg |tail
[ 2183.229519] usb 3-3.7: New USB device found, idVendor=1a86, idProduct=7523
[ 2183.229522] usb 3-3.7: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 2183.229524] usb 3-3.7: Product: USB2.0-Serial
[ 2184.273322] usbcore: registered new interface driver usbserial
[ 2184.273333] usbcore: registered new interface driver usbserial_generic
[ 2184.273341] usbserial: USB Serial support registered for generic
[ 2184.274660] usbcore: registered new interface driver ch341
[ 2184.274671] usbserial: USB Serial support registered for ch341-uart
[ 2184.274685] ch341 3-3.7:1.0: ch341-uart converter detected
[ 2184.275045] usb 3-3.7: ch341-uart converter now attached to ttyUSB0
]

With the Uno hooked up to the pc, press the reset button and release. Does the L Led blink three times after the release?
If it doesn't we may have boot-loader problems.

Hi kprims,

Thanks for your reply.

OK... I know how to hook up an arduino, and how to attempt a sketch upload.
Not new to computers, I have 28 years as a PC tech.... I'm just new to Arduino's

Yes the LED blinks 3 times.

I have 3 boards, 2 which are UNO R3's and one Mega 2560.
I have tried to upload on each one separately.

Board #1 UNO R3 (china)
Terminal listing as per your example:

charlie@OPTIPLEX-740 ~ $ lsusb
Bus 001 Device 006: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
Bus 001 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. CY7C68300A EZ-USB AT2 USB 2.0 to ATA/ATAPI
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 002 Device 003: ID 1c4f:0034 SiGma Micro 
Bus 002 Device 002: ID 1a2c:2124 China Resource Semico Co., Ltd 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

compiled the sketch : (no problems)

Sketch uses 3674 bytes (11%) of program storage space. Maximum is 30720 bytes.
Global variables use 93 bytes (4%) of dynamic memory, leaving 1955 bytes for local variables. Maximum is 2048 bytes.

Uploading, using the parameters :

Board: Duemilanove ( as suggested by another list member, as it worked for him with the clone)
Processor; atmega 328P
Port: /dev/ttyUSB0 ( As you suggested)

I double checked the chip on the board, and it is an <Atmel Mega 328P AU 1545>

Here is where the problem begins

ome/charlie/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-objcopy" -O ihex -R .eeprom  "/tmp/arduino_build_112514/sketch_apr24a.ino.elf" "/tmp/arduino_build_112514/sketch_apr24a.ino.hex"
Using library LiquidCrystal at version 1.0.7 in folder: /home/charlie/arduino-1.8.5/libraries/LiquidCrystal 
Sketch uses 3674 bytes (11%) of program storage space. Maximum is 30720 bytes.
Global variables use 93 bytes (4%) of dynamic memory, leaving 1955 bytes for local variables. Maximum is 2048 bytes.
/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_112514/sketch_apr24a.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/charlie/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/home/charlie/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

the only ports available to me are /dev/ttyuS0, or /dev/ttyUSB0.
whichever I choose gives the same result.

Looking at Tools/Get Board Info, it returns
BN: unknown board
VID: 1A36
PID: 7523
SN: Upload any sketch to obtain it


If I use the <Mega 2560> board I change the tools/ board to < Arduino Genuino Mega orMega 2560> choice.
and I get the same result....

"Programmer is not responding."

Is there any other info I can supply, that might help?

Thanks again,
Charlie

Uploading, using the parameters :

Board: Duemilanove ( as suggested by another list member, as it worked for him with the clone)
Processor; atmega 328P
Port: /dev/ttyUSB0 ( As you suggested)

I double checked the chip on the board, and it is an <Atmel Mega 328P AU 1545>

Not saying it isn't a Duemilanove, but I have about 10 of the clones and they all program as a Uno.

Please check both Uno's by selecting :
Choose Tools→Board→Arduino Uno to find your board in the Arduino menu. ...
Choose the correct serial port for your board. ... probably /dev/ttyUSB0
Click the Upload button.

Show your error message.

:slight_smile: kprims

I feel so retarded... followed your last instruction and ......

IT WORKED ! !

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/tmp/arduino_build_212720/sketch_apr24a.ino.hex"
avrdude: writing flash (3674 bytes):

Writing | ################################################## | 100% 0.63s

avrdude: 3674 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_212720/sketch_apr24a.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_212720/sketch_apr24a.ino.hex:
avrdude: input file /tmp/arduino_build_212720/sketch_apr24a.ino.hex contains 3674 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.50s

avrdude: verifying ...
avrdude: 3674 bytes of flash verified

avrdude done.  Thank you.

You had the correct solution all the time.

May your Karma increase tenfold!~

and please...... forgive me my stubbornness....
and thank you again, for hangin in there, with me.

Now it's back to breadboarding, since in my frustration, I pulled it all apart.

Charlie

Thanks, glad you got it. Good luck.