Wireless OTA

Started by ivars211, February 22, 2018, 03:18:11 PM

ivars211

Quick question - any particular reason why wireless programming is limited to sketches below 64kB?

Thanks.

Felix

It's because it was developed before the atmega1284p based Moteino was designed, and the protocol has a hardcoded 2byte sketch length.
So as it is now, the limitation would apply to MoteinoMEGA only.
What board are you trying to OTA more than 64K with?
In my own practice I never had a compiled sketch that large, but I reckon it could easily get that large if you embed long strings or other binary data in the sketch itself.

ivars211

Thanks Felix,

Using atmega1284p with rather complex LCD menus etc and it is starting to hit that 64kB limit just about now. If one would like to increase the sketch limit, bootloader needs to be re-compiled, right?

Felix

Right, and you'd need to change the protocol to allow for the larger size.
Anyhow 64KB would be a rather large OTA transfer, would take pretty "long". Is that appropriate?
I don't know the details of your project but since your node has an LCD, is it really in a remote location where it can't be accessed?
I am just trying to understand what would be the best compromise since it sounds like an edge case (large sketch, but not really inaccessible?).

ivars211

Thanks Felix,

Yes, it is indeed an edge case. Its a custom PCB that is inside a case and uses both serial ports (and all other i/o) for other purposes. Long updates is not a problem.

It seems that all that is required is changing 2 byte sketch size and the formatting.

Thanks.

Felix

Quote from: ivars211 on February 23, 2018, 09:43:10 AM
It seems that all that is required is changing 2 byte sketch size and the formatting.
Sounds right but I would need to look into it to confirm. But if you're brave you can try the change!
Also I think there might be changes in the PC app, but you can use the python variant to run the OTA program, in which case you can edit the .py script.