New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Reply To: Uploading to a Nano through an HC-05 fails with stk500_getsync not in sync

Aisha and Ciaran have the two causes. I did this for a Nano in an air handler once, here’s the whole recipe for the ZS-040 board.

1. Put the HC-05 in AT mode: hold the little button while powering it, the LED blinks slowly (about every 2 s). Talk to it at 38400 from a USB-serial adapter. 2. Set it up (115200 if your Nano works with “ATmega328P”, 57600 if only “Old Bootloader” works):

AT+ROLE=0
AT+UART=115200,0,0
AT+POLAR=1,0

AT+POLAR=1,0 makes PIO11 go low while a link is up. 3. Reset wiring. The ZS-040 doesn’t bring PIO11 out to a header pin, so solder a thin wire to pin 32 of the module. Connect it to the Nano’s RESET through a 0.1 uF capacitor, the same way the USB chip’s DTR does it. When avrdude opens the port, the link comes up, PIO11 drops, the capacitor turns that into a short reset pulse, and the bootloader is listening. 4. Disconnect STATE from RESET.

It’s fiddly, and the first sync after pairing sometimes fails, so try twice before you start debugging again.

Accepted solution♥ 5