Skip to main content

Flashing with the CLI

caution

Make sure not to power the radio on without first attaching the antenna! You could damage the radio chip!

Before you flash your device start by verifying connectivity with the device being flashed. Outlined below are steps that can be taken to verify connectivity and, if necessary, to install the appropriate drivers. If you end up needing to install drivers be sure to reboot your computer afterwards to verify the installation is complete.

note

The T-Beam 0.7 board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards.

firmware-tbeam0.7-X.X.X.xxxxxxx.bin is the correct firmware. firmware-tbeam-X.X.X.xxxxxxx.bin is incompatible. For all other T-Beam boards firmware-tbeam-X.X.X.xxxxxxx.bin is the correct selection.

Command Line Interface Instructions

Install Prerequisite Software

Linux

Check if you have python3 and pip installed with the following command

python3 --version
pip3 --version

If python3 is not installed, install with

sudo apt-get update
sudo apt-get install python3

If pip is not installed, install with

sudo apt-get install python3-pip

Install esptool

pip3 install --upgrade esptool

Confirm Communication With Chip

Linux

important

On Linux, you may need to explicitly declare esptool as a .py script. Use esptool.py chip_id.

Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command:

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...

cd into the directory where you unzipped the latest release. For example:

Example
cd ~/Downloads/firmware/

Install/Update Firmware

Install or Update the device that you have by using the following commands according to your operating system:

caution

Be very careful to install the correct firmware file for your board. In particular, the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly. If you flash the incorrect device firmware, it may appear to successfully complete, yet the device will usually become unresponsive, displaying a blank screen (if equipped). Attempt to flash the correct version. Please note, while these devices are quite resilient and damage is not always likely, there is a possibility of onboard radio and peripheral damage due to incorrect GPIO pin direction.

Linux

Install
Command
./device-install.sh -f firmware-BOARD-VERSION.bin
Update
Command
./device-update.sh -f firmware-BOARD-VERSION.bin

Connect and Configure Device

After flashing the Meshtastic firmware to the device, you can proceed with the initial configuration.