From 5008dfbd56f97fe0c478dd6cda5b6dc0d3d62618 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 20 Sep 2018 11:22:03 +0200 Subject: [PATCH] Add Updater CLI example --- example/updater/README.md | 27 +++++++ example/updater/main.go | 148 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 example/updater/README.md create mode 100644 example/updater/main.go diff --git a/example/updater/README.md b/example/updater/README.md new file mode 100644 index 0000000..741e1dd --- /dev/null +++ b/example/updater/README.md @@ -0,0 +1,27 @@ +# Example: Updater + +A simple example of an updater client wich can: + +- Configure a ReachRS module to use the given WiFi network +- Check for updates then reboot to "ReachView" mode + +## Usage + +1. Boot your ReachRS module in "Updater" mode. You can see a documentation on how to reset your device [here](https://forge.cadoles.com/Pyxis/orion/wiki/FlashIt). + +2. Launch the example in `configure-wifi` phase and provides WiFi network informations. + ```shell + go run example/updater/main.go \ + -phase 'configure-wifi'\ + -host ''\ + -password ''\ + -security '' + ``` +3. The device will switch to the provided WiFi network, as you should do. +4. Launch the example in `update-then-reboot` phase. + ```shell + go run example/updater/main.go \ + -phase 'update-and-reboot'\ + -host '