Problem to upload sketch trough bluetooth.

I have problem to upload this sketch to Arduino Uno trough bluetooth. I have tried both 57600 and 115200 baud rate.

#include <SoftwareSerial.h> 
int bluetoothTx = 0;  // TX-O pin of bluetooth mate, Arduino D2
int bluetoothRx = 1;  // RX-I pin of bluetooth mate, Arduino D3

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
int led = 13;
void setup() {
  Serial.begin(9600);  // Begin the serial monitor at 9600bps
  bluetooth.begin(57600);
  pinMode(led, OUTPUT);

}

void loop() {
 digitalWrite(led, HIGH);
 delay(1000);
 digitalWrite(led, LOW);
 delay(1000);
}

I’m using following bluetooth module, SparkFun Bluetooth Modem - BlueSMiRF Silver.

It seems to connect but after a while following error message appears and the connection is lost.

Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x28
avrdude done.

Can someone help me with this problem?

I believe the only baud rate that works for uploads on the Uno is 115200 but you might double check that.

Also, your board has a bootloader that allows you to upload new sketches and that only is active for a brief moment after the board resets. You need to reset the board immediately before sending the new sketch and have to start the upload before the bootloader times out.

Also, this might come in handy:

https://www.instructables.com/id/Overvi … cess-and-/

:slight_smile:

As a newbie to Arduino, your info gave me the final pieces of the jigsaw puzzle that I needed to allow program uploading via blue tooth. Many thanks.

Using the direct command to avrdude via the Windows command prompt was the final bit I needed.

Caso queiram aprender mais sobre a plataforma Arduino, eu recomendo extremamente o site do Flávio Babos: flaviobabos.com.br/ e o artigo o que é arduino: https://flaviobabos.com.br/arduino e tudo sobre a plataforma.