Arduino Mega command line: avrdude time out

I have been using the Arduino Linux IDE with no problems. I now want to use avrdude in the command line to upload. I use this command:

avrdude -p m1280 -b 57600 -c arduino -C /etc/avrdude/avrdude.conf -P /dev/ttyUSB0 -v

and I get the following:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

HELP! What am I doing wrong?
Is there any way I can “see” the avrdude string the Arduino IDE uses (since it works)?

—any help appreciated…

Is there any way I can "see" the avrdude string the Arduino IDE uses (since it works)?

Close the IDE if running and open the preferences.txt file for the IDE in a texteditor. Change the keys : build.verbose=true upload.verbose=true

Then startup the IDE. It should now print all the compiler and avrdude upload messages.

Eberhard

Eberhard,

Thanks. I added the lines to the preference file and I was able to see the avrdude string with no problem. But.....when I use the exact same string from the command line i get the following:

ser_recv(): programmer is not responding

Is there something else I need to do?

rgds, stan

Is there something else I need to do?

Yes, either write a script to toggle the serial port's DTR signal, or hit the manual reset button on the board at the proper time (when ever that is). You need the bootloader running on the Arduino for it to respond properly to AVRDUDE. The Arduino IDE does this before handing off the upload task to AVRDUDE.

Lefty

Lefty,

I'm a novice here, so any help you can lend will be appreciated.

I'm running Fedora 12. The Arduino Mega is connected via USB (/dev/ttyUSB0). I'm not sure how to toggle the DTR signal, and suggestions?

I can't tell you specifically as I'm a rather dumb Window uses. However I have seen posts around here talking about writing a script that can run and toggle the DTR signal on the comm port and then call AVRDUDE. And as I said if you can time it correctly, just pressing the reset button on the Arduino will allow it to respond to AVRDUDE, but I'm not sure of the timing involved for the manual press.

I'm sure someone here can add more details.

Lefty

Hi, It seems that only versions of Avrdude >=5.8 reset an Arduino board when using programmer type "arduino".

Check the version with avrdude -version

Eberhard