diff --git a/content/pylife/fwupdate/_index.md b/content/pylife/fwupdate/_index.md index 3060df3..a327521 100644 --- a/content/pylife/fwupdate/_index.md +++ b/content/pylife/fwupdate/_index.md @@ -44,17 +44,34 @@ The immediate firmware update resolves this issue, but if you do encounter pleas ## Manual firmware update from computer -For most people, firmware update through the app is the best option. However it is possible to update through a computer if you have the USB cradle or can connect to the PyGo's serial port through a computer. -If you want to do this, do the following: - 1) Download the relevant firmware for your PyGo. Click on the relevant link below, and download the firmware in the URL field - * [PyGo1 firmware](https://software.pycom.io/manifest.json?sysname=pygo1&fwtype=pylife¤t_ver=1.20.4) - * [PyGo2 firmware](https://software.pycom.io/manifest.json?sysname=pygo2&fwtype=pylife¤t_ver=1.20.4) - 2) Connect to your PyGo's serial terminal, and run `upgrade()` +For most people, performing the firmware update through the app is the best option. However, it is possible to update through a computer if you have the USB cradle or your device is already in upgrade mode. + +If your device is not already in upgrade mode from a previous upgrade attempt, please install [Atom](https://docs.pycom.io/gettingstarted/software/atom/) or [Visual Studio Code](https://docs.pycom.io/gettingstarted/software/vscode/) and enter the REPL prompt in the Pymakr plugin. Alternatively you can use PuTTy or minicom as Terminal programs + +![Pymakr Console](/gitbook/assets/pylife/fwupdate/pymakr.png) +> The above screenshot shows the usual startup messages from the PyGo when in application made. Wait for these commands to complete before issuing the `upgrade()` command. + +Please follow these steps to upgrade your PyGo on your PC: + + 1) Download the relevant firmware for your PyGo. Click on the relevant link below which will initiate the firmware image download. + * [PyGo1 firmware](https://software.pycom.io/manifest.json?sysname=pygo1&fwtype=pylife¤t_ver=1.20.4&download=true) + * [PyGo2 firmware](https://software.pycom.io/manifest.json?sysname=pygo2&fwtype=pylife¤t_ver=1.20.4&download=true) + + 2a) If your PyGo is still in application mode, connect to your PyGo's REPL via Atom, Visual Studio Code, PuTTy or minicom, and run `upgrade()` + + 2b) If your PyGo is advertising a WiFi network with the name `PyCom_AP_Firmware_Update`, your PyGo is already in upgrade mode and you can continue to the next step. + 3) On your computer, connect to the PyGo's access point: * SSID: PyCom_AP_Firmware_Update * Password: www.pycom.io + 4) Open up a command prompt or terminal, navigate to the directory your downloaded firmware is in, and run the following, replacing YOUR_FIRMWARE_HERE with firmware you have downloaded: - ``` + + Ensure that you run each command separately and check the output. You should see a line "Status: OK" in the output for commands that do a `--request GET`. Please note the ota-reboot command may not return a result and seem to hang. You can check if your PyGo is showing the usual start-up messages after the upgrade is complete. + + Pushing the firmware binary to the device (command with `--request POST`) can take several minutes so please be patient. + +``` curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-init" curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-update" curl --request POST --data-binary @YOUR_FIRMWARE_HERE.bin http://192.168.4.1/update @@ -62,5 +79,19 @@ curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-finish" curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-verify" curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-reboot" ``` - 5) Check that all commands have run succesfully without error. Your PyGo is now upgraded. +For example, if you're using MacOS with a PyGo1 and have download the current PyGo1 firmware to the ~/Downloads folder: + +``` +cd ~/Downloads +curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-init" +curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-update" +curl --request POST --data-binary @firmware_pygo1_1.20.4.r4-pylife.bin http://192.168.4.1/update +curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-finish" +curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-verify" +curl -v --request GET http://192.168.4.1/status -H "FW-Header-1: ota-reboot" +``` + +> For Windows users, the curl command is included in Windows 10 since insider build 17063. For older versions of Windows, please download the curl application from https://curl.se/windows/ + + 5) Check that all commands have run successfully without error. Your PyGo is now upgraded and you should see the startup messages as shown in the screenshot above. diff --git a/static/gitbook/assets/pylife/devices/thumbnail_PyGoBottomView.png b/static/gitbook/assets/pylife/devices/thumbnail_PyGoBottomView.png index 01d63bb..843f163 100644 Binary files a/static/gitbook/assets/pylife/devices/thumbnail_PyGoBottomView.png and b/static/gitbook/assets/pylife/devices/thumbnail_PyGoBottomView.png differ diff --git a/static/gitbook/assets/pylife/fwupdate/pymakr.png b/static/gitbook/assets/pylife/fwupdate/pymakr.png new file mode 100644 index 0000000..a258c72 Binary files /dev/null and b/static/gitbook/assets/pylife/fwupdate/pymakr.png differ