jabdoa2 / Asksin_OTA_Bootloader

Bootloader with Homematic Bidcos Over the Air Update OTA support
MIT License
10 stars 13 forks source link

firmware file format and compatibility with stock bootloader #7

Open mo22 opened 7 years ago

mo22 commented 7 years ago

Hi, I have an unmodified sw1pbu and would like to modify the firmware using flash-ota. I'm able to flash an official firmware image without problems, however the device rejects any custom firmware created with hex2eq3.php Looking at the stock firmware the format seems to be a list of [uint16 length][data][uint16 crc] where length is always a multiple of 16. The first block is 15-1716, then there are interleaved blocks 116 and 1716, and at the end a couple of blocks with 1716 length. as the SPM_PAGESIZE is 256 i assume that the 1716 blocks contain one page worth of data with a 16 byte header?, also the data does not seem to contain any valid atmel code. I assume it is encrypted? maybe the 16 byte header is an aes IV? Please let me know if it should be possible to flash a custom eq3 file or if that only works after installing the custom bootloader, also, does the custom bootloader accept stock eq3 files? Thanks, Mo

jabdoa2 commented 7 years ago

Hi Mo,

The custom firmware only works with the custom bootloader. Also the custom bootloader currently will only flash the custom firmware because the original one is encrypted (which might be broken now but was not when i wrote the bootloader).

Jan