Merge pull request #5 from lorow/feature/update-ota-info

Update the documentation on how to use the new OTA
This commit is contained in:
Prohurtz 2023-04-06 13:54:54 -07:00 committed by GitHub
commit b73e25d371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 99 additions and 9 deletions

View File

@ -25,7 +25,7 @@ In the case of an FTDI programmer, the steps aren't as easy, so grab [this guide
## 3. Upload your firmware ## 3. Upload your firmware
- If you are using the OTA method, first make sure the tracker you wish to flash is turned on and connected to your network, then skip to the [OTA section below](#how-do-i-use-it). - If you are using the OTA method, skip to the [OTA section below](#how-do-i-use-it).
- Once the firmware has been built, press the upload button to upload the firmware. - Once the firmware has been built, press the upload button to upload the firmware.
@ -63,26 +63,68 @@ OTA stands for `Over The Air`, and it is a way to update your firmware without h
### How do I use it? ### How do I use it?
To use OTA, you need to have working firmware on your ESPs first. To use OTA, you need to have working firmware on your ESPs first. Follow [the manual building guide](#Building-and-uploading-the-firmware-manually)
Once you have mnually flashed the firmware at least once, you can use the `OTA` environment to upate your ESPs. Once you have manually flashed the firmware at least once, you can use the `OTA` environment to upate your ESPs.
::: tip Coming Soon ::: tip Coming Soon
Currently, we only support OTA using `platformio` and `Visual Studio Code`. We are working on a new app, where you can upload your firmware to your ESPs over WiFi straight from the app. Currently, we only support OTA using the provided web interface, but we are working on a new app, where you will be able to upload your firmware to your ESPs over WiFi straight from the app.
::: :::
To do this, you need to change your environment to the `OTA` version of your working environment. #### For firmware versions 1.1.0 and up:
For example, if you have a working `esp32AIThinker` environment, you would change your environment to `esp32AIThinker_OTA`. Since version 1.1.0 we've switched from using OTA via platformio to a more user-friendly approach.
Once you have changed your environment, you can upload your firmware to your ESPs using the upload button, as you would normally. <Alerts :options="alerts.upload_firmware_one">
<template v-slot:content>
<p>
You don't have to have the trackers connected to your pc for any of these steps, just powered on and connected to the Wi-Fi.
</p>
</template>
</Alerts>
Once you have successfully connected your trackers to your WiFi, you can use OTA to handle all future firmware updates. 1. Build the firmware using your current environment, if you've switched to an OTA env in the past - repeat those steps but select the environment without the `_OTA` suffix. Next, press the checkmark button to build it without uploading.
<ImageCard :options="image_settings.upload_firmware_build_button" />
2. Turn on your trackers and wait for them to connect to Wi-Fi
3. Locate their ip or mDNS name. For mDNS, the default is: [http://openiristracker.local/](http://openiristracker.local/)
4. Having done that, open [http://\<your-up-or-mdns-name\>:81/update](http://openiristracker.local:81/update) in your browser
for example: [http://openiristracker.local/](http://openiristracker.local:81/update)
This should open a page similar to this:
<ImageCard :options="image_settings.upload_firmware_webpage" />
Click on the select file button, and navigate to where you cloned the project and then to the `ESP/` directory.
Once there, open `.pio\build\your-environment` like so:
> By default, windows treats files and directories with a dot in front of their name as hidden. To change that - [see here](https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5)
<ImageCard :options="image_settings.upload_firmware_webpage_directory" />
You'll find a couple files in there, select the one named `your-environment-vVersion-feature`.
like this one:
<ImageCard :options="image_settings.upload_firmware_webpage_directory_file" />
5. Press upload and wait for it to finish. Done!
<ImageCard :options="image_settings.upload_firmware_webpage_upload_finished" />
#### For firmware versions of 1.0.0 and under:
1. Retrieve the IP or mDNS name of the tracker you wish to flash. The IP can be found through network monitoring applications, or by viewing tracker output in a serial monitor. 1. Retrieve the IP or mDNS name of the tracker you wish to flash. The IP can be found through network monitoring applications, or by viewing tracker output in a serial monitor.
2. In the `ini/user_config.ini` file: 2. In the `ini/user_config.ini` file:
- Put IP or hostname of device into config file - Put IP or hostname of device into config file
Like so:
```ini ```ini
[ota] [ota]
enableota = 1 enableota = 1
@ -92,6 +134,19 @@ otaserverport = 3232
``` ```
3. Change to OTA env 3. Change to OTA env
To do that, in visual studio code, locate the uplaod button, next to it will be listed a couple of buttons and your current environment.
For example, if you have a working `esp32AIThinker` environment, you would change your environment to `esp32AIThinker_OTA`.
Click on it.
<ImageCard :options="image_settings.upload_firmware_select_env" />
This will open a list of all available environments, select the one that matches your board and has a _OTA suffix
<ImageCard :options="image_settings.upload_firmware_select_env_dropdown" />
4. Restart the ESPs, they **_must_** be power cycled 4. Restart the ESPs, they **_must_** be power cycled
5. Press the upload button to upload the firmware.<br> 5. Press the upload button to upload the firmware.<br>
![img](https://i.imgur.com/lI3PFVC.png) ![img](https://i.imgur.com/lI3PFVC.png)
@ -135,7 +190,7 @@ To update the firmware you'll need to follow a couple of steps.
4.1. If anything went wrong, you can reset everything to the default state using `git reset --hard` and then retyping your credentials 4.1. If anything went wrong, you can reset everything to the default state using `git reset --hard` and then retyping your credentials
5. Upload your firmware [following steps from the uploading section](./update_platformio.md) 5. Upload your firmware [following steps from the uploading section](#Building-and-uploading-the-firmware-manually)
## Troubleshooting ## Troubleshooting

View File

@ -222,6 +222,41 @@ const image_settings = {
alt: "'img of platformio serial monitor'", alt: "'img of platformio serial monitor'",
max_width: "max-width: 600px;" max_width: "max-width: 600px;"
}, },
upload_firmware_build_button: {
url: "https://i.imgur.com/5E5u5Jz.png",
alt: "'Selecting platformio environment'",
max_width: "max-width: 600px;"
},
upload_firmware_webpage: {
url: "https://i.imgur.com/wMXdZcJ.png",
alt: "'Firmware uploading web page'",
max_width: "max-width: 600px;"
},
upload_firmware_webpage_directory: {
url: "https://i.imgur.com/KnnB28z.png",
alt: "'An example of how the bin file directory looks like'",
max_width: "max-width: 600px;"
},
upload_firmware_webpage_directory_file: {
url: "https://i.imgur.com/Ujx3iaG.png",
alt: "'An example of how the bin file looks like'",
max_width: "max-width: 600px;"
},
upload_firmware_webpage_upload_finished: {
url: "https://i.imgur.com/O2KzHAN.png",
alt: "'A finished OTA upload'",
max_width: "max-width: 600px;"
},
upload_firmware_select_env: {
url: "https://i.imgur.com/8sn6FSe.png",
alt: "'An example of how the popup list of envs looks like'",
max_width: "max-width: 600px;"
},
upload_firmware_select_env_dropdown: {
url: "https://i.imgur.com/nRpuBSI.png",
alt: "'An example of how the button for selecting env looks like'",
max_width: "max-width: 600px;"
},
ant_logo_platformio:{ ant_logo_platformio:{
url: "https://i.imgur.com/B6zK6n8.png", url: "https://i.imgur.com/B6zK6n8.png",
alt: "Platformio logo button", alt: "Platformio logo button",