Mesh Fleet Flashing Guide 🛠️
- Connect your ESP32 to your computer via USB.
- Close any programs using the serial port (e.g., Arduino IDE, PuTTY, etc.).
- If using the Local Kit, double-click
RUNME.bat. Running as administrator is recommended if you encounter errors (especially with 'Thorough Mode'), but often not required.
Modes of Flashing
There are two primary ways to flash your mesh fleet, determined by your security requirements. The Secure Mode using the Local Kit is highly recommended for any production deployment.
-
Option 1: Secure Mode (Recommended)
This is the most secure option. It requires you to download the Local Flasher Kit and compile the firmware on your computer, which generates a unique, random Pre-Shared Key (PSK) that never leaves your machine. This key will be used by all nodes in your fleet.
-
Option 2: Compatibility Mode (Quick Web Flash)
This is the fastest option and uses the web flasher at flash.html. It flashes the unmodified firmware which uses a publicly known default factory PSK. Only use this for testing or in situations where security is not a concern, as it allows an adversary to easily extract or intercept traffic.
Detailed Instructions: Option 1 (Secure Local Flashing Kit)
This method uses the RUNME.bat bootstrapper you downloaded in the mesh.zip kit.
Part A: Compile the Secure Firmware (One Time)
The compilation process prepares the environment, patches the source code, and generates the necessary binary files.
- Extract the
mesh.zipkit to a local folder (e.g.,C:\mesh-flasher). - Double-click the
RUNME.batfile to start the menu. If you encounter permission errors during compilation, restart the script by right-clicking it and selecting "Run as administrator". (This is often only needed for 'Thorough Mode'). - At the main menu, enter 1 to select the Compile option.
- Security Mode Selection:
- Enter 1 (or let the timer expire) for Secure Mode. This generates a unique, random PSK for maximum security (Recommended).
- (Optional: Enter 2 for Compatibility Mode if you need the default PSK).
- Build Mode Selection:
- Enter 2 for Thorough Mode on the first run to ensure all tools are correctly installed.
- Enter 1 for Quick Mode on subsequent runs.
- Wait for the compilation to complete. It will generate three binary files (Application, Bootloader, Partition Table) in the
outputfolder, grouped by a timestamp and the security mode (e.g.,..._secure.bin).
Part B: Flash the Firmware to Your Devices (For Each Node)
Once you have your secure firmware files in the output folder, you can flash your fleet.
- After compilation finishes, you will be returned to the
RUNME.batmain menu. - Enter 2 to select the Flash option.
- Select your COM Port from the list by entering its corresponding number.
- Select the Firmware Group (the most recent one you just compiled is the default).
- Crucial: Manually Enter Boot Mode: The script will wait for you to put the device into flashing mode.
- Hold the BOOT (or FLASH) button.
- While holding BOOT, momentarily press and release the RESET (or EN) button.
- Release the BOOT button.
- Press any key in the terminal to start the flash.
- After the flash completes, press the RESET button on the ESP32 to start the new firmware.
- Repeat steps 7-13 for every node in your mesh fleet using the same compiled firmware files.
Detailed Instructions: Option 2 (Compatibility Web Flasher)
This method uses your browser and the web flasher tool at flash.html.
- Go to the Protest Node Flash Tool page in a modern browser (Chrome is recommended).
- Ensure your ESP32 is connected via USB and serial programs are closed.
- On the page, select the Compatibility Mode radio button.
- Click the ⚡ Flash Firmware button that appears.
- A popup will ask you to select the USB Port. Choose your ESP32's port.
- If the flashing fails to connect or times out, you may need to Manually Enter Boot Mode (see step 11 above). The web page console output will guide you.
- Wait for the process to complete and show a Flash Complete message.
- Press the RESET button on the ESP32 to start the new firmware.
- If you need to flash another device, unplug/replug the new device, and refresh the web page before clicking the Flash Firmware button again.