EyeTrackVR-Docs/assets/firmware_guide_upload_and_update_firmware.md.b720563f.js
RedHawk989 80b3309ebf Merge pull request #3 from lorow/feature/updating-firmware
Fix typos, add recommended antennas, add info about updating the firmware
2023-03-10 13:53:45 +00:00

7 lines
11 KiB
JavaScript

import{_ as r,a as i}from"./chunks/index.5b1f69a8.js";import{_ as n,i as s}from"./chunks/index.1d77087a.js";import{o as u,c as p,a as e,w as l,u as o,h as t,g as a}from"./app.ffc675f3.js";const d=t('<h1 class="text-[var(--font-accent)]" id="building-and-uploading-the-firmware-manually" tabindex="-1">Building and uploading the firmware manually <a class="header-anchor" href="#building-and-uploading-the-firmware-manually" aria-hidden="true">#</a></h1><p>Uploading your firmware must initially be done over cable. Once you have the tracker connected to your WiFi after your first firmware update, you can opt to use <a href="#how-do-i-use-it">OTA</a> in the future.</p><h2 id="_1-connect-your-tracker-to-your-pc-via-the-programmer" tabindex="-1">1. Connect your tracker to your PC via the programmer <a class="header-anchor" href="#_1-connect-your-tracker-to-your-pc-via-the-programmer" aria-hidden="true">#</a></h2><p>First, connect your ESP32-Cam to your programmer. In the case of the ESP32-Cam-MB board, it&#39;s as simple as sticking it into the socket the way it came in the package and then connecting it to your PC with a micro-USB cable. In some cases, there is a button labeled <code>IOO</code> on the programmer. If that button exists make sure to hold it in while you plug the programmer into your pc, once plugged in you can release the button.</p><p>In the case of an FTDI programmer, the steps aren&#39;t as easy, so grab <a href="https://randomnerdtutorials.com/program-upload-code-esp32-cam/" target="_blank" rel="noreferrer">this guide</a> for how to set it up.</p><h2 id="_2-build-your-firmware" tabindex="-1">2. Build your firmware <a class="header-anchor" href="#_2-build-your-firmware" aria-hidden="true">#</a></h2><ol><li>Press the build button at the bottom of Visual Studio Code.</li></ol><blockquote><p>This builds the firmware, but does not send it to the ESP yet.</p></blockquote><p><img src="https://i.imgur.com/EmSkhFp.png" alt="img"></p><h2 id="_3-upload-your-firmware" tabindex="-1">3. Upload your firmware <a class="header-anchor" href="#_3-upload-your-firmware" aria-hidden="true">#</a></h2><ul><li><p>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 <a href="#how-do-i-use-it">OTA section below</a>.</p></li><li><p>Once the firmware has been built, press the upload button to upload the firmware.</p><p>This sends the firmware to the ESP. <img src="https://i.imgur.com/lI3PFVC.png" alt="img"></p></li></ul>',11),h=a("p",null," The MB board does the resetting for you. If you're using the FTDI programmer, follow the guide linked above (the one from randomnerdtutorials) ",-1),c=t(`<ul><li><p>If the upload is successful, you should get an output that looks like this:</p><p><img src="https://i.imgur.com/SDQcCr1.png" alt="img"></p></li></ul><p>Congratulations! You have now successfully uploaded the firmware to your EyeTrackVR Tracker!</p><p>If you have trouble with uploading your firmware over cable check the following:</p><ol><li>Make sure your USB cable from the tracker is plugged firmly into your PC.</li><li>Make sure that your USB cable is a data and charging cable (it is suggested you try other cables or devices with the cable).</li><li>Make sure that your drivers are up-to-date.</li><li>Some ports might not work, try other ones.</li></ol><p>Additionally, this can be caused by software hogging COM ports (<strong>VSCode and Cura can be the cause of this</strong>).</p><h2 id="uploading-via-ota" tabindex="-1">Uploading via OTA <a class="header-anchor" href="#uploading-via-ota" aria-hidden="true">#</a></h2><h3 id="what-is-it" tabindex="-1">What is it? <a class="header-anchor" href="#what-is-it" aria-hidden="true">#</a></h3><p>OTA stands for <code>Over The Air</code>, and it is a way to update your firmware without having to connect your device to your computer.</p><h3 id="how-do-i-use-it" tabindex="-1">How do I use it? <a class="header-anchor" href="#how-do-i-use-it" aria-hidden="true">#</a></h3><p>To use OTA, you need to have working firmware on your ESPs first.</p><p>Once you have mnually flashed the firmware at least once, you can use the <code>OTA</code> environment to upate your ESPs.</p><div class="tip custom-block"><p class="custom-block-title">Coming Soon</p><p>Currently, we only support OTA using <code>platformio</code> and <code>Visual Studio Code</code>. We are working on a new app, where you can upload your firmware to your ESPs over WiFi straight from the app.</p></div><p>To do this, you need to change your environment to the <code>OTA</code> version of your working environment.</p><p>For example, if you have a working <code>esp32AIThinker</code> environment, you would change your environment to <code>esp32AIThinker_OTA</code>.</p><p>Once you have changed your environment, you can upload your firmware to your ESPs using the upload button, as you would normally.</p><p>Once you have successfully connected your trackers to your WiFi, you can use OTA to handle all future firmware updates.</p><ol><li>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.</li><li>In the <code>ini/user_config.ini</code> file: <ul><li>Put IP or hostname of device into config file</li></ul></li></ol><div class="language-ini line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-palenight"><code><span class="line"><span style="color:#89DDFF;">[ota]</span></span>
<span class="line"><span style="color:#F07178;">enableota</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> 1</span></span>
<span class="line"><span style="color:#F07178;">otaserverip</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">openiristrackerL.local</span><span style="color:#89DDFF;">&quot;</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;"># here we use a custom mDNS name</span></span>
<span class="line"><span style="color:#F07178;">otapassword</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">12345678</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#F07178;">otaserverport</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> 3232</span></span>
<span class="line"></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><ol start="3"><li>Change to OTA env</li><li>Restart the ESPs, they <strong><em>must</em></strong> be power cycled</li><li>Press the upload button to upload the firmware.<br><br><img src="https://i.imgur.com/lI3PFVC.png" alt="img"></li><li>Do not touch esps or move them during OTA upload</li><li>Wait around 1 minute.</li><li>Repeat for as many trackers as you need.</li></ol><h2 id="finding-the-ip-address-of-your-tracker" tabindex="-1">Finding the IP address of your tracker <a class="header-anchor" href="#finding-the-ip-address-of-your-tracker" aria-hidden="true">#</a></h2><p>Connect your tracker to your PC and then open a serial monitor in VSC by pressing the <code>plug</code> icon.</p>`,21),m=a("p",null,"Now, press the restart button on the esp itself. watch the monitor for output like this:",-1),g=t('<p>The text, highlighted in green for demonstration, is the stream address of the camera. Take note of this for input into the software.</p><p>Keep in mind while testing and getting set up, the ESP can only have one client, to use the camera in the app, make sure you close the browser tab you tested it in.</p><h1 id="updating-the-firmware-to-the-newest-version" tabindex="-1">Updating the firmware to the newest version <a class="header-anchor" href="#updating-the-firmware-to-the-newest-version" aria-hidden="true">#</a></h1><p>To update the firmware you&#39;ll need to follow a couple of steps.</p><ol><li><p>Open a terminal and enter the directory you&#39;ve cloned OpenIris into, for example <code>cd D:/OpenIris/</code></p></li><li><p>Save your current changes to the config using <code>git stash</code></p></li><li><p>Download the newest changes from the repo using <code>git pull</code></p></li><li><p>Apply your saved changes so that you don&#39;t have to retype your WI-FI credentials using <code>git stash apply</code></p></li></ol>',5),y=a("p",null," Skip this step if the update message denotes that the config had changed. If it does so, retype your credentials in the updated files. ",-1),f=t('<p>4.1. If anything went wrong, you can reset everything to the default state using <code>git reset --hard</code> and then retyping your credentials</p><ol start="5"><li>Upload your firmware <a href="./update_platformio">following steps from the uploading section</a></li></ol><h2 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-hidden="true">#</a></h2><p>If you encountered an issue while following these steps check the <a href="./../misc/faq">FAQ.</a></p><p>If you don&#39;t find an answer to your question there ask in <strong>#questions</strong> channel in <a href="https://discord.gg/kkXYbVykZX" target="_blank" rel="noreferrer">the discord</a>, we will be happy to help.</p><p><em>Adapted from the SlimeVR docs, Some Credit goes to the SlimeVR team <a href="https://docs.slimevr.dev/firmware/setup-and-install.html" target="_blank" rel="noreferrer">here</a></em></p>',6),A=JSON.parse('{"title":"Building and uploading the firmware manually","description":"","frontmatter":{},"headers":[{"level":2,"title":"1. Connect your tracker to your PC via the programmer","slug":"_1-connect-your-tracker-to-your-pc-via-the-programmer","link":"#_1-connect-your-tracker-to-your-pc-via-the-programmer","children":[]},{"level":2,"title":"2. Build your firmware","slug":"_2-build-your-firmware","link":"#_2-build-your-firmware","children":[]},{"level":2,"title":"3. Upload your firmware","slug":"_3-upload-your-firmware","link":"#_3-upload-your-firmware","children":[]},{"level":2,"title":"Uploading via OTA","slug":"uploading-via-ota","link":"#uploading-via-ota","children":[{"level":3,"title":"What is it?","slug":"what-is-it","link":"#what-is-it","children":[]},{"level":3,"title":"How do I use it?","slug":"how-do-i-use-it","link":"#how-do-i-use-it","children":[]}]},{"level":2,"title":"Finding the IP address of your tracker","slug":"finding-the-ip-address-of-your-tracker","link":"#finding-the-ip-address-of-your-tracker","children":[]},{"level":2,"title":"Troubleshooting","slug":"troubleshooting","link":"#troubleshooting","children":[]}],"relativePath":"firmware_guide/upload_and_update_firmware.md","lastUpdated":1678402493000}'),_={name:"firmware_guide/upload_and_update_firmware.md"},D=Object.assign(_,{setup(w){return(b,k)=>(u(),p("div",null,[d,e(r,{options:o(i).upload_firmware_one},{content:l(()=>[h]),_:1},8,["options"]),c,e(n,{options:o(s).upload_firmware_image_one},null,8,["options"]),m,e(n,{options:o(s).upload_firmware_image_two},null,8,["options"]),g,e(r,{options:o(i).user_warning},{content:l(()=>[y]),_:1},8,["options"]),f]))}});export{A as __pageData,D as default};