Scripts that automates the process of selecting, downloading, and applying firmware updates from the meshcore-dev/MeshCore & meshtastic/firmware GitHub repository via the USB port.
Download mtfirmware.cmd (right click save)
Make sure file is named mtfirmware.cmd and not mtfirmware.cmd.txt
double click and run the file mtfirmware.cmd
2025-05-23.23-47-50.mp4
Copy and run this in your linux terminal
cd ~ && git clone https://github.com/mikecarper/meshfirmware.git && cd meshfirmware && chmod +x mtfirmware.sh && ./mtfirmware.sh
Readable Code
cd ~
git clone https://github.com/mikecarper/meshfirmware.git
cd meshfirmware
chmod +x mtfirmware.sh
./mtfirmware.sh
output_10mb2.mp4
Copy and run this in your linux terminal
cd ~ && git clone https://github.com/mikecarper/meshfirmware.git && cd meshfirmware && chmod +x mtcompile.sh && ./mtcompile.sh
Readable Code
cd ~
git clone https://github.com/mikecarper/meshfirmware.git
cd meshfirmware
chmod +x mtcompile.sh
./mtcompile.sh
final_output.mp4
The script does the following:
-
Updates a local cache file with GitHub release data if it is older than 6 hours.
-
Falls back to using the cached data if no internet connection is detected.
-
Parses the JSON release data to build a list of firmware release versions.
-
Appends labels (such as (alpha), (beta), (rc), or (pre-release)) based on the release tag.
-
Prepends the ! label if the release has known issues.
-
Uses lsusb to detect connected USB devices.
-
If more than one matching USB device exists, the user is prompted to choose the correct one.
-
Matches the detected device against available firmware files.
-
If more than one matching firmware file exists, the user is prompted to choose the correct one.
-
For ESP32 devices, the script adjusts the update script (e.g., changes baud rate from 115200 to 1200) as required.
Also allows the user to choose between an update or an install operation -
Stops any systemd service locking the device before proceeding and restarts it afterward.
Run the script with the following syntax:
./mtfirmware.sh [OPTIONS]
-
--version VERSION
Specify a firmware release version to auto-select (searches for tags containing the provided string). -
--install
Set the operation mode to install (used instead of update). -
--update
Set the operation mode to update (this is the default if not otherwise specified). -
--run
Automatically update firmware without prompting the user. -
-h, --help
Display the help message and exit.