OS: Linux Mageia 3 with Arduino 1.0.5
Board: Nano with ATmega328
Upload etc: was working fine, port hi-jack.
Messages:
Using:
avrdude -v -v -v -v -patmega328p -carduino -P/dev/ttyUSB1 -b57600 -D -Uflash:w:/tmp/build6475376080478363042.tmp/Blink.cpp.hex:i
Responds:
avrdude: Version 5.11.1, compiled on Jan 11 2013 at 12:58:45
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude/avrdude.conf"
User configuration file is "/home/nick/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB1
Using Programmer : arduino
Overriding Baud Rate : 57600
ioctl("TIOCMSET"): Broken pipe
ioctl("TIOCMSET"): Broken pipe
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [0d]
avrdude: stk500_getsync(): not in sync: resp=0x0d
ioctl("TIOCMSET"): Broken pipe
So what I did:
I wrote code that sends the string "Test 0xOD 0xOA" down the V24 (ie over the USB, yes, that same port used for uploading....) and when pressing reset the Nano starts sending this string quite ok, as seen in a terminal (eg mincom --device /dev/ttyUSB2).
NOTE when trying to rescue this I ensure that minicom is not running and the Nano has been unplugged and re-plugged so that /dev/ttyUSB2 has not been piped to something else).
The problem is (a) I cant stop the Nano sending which stops avrdude handshaking and (b) trying to re-flash with something simple like "Blink" never gets there becuase the port on the host is already receiving "Test" - but this doesn't explain why the pipe is bust.
I tried to be clever by holding down the reset and releasing at just the right moment, so that the code hasnt started executing when avrdude tries to upload, but I can't get the moment right.
I also tried writing a new flash image in using an ICP except that my ICP is bust (for different reasons).
Any ideas?