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.

  1. 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!
  2. Compile this program.
  3. Copy the bin file to the mbed (if this is the very first execution of this program).
  4. Save the bin file to an accessible web server (simplifying the filename is ok).
  5. Create the companion text file, which contains the version, checksum, and size of the binary. Save on the web server.
  6. Use a serial program (e.g. Tera Term), set for a matching baud-rate as configured in the program (e.g. 460.8K).
  7. Reset the mbed so the program runs.
    1. Program prints its startup banner, which includes the compile time date(and time) stamp.
  8. Press 's', which is the command for 's'oftware update check.
  9. SWUpdate library queries the server for the .txt file, assesses if there is a newer version.
    1. SWUpdate downloads the new version.
    2. SWUpdate compares the size and checksum to assess validity.
    3. SWUpdate removes all other .bin files if the new version is good.
  10. Reports the installation of the new version and reboots to activate it.

All wikipages