Hi!
I'm trying to upload sketches wirelessly to an atMega 328.
I'm using the HC-05 bluetooth module connected to the atMega chip.
The onboard bootloader is the optiboot 4_4.
The selected board in arduino ide is UNO.
The bt module is correctly setted at 115200 baud.
I release the reset button as soon as the verbose output shows " setting dtr"
The upload is succesfull but I alwais get the same error:
avrdude: 2220 bytes of flash written
avrdude: verifying flash memory against C:\Users\YOUGAR~1\AppData\Local\Temp\build7183738074147691639.tmp\ASCIITable.cpp.hex:
avrdude: load data flash data from input file C:\Users\YOUGAR~1\AppData\Local\Temp\build7183738074147691639.tmp\ASCIITable.cpp.hex:
avrdude: input file C:\Users\YOUGAR~1\AppData\Local\Temp\build7183738074147691639.tmp\ASCIITable.cpp.hex contains 2220 bytes
avrdude: reading on-chip flash data:
Reading | avrdude: Send: U [55] . [00] . [00] [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Send: t [74] . [00] . [80] F [46] [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x5d
avrdude: Send: V [56] [20] . [00] . [00] . [00] [20]
avrdude: Recv:
avrdude: stk500_cmd(): programmer is out of sync
this is the part of the verbose output that I got uploading the ASCII TABLE example that comes with the arduino ide.
The sketch runs perfectly, as well as any other sketch I upload, but I always get the same error, at the same point.
Also, the serial monitor communication works fine
It seems the error comes out when avrdude starts verifing
I also tried :
- to use a slower bootloader (19200),
- another bluetooth module,
- windows xp
- windows 7
Always the same error...
I'm using the Toshiba bluetooth stack, it's the only one able to "talk" to these cheap modules.
I also got working autoreset feature connecting the led output through a capacitor to the atMega reset
Any suggestion to overcome this problem?