mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Meshtastic device firmware
![]() The previous method of removing `--change-mode` from the argument list used a string (`NEW_ARGS`) and `eval set -- $NEW_ARGS` to reconstruct the positional parameters. This was both unsafe and incorrect. Because `NEW_ARGS` was built using quoted literal `$arg` strings instead of the actual values, it resulted in all filtered arguments being set to the same last value of `$arg`. This caused `getopts` to receive incorrect input and silently fail to parse options like `-p` and `-f`, leading to broken behavior and unset variables (e.g., `ESPTOOL_CMD` never got a port). This patch rewrites the logic to use an array (`NEW_ARGS+=("$arg")`), and resets positional parameters via `set -- "${NEW_ARGS[@]}"`. This preserves argument integrity and avoids the unsafe use of `eval`. Example of the broken behavior before this fix: ./device-update.sh -p /dev/ttyACM0 -f firmware.bin Resulted in: set -- firmware.bin firmware.bin firmware.bin firmware.bin Now: set -- -p /dev/ttyACM0 -f firmware.bin as expected. Signed-off-by: Neil Hanlon <neil@shrug.pw> |
||
---|---|---|
.clusterfuzzlite | ||
.devcontainer | ||
.github | ||
.trunk | ||
.vscode | ||
arch | ||
bin | ||
boards | ||
branding | ||
data/static | ||
debian | ||
extra_scripts | ||
images | ||
meshtestic@dcac7e5673 | ||
monitor | ||
protobufs@584f0a3a35 | ||
release | ||
src | ||
test | ||
variants | ||
.dockerignore | ||
.env.example | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.gitpod.yml | ||
.semgrepignore | ||
alpine.Dockerfile | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE | ||
meshtasticd.spec.rpkg | ||
partition-table.csv | ||
platformio.ini | ||
pyocd.yaml | ||
README.md | ||
renovate.json | ||
rpkg.conf | ||
SECURITY.md | ||
suppressions.txt | ||
userPrefs.jsonc | ||
version.properties |
Overview
This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
Get Started
- 🔧 Building Instructions – Learn how to compile the firmware from source.
- ⚡ Flashing Instructions – Install or update the firmware on your device.
Join our community and help improve Meshtastic! 🚀