Go Down

Topic: Upload failed to Arduino Mega 2560 via Bluetooth (Read 1 time) previous topic - next topic

srinadhpotnuru

After trying to upload sketch to Arduino Mega from HC-05 as shown at this link (https://www.instructables.com/id/Program-an-Arduino-Wireless-Over-Bluetooth/) the upload keeps failing. But the same circuit works fine with Arduino Uno. Can anyone point me in the correct direction or identify the fault.
Bluetooth Module used - HC-05
Upload speed of board selected as 57600bps and Bluetooth module's baud rate set as 57600bps

Isaac96

Doesn't the Mega have an upload speed of 115200 bps? As does the Uno?
Please post the exact error message. Thank you.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

srinadhpotnuru

The upload speed of both have been changed to 57600 to match with HC-05's baud rate. Errors displayed

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
An error occurred while uploading the sketch

Isaac96

Is the Mega resetting properly upon upload?
Can you upload to the Mega without the Bluetooth et al?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

srinadhpotnuru

The upload with USB is successful and the reset on upload from bluetooth is failing

Isaac96

#5
Oct 21, 2017, 04:53 pm Last Edit: Oct 21, 2017, 04:53 pm by Isaac96
The reset on upload? That would be in the domain of the Instructable. Looking at the Mega and Uno schematics, the reset circuits are apparently identical.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

srinadhpotnuru

Apparently the Mega circuit has a 22pF capacitor between Reset and ground. Would this be affecting anything? Can you point me in the right direction to identify the reset characteristics and requirements for a program upload to Arduino boards from Serial.

Isaac96

Usually the pulse to 0V resets any Arduino. The reset circuits seem to be identical with the Uno and Mega, so what works for the Uno should work for the Mega. Does the exact same setup work on an Uno? And did you burn new bootloaders to the boards to work with the 57600baud upload speed?
Note: you can actually make the BT module work at 115200.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

Michel1988

Hey all, I have exactly the same problem. Upload on UNO with same circuit goes fine but upload on Mega fails. Could you post your solution? Thx

thewhite

After trying to upload sketch to Arduino Mega from HC-05 as shown at this link (https://www.instructables.com/id/Program-an-Arduino-Wireless-Over-Bluetooth/) the upload keeps failing. But the same circuit works fine with Arduino Uno. Can anyone point me in the correct direction or identify the fault.
Bluetooth Module used - HC-05
Upload speed of board selected as 57600bps and Bluetooth module's baud rate set as 57600bps
I am using the circuit from https://makezine.com/projects/diy-arduino-bluetooth-programming-shield/ STEP 8.
It works well for me with HC-05 and Arduino Mega.
In addition I've added a diode between HC-05 tx and resistor. Katode to HC-05. With that diode I can upload both ways : wireless and usb. It works on 115200bps

Go Up