
Software over the Air (wired in this case) update. This program demonstrates the SW Update library.
Dependencies: mbed HTTPClient SWUpdate mbed-rtos Watchdog EthernetInterface
You are viewing an older revision! See the latest version
Homepage
Demonstrator for the SWUpdate Library library.
Steps to test and use it.
- Revise the test program for your environment. The following lines may need to be changed:
- const char *url = "http://192.168.1.201/mbed";
- const char *name = "SWUp";
- pc.baud(460800); fast, because I like a snappy terminal!
- Compile this program.
- Copy the bin file to the mbed (if this is the very first execution of this program).
- Save the bin file to an accessible web server (simplifying the filename is ok).
- Create the companion text file, which contains the version, checksum, and size of the binary. Save on the web server.
- Use a serial program (e.g. Tera Term), set for a matching baud-rate as configured in the program (e.g. 460.8K).
- Reset the mbed so the program runs.
- Program prints its startup banner, which includes the compile time date(and time) stamp.
- Press 's', which is the command for 's'oftware update check.
- SWUpdate library queries the server for the .txt file, assesses if there is a newer version.
- SWUpdate downloads the new version.
- SWUpdate compares the size and checksum to assess validity.
- SWUpdate removes all other .bin files if the new version is good.
- Reports the installation of the new version and reboots to activate it.