Meshtastic Guide - How to Flash Meshtastic Firmware

⚡ Flashing ESP32 Devices with Meshtastic Firmware

🔧 Flashing ESP32 devices with Meshtastic firmware can be done using several methods. The most recommended method is the 🌐 Web Flasher, which works with Chrome or Edge browsers. It is 👌 user-friendly and ideal for beginners who want to quickly flash their ESP32 boards. The 💻 CLI Script is a manual method for flashing firmware and is better suited for advanced users familiar with command-line tools. If both the Web Flasher and CLI Script fail, using an 🔌 external serial adapter is an option, but it should only be attempted as a last resort ⚠️ due to its complexity.

📡 Before powering on your ESP32-based Meshtastic radio, always attach the antenna. Operating without an antenna can damage the radio chip. To update the Meshtastic web client at meshtastic.local, a full wipe and reinstall of the device is required. This ensures you get the latest bundled web interface. If you want to keep your settings, 💾 export your configuration before reinstalling and import it afterward.

⚙️ Flashing ESP32 firmware is a key step in setting up your Meshtastic device. Whether you use the 🌐 Web Flasher, 💻 CLI Script, or 🔌 serial adapter, make sure to follow safety precautions and choose the method that best fits your experience level.

🚀 Flash Device

  1. 🔗 Plug in your device
  2. 🌍 Visit flasher.meshtastic.org *requires Chrome or Edge browser
  3. 📖 Follow the instructions

🔧 Connect and Set Up Device

✅ Once you have flashed the Meshtastic firmware onto the device, you can move on to the initial configuration.

💻 Flashing Firmware via CLI

🔍 Connectivity Verification

📡 Before flashing your ESP32 device, verify connectivity with the device you are about to flash. Follow the steps outlined below to check device connection and, if needed, install the appropriate USB drivers for your ESP32 board. If you must install drivers, remember to 🔄 reboot your computer afterward to confirm that the driver installation is complete.

⚠️ NOTE: The T-Beam 0.7 board is an earlier version of the T-Beam ESP32 board. Due to design changes in subsequent iterations, this board requires a specific firmware file that is different from those used by other T-Beam board versions. Make sure to select the correct firmware when flashing your ESP32 T-Beam 0.7 to ensure proper functionality.

  • 📂 Use firmware-tbeam0.7-X.X.X.xxxxxxx.bin for the T-Beam 0.7.
  • firmware-tbeam-X.X.X.xxxxxxx.bin is incompatible.
📖 For all other T-Beam boards, please review the resources section to select the correct firmware.

📜 Command Line Interface Instructions

🛠 Install Prerequisite Software
🐧 Linux
🔎 Verify whether you have python3 and pip installed by using the following command

🐍 python3 --version

📦 pip3 --version

⚙️ If python3 is not installed, you can install it using

🔄 sudo apt-get update

⬇️ sudo apt-get install python3

⚙️ If pip is not installed, you can install it using
⬇️ sudo apt-get install python3-pip
⚙️ Install esptool
⬇️ pip3 install --upgrade esptool
🍏 MacOS
💻 OS X comes with Python2.7 pre-installed, but it does not include pip. The following instructions use 🍺 Homebrew to install Python3, which includes pip3. On macOS, you will use pip3 instead of pip.
ℹ️ NOTE: Check if you have Homebrew installed with the following command. If it's not installed, follow the instructions on the Homebrew website before continuing.
🔎 brew -v
🔎 Verify whether you have python3 and pip installed by using the following command

🐍 python3 --version

📦 pip3 --version

⚙️ If python3 is not installed, you can install it by using the command
⬇️ brew install python3
✅ Verify that pip3 was installed along with python3
📦 pip3 -v
⚙️ Install esptool
⬇️ pip3 install --upgrade esptool
🪟 Windows
  • ⬇️ Download and install Python. During the installation process, ensure you select the option to Add Python X.Y to PATH.
  • ⬇️ Download and install Git Bash (or another suitable shell), and execute all subsequent commands from that shell.
🔎 Verify whether you have python3 and pip installed by using the following command

🐍 py --version

📦 pip --version

⚙️ Install esptool
⬇️ pip3 install --upgrade esptool
🔗 Check Connectivity with the Chip
  • 🐧 On Linux and macOS, you may need to explicitly declare esptool as a .py script. Use the command esptool.py chip_id to do this, depending on your environment.
  • 🪟 On Windows, you must explicitly declare esptool as a .py script by using the command esptool.py chip_id to ensure proper functionality.
🔌 Connect the radio to your computer with a data USB cable. Use the following command to verify that your device is communicating with your computer:
💻 Command
📝 esptool chip_id
📤 Expected Output

✅ # You should see a result similar to this:

💻 mydir$ esptool chip_id

🔧 esptool.py v2.6

🔍 Found 2 serial ports

🔌 Serial port /dev/ttyUSB0

⏳ Connecting....

🔎 Detecting chip type... ESP32

📡 Chip is ESP32D0WDQ6 (revision 1)

✨ Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

🔑 MAC: 24:6f:28:b5:36:71

⬆️ Uploading stub...

▶️ Running stub...

✅ Stub running...

⚠️ Warning: ESP32 has no Chip ID. Reading

🔑 MAC instead. MAC: 24:6f:28:b5:36:71

🔄 Hard resetting via RTS pin...

⬇️ Download Firmware
  • 🌐 Navigate to the Meshtastic Downloads Page to obtain the latest firmware.
  • 📂 Scroll down to the Firmware section and choose one of the following options based on your preferences:
  1. Download Stable: For stable, well-tested releases.
  1. 🧪 Download Alpha: For newer, experimental releases that include the latest features.
  • 📄 Once you are redirected to the GitHub release page, scroll down to the Assets section and expand it.
  • 🔎 Identify the appropriate firmware for your device according to its architecture (e.g., firmware-esp32s3 for ESP32-S3-based devices like the Heltec V3).
  • 💾 Download the file and make a note of its location on your system, which is typically in your ~/Downloads folder.
📂 Access the Firmware Directory
💻 Open a terminal and change to the directory where your firmware was downloaded (using the cd command). The folder name usually corresponds to the architecture and firmware version indicated in the zip file. For example:
📂 cd ~/Downloads/firmware-esp32s3-X.X.X.xxxxxxx/
⚠️ NOTE: Ensure that you replace esp32s3 and the version number with the values that correspond to the file you downloaded.
⚡ Install or Update Firmware
🛠 Now, follow the instructions below for your operating system to install or update the firmware for your specific board:
📌 Please note before you begin:

⚠️ Be extremely careful to install the correct firmware file for your ESP32 board. Specifically, the widely used T-BEAM radio from TTGO is not referred to as TTGO-Lora, which is a different ESP32 board. Therefore, do not flash the TTGO-Lora firmware build onto a T-BEAM, as it will not function properly and may cause issues with your ESP32 device.

❌ If you install the wrong firmware for your ESP32 board, the flashing process may appear to complete successfully, but the device may become unresponsive, showing a blank screen if it has one. Always ensure you flash the correct firmware version for your specific ESP32 hardware.

⚡ Please note that while these ESP32-based devices are generally robust and damage is not guaranteed, there is a risk of harm to the onboard radio module and peripherals if the GPIO pin directions are incorrectly configured during firmware flashing. Proper firmware selection is critical to maintaining the functionality and safety of your ESP32 Meshtastic device.

🐧 Linux & 🍏 macOS
⬇️ Install
💻 ./device-install.sh -f firmware-BOARD-VERSION.bin
⬇️ Download Firmware
  • 🌐 Navigate to the Meshtastic Downloads Page to obtain the latest firmware.
  • 📂 Scroll down to the Firmware section and choose one of the following options:
  1. Download Stable: For stable, well-tested releases.
  2. 🧪 Download Alpha: For experimental releases with latest features.
  • 📄 On the GitHub release page, scroll down to Assets and expand it.
  • 🔎 Identify the correct firmware for your device (e.g. firmware-esp32s3 for ESP32-S3 boards).
  • 💾 Download the file and note its location (usually ~/Downloads).
📂 Access the Firmware Directory
💻 Open a terminal and change to the directory where your firmware was downloaded:
📂 cd ~/Downloads/firmware-esp32s3-X.X.X.xxxxxxx/
⚠️ NOTE: Replace esp32s3 and version with your actual file.
⚡ Install or Update Firmware
🛠 Follow the instructions below for your OS:
📌 Important:

⚠️ Always install the correct firmware for your ESP32 board. Do not confuse T-BEAM with TTGO-Lora.

❌ Wrong firmware may flash but leave the device unresponsive (blank screen).

⚡ Incorrect GPIO configs during flashing may harm the radio module. Choose carefully.

🐧 Linux & 🍏 macOS
⬇️ Install
💻 ./device-install.sh -f firmware-BOARD-VERSION.bin
🔄 Update
💻 ./device-update.sh -f firmware-BOARD-VERSION-update.bin
🌐 Use --web to include the embedded Web Client.
🪟 Windows
⬇️ Install
💻 esptool.exe --chip esp32 write_flash -z 0x1000 firmware-BOARD-VERSION.bin
🔄 Update
💻 esptool.exe --chip esp32 write_flash -z 0x1000 firmware-BOARD-VERSION-update.bin
💻 device-install.bat -f firmware-BOARD-VERSION.bin
🔄 Update
💻 device-update.bat -f firmware-BOARD-VERSION-update.bin
🌐 Use the --web option to incorporate the embedded Web Client when installing the firmware.

🔌 Connect and Set Up Device

✅ Once you have successfully flashed the Meshtastic firmware onto the device, you can move forward with the initial configuration.

🔧 Flashing with an External Serial Adapter

ℹ️ NOTE: This information will likely only be helpful if you've already attempted to go through the prerequisites and processes outlined in manually flashing

⚙️ Flashing Process

📌 Situations that May Necessitate the Use of an External USB to Serial Adapter:
  • ⚠️ Due to the ongoing chip shortage, recently acquired devices like the TTGO T-Beam may be equipped with legacy or non-standard USB to Serial adapter chips, which can be unreliable in certain situations.
  • ❌ Some devices may feature defective USB to Serial chips, leading to communication issues.
  • 🔗 Specific devices, such as the Hydra (Meshtastic-DIY target)
🔌 USB Serial Adapters

🛠 There are numerous ESP32 adapter options available in the marketplace, but it is advisable to choose an adapter that uses the Silicon Labs CP2102 chip, known for its reliability and status as an industry standard for ESP32 flashing. The CP2102-based adapter ensures stable USB-to-serial communication, which is essential for successful firmware flashing.

🔌 Begin by plugging the CP2102 adapter into your computer without connecting any ESP32 devices at this point. Make sure that the necessary USB drivers for the adapter are installed on your computer. For Windows users, the correct CP2102 drivers should typically install automatically, enabling smooth ESP32 device detection and reliable firmware upload.

Connecting Adapter to the Device
ℹ️ NOTE: There are several methods to connect the adapter pins to the target device, including pressing jumpers against contacts or using pogo pin jigs. This tutorial highlights the use of offset Dupont headers soldered onto the relevant GPIO pins and connected with jumpers.
⚠️ Disconnect your USB to Serial Adapter from the computer before starting this process.
  1. 🔄 Connect the RX pin of the adapter to the TX pin of the device.
  2. 🔄 Connect the TX pin of the adapter to the RX pin of the device.
  3. ⚡ Connect a GND pin of the adapter to the GND pin of the device.
  4. 🔋 Connect either the 5V pin of the adapter to the 5V pin of the device (as illustrated) or the 3.3V pin of the adapter to the 3.3V pin of the device.
  5. 🟢 Bridge GPIO 0 to GND on the device with a jumper. (This will put the device into flash mode when powered up.) Example wiring featuring a T-Beam.
  1. 🔌 Connect the device to a USB port on the computer.
  2. ❎ Remove the jumper bridging GPIO 0 to GND.
💾 Flashing the Device
After completing the steps above, your device should be in flash mode. You can now use the manual method to flash your device.
🔄 Once the flashing process is finished, reset your device (using the RST button if it's available). If you have the Meshtastic Python CLI installed, you can run meshtastic --noproto to reconnect to the device via the adapter and view the serial output to ensure that Meshtastic was installed correctly.
🛠 Troubleshooting the Flashing Process
⚠️ You may encounter a COM port permission error while running the manual device installation scripts, which can be caused by various issues.
💡 To resolve this, you might need to run the process as an administrator, ensure that no other software, such as Cura, is monopolizing the COM ports, or try rebooting your system.

🔌 Connect and Set Up Device

✅ Once you have flashed the Meshtastic firmware onto the device, you can move on to the initial configuration.

📡 Flashing nRF52 & RP2040 Devices

  • ⚡ Firmware Upgrade Process for nRF52 and RP2040 Devices: Devices based on nRF52 and RP2040 architectures offer a straightforward firmware upgrade process that does not require any driver or software installation on any platform.
  • 📂 Drag & Drop: These devices utilize the Drag & Drop installation method for installing firmware releases. Simply drag the firmware file onto the device in your file explorer.
  • 📶 Over-The-Air (OTA) Updates: nRF52 devices can receive OTA firmware updates from a mobile device via Bluetooth, allowing for seamless updates without the need for physical connections.
  • 🧹 Factory Erase: Before installing new firmware, you may consider performing a Factory Erase to clear any existing data that may change format or location between releases.

🔄 Converting RAK4631-R to RAK4631: If your device does not come with the Arduino bootloader, you will need to perform a conversion to ensure compatibility.

  • 🛠 Using Raspberry Pi as a SWDIO Flash Tool: If your device cannot be flashed via USB or Bluetooth, an alternative option is to use a direct SWDIO connection with a Raspberry Pi as a flashing tool.

📂 Drag-and-Drop Firmware Updates for nRF52 & RP2040

💻 Flash Device

  • 🌐 You can now utilize the Meshtastic Web Flasher to download and transfer firmware to your nRF52 or RP2040-based devices. Alternatively, you can follow the instructions below to download and install the firmware.
  • 🧹 If you have recently completed a Factory Erase, your device might automatically start up in bootloader mode. You can then proceed directly to "Copy the appropriate firmware..." for your specific device below:
🔵 nRF52
  1. ⬇️ Download and unzip the latest firmware from the Meshtastic Downloads.
  2. 🔌 Connect your device to your computer using a USB data cable.
  3. 🔁 Press the reset button on your device twice (this will enter bootloader mode).
  4. 💻 A new drive will be mounted on your computer (compatible with Windows, Mac, Linux, or Android).
  5. 📂 Open this drive, where you should find three files: CURRENT.UF2, INDEX.HTM, and INFO_UF2.TXT.
  6. 📥 Copy the appropriate firmware file (firmware-DEVICE_NAME-X.X.X-xxxxxxx.uf2) from the release folder to this drive.
  7. ✅ After the file finishes copying, the device will reboot and install the Meshtastic firmware.
🟣 RP2040
  1. ⬇️ Download and unzip the latest firmware from the Meshtastic Downloads.
  2. 🔘 Press and hold the BOOTSEL button, then connect the device to your computer using a USB cable.
  3. 💻 A new drive will be mounted on your computer (compatible with Windows, Mac, Linux, or Android).
  4. 📂 Open this drive, where you should find two files: INDEX.HTM and INFO_UF2.TXT.
  5. 📥 Copy the appropriate firmware file (firmware-DEVICE_NAME-X.X.X-xxxxxxx.uf2) from the release folder to this drive.
  6. ✅ After the file has finished copying, the device will reboot and install the Meshtastic firmware.
⚠️ Possible Flashing Edge Cases
  1. 🔎 Before flashing, ensure that you have the RAK4631 and not the RAK4631-R. If not, you will need to change the bootloader. Instructions can be found here.
  2. ⚠️ Older versions of the firmware may retain outdated data, leading to crash loops. If you encounter problems upgrading, perform a factory erase before flashing.

🔌 Connect and Set Up Device

✅ Once you have flashed the Meshtastic firmware onto the device, you can move on to the initial configuration.

📡 Over-the-Air (OTA) Firmware Updates for nRF52

📶 nRF52 devices from RAK can accept OTA firmware updates via Bluetooth. ⚠️ Older T-Echo bootloaders do not support OTA.
⚠️ Caution: OTA updates carry a higher risk of failure. If unsuccessful, your device may become non-functional and require physical recovery.

🤖 Android

⚠️ The latest nRF DFU app (v2.3.0) is incompatible. Use nRF Connect App v4.24.3 from Nordic GitHub.
  1. ⬇️ Download firmware from Meshtastic Downloads or GitHub.
  2. 📂 Unzip the firmware folder.
  3. 📱 Open nRF Connect App → SCANNER tab → CONNECT device.
  4. 🔗 If shows DISCONNECT, continue; if CONNECT, tap it.
  5. ⚙️ Tap DFU icon (top right).
  6. 📦 Select "Distribution Packet (ZIP)" → OK.
  7. 📥 Choose firmware file ending with -ota.zip.
  8. ⏳ Update starts automatically (may be slow).
  9. ✅ Device reboots after update.

🍎 Apple

📲 OTA updates available via nRF Device Firmware Update App on iOS/iPadOS.
  1. ⬇️ Download firmware from Meshtastic Downloads, GitHub, or directly via the app.
  2. 📂 Unzip the firmware folder.
  3. 📱 Open the nRF DFU App and select the correct device firmware file (ending with -ota.zip).
  4. 🔗 Connect to your device.
  5. ⬆️ Upload the firmware.
⚠️ Important Note: The iPhone's auto-lock feature may interrupt the Bluetooth firmware upload. To prevent this, periodically tap the screen or temporarily set the auto-lock to "Never" during the upload process to ensure that the phone stays awake and the upload completes without interruptions.
❌ If the update fails, you may improve success by adjusting the packet settings:
  1. ⚙️ Go to settings and enable "Packets Receipt Notification".
  2. 🔽 Change "Number of Packets" to a lower value; some users have found success with "5".

🧹 Factory Reset for nRF52/RP2040 Devices

  • 💾 Meshtastic uses the littlefs library to store configuration, logs, and other data in the internal flash memory of nRF52 and RP2040 devices. Updating firmware does not erase this data, which can cause issues if formats change between releases.
  • 🌐 You can use the Meshtastic Web Flasher to factory erase your devices. Select your board and click the 🗑️ icon to erase. Alternatively, follow the instructions below.

🔵 nRF52

To reset flash storage on your nRF52 board:
  1. ⬇️ Download and unzip the latest firmware from the Meshtastic Downloads page.
  2. 🔌 Connect your device via USB.
  3. 🔁 Double-click the reset button to enter bootloader mode.
  4. 💻 A new drive mounts (Windows/Mac/Linux).
  5. 📂 Drive contains: CURRENT.UF2, INDEX.HTM, INFO_UF2.TXT.
  6. 📝 Open INFO_UF2.TXT and note the SoftDevice value.
  7. 📥 Copy the correct factory erase UF2 file (Meshtastic_nRF52_factory_erase...) to the drive. Device reboots.
  8. 💻 Run meshtastic --noproto in terminal.
  9. ✅ You should see: Formatting... Done.
Once erased, install the latest firmware on a clean filesystem.

🟣 RP2040

To reset flash storage on your RP2040 board:
  1. ⬇️ Download flash_nuke.uf2.
  2. 🔘 Hold BOOTSEL and connect via USB.
  3. 💻 Board mounts as RPI-RP2.
  4. 📥 Copy flash_nuke.uf2 to the drive.
  5. ✅ Board restarts and flash memory is erased.
After erasing, install the latest firmware on a clean filesystem.

🔄 Converting RAK4631-R to RAK4631

ℹ️ The only difference between RAK4631-R (RUI3) and RAK4631 (Arduino) is the bootloader; hardware is identical.
📌 Meshtastic requires the Arduino bootloader. Conversion is a one-time process.
Here are two methods to flash the bootloader:

💻 USB Device Firmware Update (DFU)

  1. ⬇️ Install Python.
  2. ⬇️ Install adafruit-nrfutil.
📦 pip3 install adafruit-nrfutil
  • 🧹 You can now use the Meshtastic Web Flasher to factory erase your nRF52 or RP2040-based devices. Visit the flasher, select your board, and click the 🗑️ trash can icon to the right of the Flash button. This will open a dialog to initiate the erase procedure. Alternatively, you can follow the instructions below.

🔵 nRF52

To reset the flash storage on your nRF52 board, follow these steps:
  1. ⬇️ Download and unzip the latest firmware from the Meshtastic Downloads page.
  2. 🔌 Connect your device to your computer using a USB data cable.
  3. 🔁 Double-click the reset button on your device to enter bootloader mode.
  4. 💻 A new drive will be mounted on your computer (Windows, Mac, or Linux).
  5. 📂 Open this drive, and you should see three files: CURRENT.UF2, INDEX.HTM, and INFO_UF2.TXT.
  6. 📝 Open the INFO_UF2.TXT file in a text editor and note the SoftDevice value.
  7. 📥 Locate the file in the downloaded firmware that matches your SoftDevice version (7.x.x or 6.x.x). Use either Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2 or Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2, and copy it onto the drive. The device will reboot.
  8. 💻 With the Meshtastic CLI installed, open Terminal/Console and enter: meshtastic --noproto.
  9. ✅ You should see the message: Formatting... Done.
Once erased, you can install the latest Meshtastic firmware on a clean filesystem by clicking the link below.

🟣 RP2040

To reset the flash storage on your RP2040 board, follow these steps:
  1. ⬇️ Download the flash_nuke.uf2 file to your computer.
  2. 🔘 Press and hold the BOOTSEL button, then connect the board to your computer using a USB cable.
  3. 💻 The board should now appear as a mass storage device on your computer, labeled as RPI-RP2.
  4. 📥 Copy the flash_nuke.uf2 file to this device.
  5. ✅ The board will automatically restart, and the flash memory will be erased.
After erasing, you can install the latest Meshtastic firmware on a clean filesystem by clicking the link below.

🔄 Converting RAK4631-R to RAK4631

ℹ️ The only distinction between the RAK4631-R (RUI3) and the RAK4631 (Arduino) lies in the bootloader; the hardware is identical.
📌 Meshtastic requires the Arduino bootloader for RAK WisBlock nRF52-based boards. This conversion process only needs to be done once.
Here are two methods to flash the bootloader:

💻 USB Device Firmware Update (DFU)

  1. ⬇️ Install Python
  2. ⬇️ Install adafruit-nrfutil
📦 pip3 install adafruit-nrfutil

 

👉 You must complete the first part of the instructions for converting the RAK4631-R to the RAK4631, specifically the section involving the AT+BOOT command.

🛠 Debugger

🔧 This conversion necessitates the use of either a DAPLink or J-Link. The most affordable and readily available option is the RAKDAP1.
  1. ⬇️ Install Python
  2. ⬇️ Install pyOCD
📦 pip3 install pyocd
  1. ⬇️ Download the necessary bootloader: WisCore_RAK4631_Board_Bootloader.hex
  2. 🔗 Connect the RAKDAP as instructed below:
  1. ⚡ Flash the bootloader
💻 pyocd flash -t nrf52840 .\WisCore_RAK4631_Board_Bootloader.hex
  1. ➡️ Proceed with the standard flashing instructions.
📖 Alternative flashing methods are detailed here.

🔄 Updating or Recovering the Bootloader on nRF52 Devices

⚠️ If you're encountering difficulties while updating or flashing newer versions of the Meshtastic firmware, and your nRF52 device isn’t operating on the latest bootloader version, updating the bootloader could help resolve these issues.
🔎 To verify the version of the bootloader currently on your device, enable DFU mode. Next, open the mounted drive that appears on your computer and check the INFO_UF2.TXT file.
📌 Here are the steps to update your bootloader.

✅ Method 1: Updating with the UF2 File (Recommended)

📦 Depending on your device, you need to choose the appropriate bootloader package. Below are the links to the bootloader packages:
  1. ⬇️ Download the correct UF2 Bootloader file.
  2. 🔌 Connect your device to your computer using a USB cable.
  3. 🔁 Activate bootloader mode by quickly double-pressing the RESET button. For the Seeed Tracker 1000-E, press and hold the user button, then quickly connect the USB cable to the MagSafe port twice. The device should show up as a removable drive.
  4. 📂 Drag and drop the UF2 file you downloaded into the removable drive. The device will automatically update the bootloader and reset.
  5. ✅ Once the device resets, the update is complete. Your device is now on the latest bootloader version, and you can proceed with flashing the firmware.

⚠️ Method 2: Using adafruit-nrfutil

⚠️ Caution: Unlike UF2 uploads, adafruit-nrfutil does not verify whether you have the correct bootloader package for your device. Flashing the wrong bootloader could potentially brick your device. Always check the SHA256 checksum before proceeding.
📌 These instructions assume that Python and pip are already installed. If not, download and install the latest version of Python (with pip) from Python.org.
📦 Based on your device, choose the appropriate bootloader package. Below are the links:
  1. 💻 Open a terminal or command prompt and install adafruit-nrfutil by running the following command:
🐚 bash
📦 pip install adafruit-nrfutil
  1. ⬇️ Obtain the correct ZIP package.
  2. 🔌 Connect your device to your computer using a USB cable.
  3. 💻 In the terminal or command prompt, navigate to the directory where you downloaded the bootloader ZIP package, and execute the following command. Replace /dev/ttyACM0 with the correct port (Windows users may use COMx):
⚡ adafruit-nrfutil --singlebank --touch 1200 --verbose dfu serial --package <downloaded file>.zip -p /dev/ttyACM0 -b 115200
  1. ✅ Once the process is complete, the update is finished. Your device is now operating with the latest bootloader version, allowing you to proceed with flashing the firmware.

🛠 Method 3: Using a Debugger

🔧 If the methods above do not work, and your hardware supports it (i.e., has the necessary SWD pins), you can use a debugger such as a DAPLink or J-Link to flash the bootloader directly. Please refer to the Debugger Instructions for an example using the RAK4631.

🍓 Using SWDIO for Flashing with a Raspberry Pi

💡 Most Meshtastic devices can be easily flashed using USB. However, some devices (e.g., Seeed WM1110 Dev Kit) require an external device that can connect via "SWDIO." There are specialized devices like the RAKDAP1 designed for this purpose. Many users also find a Raspberry Pi to be a convenient option.
📖 This article offers instructions on how to use a Raspberry Pi as an SWDIO Flash Tool.

🔌 Wiring Setup

🔗 The first step is to connect two wires between your Raspberry Pi and the SWDIO ports on your NRF52-based device.
⚡ Connect GPIO pin 11 on your Raspberry Pi to the CLK pin on the Meshtastic device, and connect GPIO pin 8 on your Raspberry Pi to the DIO pin on the Meshtastic device.
✅ Make sure to verify the GPIO numbers are accurate.
🔋 Power your Raspberry Pi by connecting it to a USB power source, and also power the Meshtastic device.

⚙️ Install OpenOCD Software

💻 You can use OpenOCD to handle the SWDIO connection with the Meshtastic device. Install it on your Raspberry Pi.

🔄 $ sudo apt update

📦 $ sudo apt install libtool autoconf automake texinfo telnet gdb-multiarch git

🌐 $ git clone git://repo.or.cz/openocd.git

📂 $ cd openocd/

⚙️ $ ./bootstrap

⚙️ $ ./configure --enable-bcm2835gpio

⚡ $ make -j4

✅ $ sudo make install

🔍 Verify Connection

Before working with the firmware, let's attempt to connect to the NRF52-based device using SWDIO. All the necessary configuration can be found in the OpenOCD repository.
💻 $ openocd -f ./openocd/tcl/interface/raspberrypi-native.cfg -c "transport select swd" -f openocd/tcl/target/nrf52.cfg -s tcl
ℹ️ The first flag designates the Raspberry Pi as your host machine, the transport is set to SWDIO, and the final flag indicates that you are connecting to an nRF52-based chip. You should see output similar to this:

🖥️ Open On-Chip Debugger 0.12.0+dev-00633-gad87fbd1c

📜 Licensed under GNU GPL v2

🔗 For bug reports, read http://openocd.org/doc/doxygen/bugs.html

⚡ swd

ℹ️ Info : Listening on port 6666 for tcl connections

ℹ️ Info : Listening on port 4444 for telnet connections

ℹ️ Info : BCM2835 GPIO JTAG/SWD bitbang driver

⏱️ Info : clock speed 100 kHz

🔎 Info : SWD DPIDR 0x2ba01477

🧩 Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected

🛠️ Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints

✅ Info : [nrf52.cpu] Examination succeed

⚙️ Info : [nrf52.cpu] starting gdb server on 3333

ℹ️ Info : Listening on port 3333 for gdb connections

🔗 Info : accepting 'telnet' connection on tcp/4444

⚠️ If you encounter the message “Error connecting DP: cannot read IDR,” it likely means that the wires are connected to the wrong locations.

⬇️ Download Firmware

Refer to the instructions for your hardware to locate the appropriate firmware for your device. Most devices following this guide require a .hex file. After that, copy the firmware file to your Raspberry Pi.

⚡ Flash Firmware

After starting OpenOCD, you can connect to your Meshtastic device via telnet. Flashing the device is straightforward; just run a few commands within the telnet session:

💻 $ telnet 127.0.0.1 4444

🔗 Trying 127.0.0.1...

✅ Connected to 127.0.0.1.

⎋ Escape character is '^]'.

🖥️ Open On-Chip Debugger

⚙️ > init

⚙️ > reset init

⏸️ > halt

🧹 > nrf5 mass_erase

📥 > program firmware.hex verify

🔄 > reset

🚪 > exit 0

🔌 Disconnect the power and then reconnect it after flashing.

📶 Establish Connection

🎉 Congratulations! You should now be able to connect to your device via Bluetooth in the Meshtastic app.

Sidebar

Latest post

This section doesn’t currently include any content. Add content to this section using the sidebar.

Register for our newsletter

Get the latest information about our products and special offers.