import{_ as s,a as l}from"./chunks/index.e989031f.js";import{_ as a,i as r}from"./chunks/index.150e11f2.js";import{o as d,c as u,a as o,w as p,u as t,h as n,g as e,b as i}from"./app.106a9488.js";const h=n('
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 OTA in the future.
First, connect your ESP32-Cam to your programmer. In the case of the ESP32-Cam-MB board, it'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 IOO 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.
In the case of an FTDI programmer, the steps aren't as easy, so grab this guide for how to set it up.
This builds the firmware, but does not send it to the ESP yet.

If you are using the OTA method, skip to the OTA section below.
Once the firmware has been built, press the upload button to upload the firmware.
This sends the firmware to the ESP. 
If the upload is successful, you should get an output that looks like this:

Congratulations! You have now successfully uploaded the firmware to your EyeTrackVR Tracker!
If you have trouble with uploading your firmware over cable check the following:
Additionally, this can be caused by software hogging COM ports (VSCode and Cura can be the cause of this).
OTA stands for Over The Air, and it is a way to update your firmware without having to connect your device to your computer.
To use OTA, you need to have working firmware on your ESPs first. Follow the manual building guide
Once you have manually flashed the firmware at least once, you can use the OTA environment to upate your ESPs.
Coming Soon
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.
Since version 1.1.0 we've switched from using OTA via platformio to a more user-friendly approach.
',14),f=e("p",null," 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. ",-1),_=e("ol",null,[e("li",null,[i("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 "),e("code",null,"_OTA"),i(" suffix. Next, press the checkmark button to build it without uploading.")])],-1),g=n('Turn on your trackers and wait for them to connect to Wi-Fi
Locate their ip or mDNS name. For mDNS, the default is: http://openiristracker.local/
Having done that, open http://<your-up-or-mdns-name>:81/update in your browser
for example: http://openiristracker.local/
This should open a page similar to this:
',3),y=e("p",null,[i("Click on the select file button, and navigate to where you cloned the project and then to the "),e("code",null,"ESP/"),i(" directory.")],-1),w=e("p",null,[i("Once there, open "),e("code",null,".pio\\build\\your-environment"),i(" like so:")],-1),b=e("blockquote",null,[e("p",null,[i("By default, windows treats files and directories with a dot in front of their name as hidden. To change that - "),e("a",{href:"https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5",target:"_blank",rel:"noreferrer"},"see here")])],-1),v=e("p",null,[i("You'll find a couple files in there, select the one named "),e("code",null,"your-environment-vVersion-feature"),i(".")],-1),k=e("p",null,"like this one:",-1),T=e("ol",{start:"5"},[e("li",null,"Press upload and wait for it to finish. Done!")],-1),C=n(`ini/user_config.ini file: Like so:
[ota]
enableota = 1
otaserverip = "openiristrackerL.local" # here we use a custom mDNS name
otapassword = "12345678"
otaserverport = 3232
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.
`,8),A=e("p",null,"This will open a list of all available environments, select the one that matches your board and has a _OTA suffix",-1),S=n('
Connect your tracker to your PC and then open a serial monitor in VSC by pressing the plug icon.
The text, highlighted in green for demonstration, is the stream address of the camera. Take note of this for input into the software.
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.
To update the firmware you'll need to follow a couple of steps.
Open a terminal and enter the directory you've cloned OpenIris into, for example cd C:/OpenIris/
Save your current changes to the config using git stash
Download the newest changes from the repo using git pull
Apply your saved changes so that you don't have to retype your WI-FI credentials using git stash apply
4.1. If anything went wrong, you can reset everything to the default state using git reset --hard and then retyping your credentials
If you encountered an issue while following these steps check the FAQ.
If you don't find an answer to your question there ask in #questions channel in the discord, we will be happy to help.
Adapted from the SlimeVR docs, Some Credit goes to the SlimeVR team here
',6),U=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":1681507539000}'),O={name:"firmware_guide/upload_and_update_firmware.md"},q=Object.assign(O,{setup(V){return(x,E)=>(d(),u("div",null,[h,o(s,{options:t(l).upload_firmware_one},{content:p(()=>[c]),_:1},8,["options"]),m,o(s,{options:t(l).upload_firmware_one},{content:p(()=>[f]),_:1},8,["options"]),_,o(a,{options:t(r).upload_firmware_build_button},null,8,["options"]),g,o(a,{options:t(r).upload_firmware_webpage},null,8,["options"]),y,w,b,o(a,{options:t(r).upload_firmware_webpage_directory},null,8,["options"]),v,k,o(a,{options:t(r).upload_firmware_webpage_directory_file},null,8,["options"]),T,o(a,{options:t(r).upload_firmware_webpage_upload_finished},null,8,["options"]),C,o(a,{options:t(r).upload_firmware_select_env},null,8,["options"]),A,o(a,{options:t(r).upload_firmware_select_env_dropdown},null,8,["options"]),S,o(a,{options:t(r).upload_firmware_image_one},null,8,["options"]),D,o(a,{options:t(r).upload_firmware_image_two},null,8,["options"]),I,o(s,{options:t(l).user_warning},{content:p(()=>[P]),_:1},8,["options"]),F]))}});export{U as __pageData,q as default};