Hi at all! I'm using Arduino Uno with Optiboot, and a BLE (Bluetooth Low Energy) HM-10 module.
I'm using this guide:
I can talk with the bootloader, and communication happens, but during the uploading, the normal program starts. Why doesn't the bootloader wait for finishing?
Why? Am I missing something?
Plz ti'z important xdxd!!11
Can you provide any additional details on your setup and what you mean when you say "communication happens?" I'm not an Optiboot guy, but I'm sure you'll need to provide more info so one of the experts here can help.
I can receive the 0x14 and 0x10 bytes everytime I send something to the arduino, but due to the BLE limitations, I can only send 20 bytes each time.
So this is basically what I do:
- I start from address 0
- I pick the higher and lower part of the address, then increment by 4
- I make a byte array like this: [ STK_LOAD_ADDRESS, lower_part, higher_part, SYNC_CRC_EOP ]
- I send to the arduino and wait for response
- If response if [ 0x14 , … , 0x10 ] I send the hex file
- Sending the hex file like this:
size = binaryFile.length - programIndex < 8 ? binaryFile.length - programIndex : 8;
sync = new byte[size + 5];
sync = STK_PROGRAM_PAGE;
sync = 0x00;
sync = (byte) size;
sync = STK_FLASH_MEMORY;
for (int i = 4; i < sync.length - 1; i++)
sync = binaryFile[programIndex++];
sync[sync.length - 1] = SYNC_CRC_EOP;
7) I iterate 5 and 6 until the binaryFile has reached the end.
8) I leave programming mode, and receive the [ 0x14 , … , 0x10 ]
But sketch bytes are not correct on the arduino. It doesn’t print anything.
What am I doing wrong?
makes a max page size of 128, and increment the address by 64. I basically changed the max page size to 8 and the increment of 4, to match the BLE max size (20 bytes).
Can this be the problem? But I don’t think so…
Can you help me???
Thanks in advance!!