Trouble uploading firmware over bluetooth

I have an Uno, and a Sparkfun Bluetooth Mate Silver. I can connect to the arduino over serial, send receive data etc.

However, I can't upload new code to it. When I do, I get the error below. The TX/RX lights don't even light up! Are there any DTR/RTS lines coming out of the Uno that I could hook into the Mate, in case that's the problem ?

Any idea why I can't

John

/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/rfcomm0 -b115200 -D -Uflash:w:/tmp/robot1.cpp.hex:i

avrdude: Version 5.10, compiled on Jun 27 2010 at 00:38:29 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" User configuration file is "/home/looney/.avrduderc" User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/rfcomm0 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: 0 [30] avrdude: stk500_getsync(): not in sync: resp=0x30

avrdude done. Thank you.

This is something I wish to do myself. I noticed that you didn't mention the RESET connection. It should go to DTR pin of the BT. Good luck and please inform us regarding the progress.

The Sparkfun Mate doesn't have a DTR pin, but it does have an RST-0 pin...which is often plugged into 'DTR' it seems. I connected that to the RST pin on the UNO, and I did get a different error;

/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/rfcomm0 -b115200 -D -Uflash:w:/tmp/build6829959987630077793.tmp/robot1.cpp.hex:i

avrdude: Version 5.10, compiled on Jun 27 2010 at 00:38:29 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" User configuration file is "/home/looney/.avrduderc" User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/rfcomm0 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

Hmm. There is also a hole on the board, labelled 'PI06'... Sparkfun say "Should you need to reset the Mate, pull this pin high upon power-up, and then toggle it 3 times" - is that the signal sent out of the Arduino reset pin prior to programming ? If so, I could just solder a header in there....

I think you can use the RST pin - I believe that Arduino uses both RST and DTR for reset. The 'PI06' pin from the mate sounds like the reset pin for the board itself.

I had a look at the Bootloader docs on the Arduino reference site. It said that the bootloader looks for Pin 13 to be flipped a few times after initial power on, and if that happens, anything incoming over serial gets put into flash. So... maybe wire RST-0 on the Sparkfun Mate to Pin 13 on the Arduino ?

The question is can you control the BT RTS line? This should be the first test before you continue.

I was always under the impression that these(RN BT) units wouldn't work for remote code uploading unless new firmware was uploaded, and why most people use Xbee units for that (as you can program a gpio to pass on the DTR/RTS signal)

Phew there is some major back and forthing on whether this can be used to hook up to an UNO/Mega to uplad sketches but the basic consensu is that it can be done but with a bit of work to reset the board during the upload process.

One guy has an arduino pro set up but his diagram doesn't make sense and this mod requires some software changes in the IDE. Does anyone have an image showing how to do this? Summarising what I have read, can anyone check to see if this is right? My board arrives in a few days and I'll probably let the smoke out :)

BlueSMiRF Vcc --> Arduino 5v (on the power jumper) BlueSMiRF GND --> Arduino GND (on the power jumper) BlueSMiRF RTS-O --> Arduino Reset (on the power jumper) BlueSMiRF TX-O --> Arduino RX (Pin D0) BlueSMiRF RX-I --> Arduino TX (Pin D1)

Anyone know if this is right? anyone done this, OP, is this what you've got? anyone got a diagram of what works?

My only concern is regarding the RTS connection to the reset pin, other posts regarding programatically resetting the UNO seems to require a cap in the way. Also the posts I have read say you need to hook up the DTR line not the RTS line, and the DTR line is not broken out on the BlueSMiRF board (PIO6 apparently)

There are also some posts about soldering the little pad on the back of the board as this connects the RTS and CTS lines. It's all so confusing...

I can't believe this hasn't been blogged to death already :)

I suppose one way of getting this to work is to get the Arduino BT :)

I finally got bluetooth uploads to work after I figured out that the bootloader in the arduino expects to be talking at some baud rate (probably 115200) and the bluetooth modules can be programmed to talk at different baud rates as well, so unless the bluetooth module is programmed to talk the same baud rate as the arduino bootloader, you don't stand a chance.

Also, I'm using the ITead studio bluetooth shield, and it cannot do any kind of reset, so I have to hold down the reset button and release it at the same time I hit enter to run avrdude. I have to run avrdude from a command line so I can do this. Attempting to get the timing right with the IDE was hopeless.

Here's my web page with my bluetooth experiences:

http://home.comcast.net/~tomhorsley/hardware/arduino/ITead.html

Yeah timing is hit and miss with the IDE, I didn’t get it to work at all. 2 solutions present themselves

  1. sparkfun - break out the flow control lines
  2. Arduino developers - implement a command mode in the boot-loader

Actually the 2nd option would solve 2 reptative issues on the forums, this one and the “How can I software reset the arduino”

:slight_smile:

USB cable for uploading it is then.

Hello Friends, Did you resolve this problem, i'm doing with bluetooth and Ardruno and wana programing via bluetooth like that