OTA bluetooth sketch upload without capacitor into reset line

Hi everyone, I'm trying to figure out how to do an OTA sketch/hexfile upload via bluetooth after sending a string command over bluetooth. I'm using a Mega2560 with MegaCore and use the HC-05 bluetooth module working through Serial3. For production reasons, I would really like to find a way to do so without having to go through any hardware changes since the PCBs have already been made. So this excludes the option of adding in a capacitor to the reset line from the state pin of the HC-05, which is what most/all other guides I've seen use for this.

I know that MegaCore runs optiboot flash and I can change the UART in the bootloader from UART0 to UART3 and I know that the bootloader only loads if the EXTRST bit of the MCUSR reads 1. I think I can fix this issue by just using bitSet(MCUSR, 1), essentially trying to "trick" it into thinking it was an external reset, before resetting via WDTO, but if I reset via WDTO, then my HC-05 will shut off too and won't be able to receive the incoming data. I sadly don't know enough about modifying bootloaders or how the arduino receives and writes new application code know how to get this to work via software only.

Guidance would be greatly appreciated, thanks!

Oh and here is the schematic for the BT adapter.

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