Unable to transfer code form HC-05 to arduino nano

As i was working on wirelessly programming arduino using HC-05 module . I have set the bt module to At state and configured to transfer data to arduino but while tranfering data form the new com ports ,the HC-05 recive the data but unable to transfer it to arduino ( the rx led nano slightly blinks) and an error message pops out after uploading

The error message
Arduino: 1.8.16 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x87

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x87

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x87

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0

avrdude: stk500_recv(): programmer is not responding

Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Do you have the HC05 connected to the Nano hardware serial (pins 0 and 1)? If so, that will interfere with program upload. Use a software serial port for the HC05 at least while you are in development. That will free the hardware port for program upload, debugging and observing program output in the serial monitor.

If this does not help, please post the test code.
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please post a wiring diagram. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

Your description is not quite clear.

Do you want to upload code via serial while the HC05 is connected for other purposes? If so, see above.

Or do you want to upload code through the HC05? In that case, you will have to find a way to provide a reset signal from the HC05 to the Arduino.

sorry for the informal format
i have connected HC-05 as follows
vcc - 5v on nano
gnd - gnd on nano
tx - rx on nano
rx -tx on nano
pin 32 of HC-05 - reset of nano

I want to upload code through the HC05.
I have made connection between pin 32 of HC-05 to reset pin of nano

Have you seen evidence that this has been done before on Nano?

The Nano has a built-in usb-serial circuit connected to pins 0, 1 and this may interfere with the signal from the Bluetooth module.

This should not be a problem if you use a Pro Mini instead of the Nano because that has no built-in usb-serial adapter.

yes i have been following one of the youtuber who has done it succesfully
here is an example

Did you use the same circuit and component values to do this as were used in the page you linked to?

yes i have used the same components but i am useing breadboard instead of pcb

Putting aside uploading code to the Nano for a moment, have you tested sending and receiving data using the BT module? Meaning: use USB to upload a sketch to the Nano which receives characters from serial monitor and echoes it back to serial Monitor. Confirm that works with USB connection, then disconnect USB, connect BT and repeat the test.

Can you please provide the code for the above test.
I was unsucessful with my code

I don't have it.

Post the code you tried and I will check it.

I had the same problem once. Through software serial (pins 2 and 3 on the nano) it should be possible.

But for the nano to accept the code. It needs a pulse to reset pin to low. The capacitor method didn't work for me.

I used a transistor (NPN) and connect the base to EN pin on the hc05. The collector to the reset pin and the emmiter to ground

And you need to change the baudrate to 115200 and flip the polarity of the EN pin. This can be done through the serial monitor

I have some serious doubts. The bootloader is programmed to use the UART and is not programmed to use SoftwareSerial.

How would that affect AVRdude? Further the baudrate depends on the bootloader (328P old boot loader or 328P).

Arduino changed de upload speed from 57600 to 115200. It wont accept 9600

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.