@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.
@pillarama I don't know about FOTA, but I see no reason why it would not work. I guess it depends what you do with it!
I like being able to burn bootloader from within arduino ide and not having to swap to avrdudess et al - now I can boot load and program in the same window. I was amazed at how easy it is to install and use. No need for fuse calculators, just choose clock speed, internal or external and brownout and click burn.
I do hope to try FOTA in April (real life allowing) and so will comment more then....
Only snag is it dosn;t work with the ardudriod on android, I have contacted the dev of that app and sent the error message but as yet no solution. Maybe it will be possible in the future to do all this from phone and needing PC..... It is very close.
Found a solution! It is quite easy with the custom board features of PlatformIO.
I wrote a brief tutorial here.
Tested with a Pro Mini 8 MHz 3.3V and FTDI programmer.
Unfortunately I don't have here a 16 MHz 5V devices to test
@jimmy-loyens stuff in itallics i'm not absolutely shure about or are remaining problems. Anyone feel free to add or correct anything
While writing this tutorial my node went offline
So it might be i have to add some more to the tutorial lateron
Seems to be a problem with MYController because i can still see node trying to communicate over mqtt.
I see its my sh***ty router acting up again, even my internet went down just now.
It seems that somehow the firmware on my node got corrupted, when connecting it to a serial monitor it didn't output anything. When looked on MQTT.fx at the messages node and GW where continiously exchanging "stream messages. Then i flashed the node the oldfashioned way and now its all up again. Still trying to find out what happened exactly.
@tekka Right now, I am looking where your files are different from mine. I do not understand where I went wrong. perhaps I should also delete the other files that make creates, not just the hex.
Either way. A lot of thanks.
@Tekka You steered me in the right direction. Thanks again! I did a search on wdt_reset to get a better idea of what it does and then found posts describing that if something keeps the CPU occupied for a prolonged time that the watchdog can kick in thinking the MCU has stalled/froze. I also understood that the MySensor library will reset the watchdog timer regularly.
Looking at my sketch I found that I used delay() at certain points. The five minute sleep was done using wait(). Replacing delay() with wait() throughout the sketch fixed the issue for me! It has not reset overnight where otherwise I would see it reset every 25 seconds or so. Now I will look at the other examples that would reset itself.
I'm in good shape now to roll out MYSBootloader and upgrade my nodes to 2.2.0 at the same time.