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:

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.

Revisions of SWUpdate.cpp

Revision Date Message Actions
29:f67a7f54c173 2020-09-13 Minor revision to debug macros File  Diff  Annotate
28:881661d475c1 2018-11-18 Minor changes to debug build only File  Diff  Annotate
27:3d3089b8212d 2019-07-14 Clarify in return codes if the specified file does not exist. File  Diff  Annotate
26:f2bb6061dcb3 2018-05-07 Added a method to get the current build number (SW version number). File  Diff  Annotate
25:af99bdcca2b4 2017-11-21 Minor code cleanup File  Diff  Annotate
24:e400edb8d2ee 2017-11-10 Add a method to translate an error code into text string File  Diff  Annotate
23:cfe84db2b2cb 2017-06-01 Cleanup remove unnecessary include files. File  Diff  Annotate
22:2a010efe00da 2016-12-29 Minor change from sprintf to snprintf File  Diff  Annotate
21:253e7da56ff9 2015-11-30 Remove unused code. File  Diff  Annotate
19:169aab9047bd 2015-01-19 Revise to detect full local file system. File  Diff  Annotate
18:5f7667d63a27 2014-10-11 Documentation updates only. File  Diff  Annotate
17:1d318666246c 2014-07-05 The cleanup function was not properly forming the current version filename, so could delete it on some circumstances. File  Diff  Annotate
16:de99e872fc9d 2014-07-05 Permit reference to "long file" name on server, but truncate binary file name on local file system to 6 chars, allowing 2 for version number => staying at final of 8.3. File  Diff  Annotate
15:49cc43dcbbf6 2014-06-28 Turned off debug, and added a disclaimer about which mbed firmware it is known to work with (in case it doesn't work with them all). File  Diff  Annotate
14:0e012d53c6df 2014-06-27 bin file must be 8-chars total, so revised the example to have a shorter filename, and sequence number to be 2 digit, not 3. File  Diff  Annotate
9:73067ef14c30 2014-06-21 Several updates to make it more robust and reliable, including removal of all other .bin files. File  Diff  Annotate
8:8e840a036116 2014-06-15 Documentation and rearranging a few files for easier maintenance. File  Diff  Annotate
7:a7efbae7e02e 2014-06-15 Minor update to a debug diagnostic, and turned off debug. File  Diff  Annotate
3:c69fff55fc60 2014-06-14 Updated documentation to support integrity checking. File  Diff  Annotate
1:208de08b1a19 2014-06-14 Unconditionally try to remove the old bin file when a new one has been downloaded.; Add a few more warning messages.; Provide a placeholder for an integrity check of the new download. File  Diff  Annotate
0:e221363f7942 2014-04-21 Software Update - not yet reliable File  Diff  Annotate