Software Update via Ethernet - the mbed application can pull down an updated application binary from a web server and activate that binary. This library works only with the LPC1768, as it relies on the magic-chip boot-loader mechanism.
Dependents: WattEye X10Svr PUB_SWUpdate
Success!! With this library, a network connection, and a web server hosting a new binary image, you can update the mbed firmware over the air (FOTA) - well, at least via Ethernet so far.
As of March 2015, it has been tested with the following mbed official libraries:
- mbed v95, v85 thru v89
- mbed-rtos v64, v32 thru v44
- EthernetInterface v47, v41 thru v43
And a custom derivation:
- HTTPClient v33, v32, which includes a custom HTTPFile.
Part of the update process involves checking the integrity of the downloaded binary file, for both a checksum and the program (file) size. To create this additional information, a small perl script is used (the important part is only 20 lines of code). See the documentation in the header file.
After the new binary is successfully downloaded, the checksum and the size are evaluated and if correct, then the old binary file is removed (this is the only way to cause the new binary to activate).
The mbed can then be automatically reset to activate the new image, or this may be deferred in case there is some other process necessary for an orderly restart.
Details are in the SWUpdate header file, and PUB_SWUpdate is a publicly accessible demonstration program for this library.
History
Minor revision to debug macros
2020-09-13, by WiredHome [Sun, 13 Sep 2020 14:53:10 +0000] rev 29
Minor revision to debug macros
Minor changes to debug build only
2018-11-18, by WiredHome [Sun, 18 Nov 2018 04:05:17 +0000] rev 28
Minor changes to debug build only
Clarify in return codes if the specified file does not exist.
2019-07-14, by WiredHome [Sun, 14 Jul 2019 01:40:36 +0000] rev 27
Clarify in return codes if the specified file does not exist.
Added a method to get the current build number (SW version number).
2018-05-07, by WiredHome [Mon, 07 May 2018 19:56:00 +0000] rev 26
Added a method to get the current build number (SW version number).
Minor code cleanup
2017-11-21, by WiredHome [Tue, 21 Nov 2017 16:58:49 +0000] rev 25
Minor code cleanup
Add a method to translate an error code into text string
2017-11-10, by WiredHome [Fri, 10 Nov 2017 12:32:04 +0000] rev 24
Add a method to translate an error code into text string
Cleanup remove unnecessary include files.
2017-06-01, by WiredHome [Thu, 01 Jun 2017 11:35:49 +0000] rev 23
Cleanup remove unnecessary include files.
Minor change from sprintf to snprintf
2016-12-29, by WiredHome [Thu, 29 Dec 2016 20:16:46 +0000] rev 22
Minor change from sprintf to snprintf
Remove unused code.
2015-11-30, by WiredHome [Mon, 30 Nov 2015 02:34:44 +0000] rev 21
Remove unused code.
Documentation changes only to detail supported platform, and operating behavior.
2015-01-19, by WiredHome [Mon, 19 Jan 2015 14:23:39 +0000] rev 20
Documentation changes only to detail supported platform, and operating behavior.