MYSBootLoader OTA documentation
Is there any documentation on how MYSBootloader expects to receive OTA firmware updates? This is a slick feature for sure but I need to write an OTA stack for my controller since I am not using MYSController.
I checked for documentation but there seems to be almost zero there (just a brief mention that OTA exists on the serial protocol page).
@jsiddall You can find additional information and sources here:
I also see #define FIRMWARE_BLOCK_SIZE 16
with 6 bytes of other headers brings it up to 22 bytes of the 25 available payload bytes. Is it safe to assume the block size won't be changing any time soon?
Also, if the actual firmware doesn't fill the last block is the expected behavior to send less than FIRMWARE_BLOCK_SIZE bytes (i.e.: no padding)?
@jsiddall It's actually 7 bytes header, leaving 25 bytes for payload.
FW blocks are 16 bytes (FIRMWARE_BLOCK_SIZE). Padding bytes (0xFF) are added to fill the page (m328p has 64 words per page). CRC is calculated over all transmitted pages.
See here for additional information: https://github.com/mysensors/MySensorsSampleController
@tekka, yes, sorry, should have clarified. 7 bytes for MYS sensor, but the 6 bytes I was referring to as a "header" was the typedef on the firmware download. So 7+6=13/32 leaving up to 19 bytes for the firmware block itself.
Thanks for the clarification on the padding and the CRC. That will become important.