Meshtastic device firmware
Go to file
Erayd 3c25652cdf
Some checks are pending
CI / setup (check) (push) Waiting to run
CI / setup (esp32) (push) Waiting to run
CI / setup (esp32c3) (push) Waiting to run
CI / setup (esp32c6) (push) Waiting to run
CI / setup (esp32s3) (push) Waiting to run
CI / setup (nrf52840) (push) Waiting to run
CI / setup (rp2040) (push) Waiting to run
CI / setup (rp2350) (push) Waiting to run
CI / setup (stm32) (push) Waiting to run
CI / version (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build-esp32 (push) Blocked by required conditions
CI / build-esp32s3 (push) Blocked by required conditions
CI / build-esp32c3 (push) Blocked by required conditions
CI / build-esp32c6 (push) Blocked by required conditions
CI / build-nrf52840 (push) Blocked by required conditions
CI / build-rp2040 (push) Blocked by required conditions
CI / build-rp2350 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (rp2350) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (rp2350) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
If a packet is heard multiple times, rebroadcast using the highest hop limit (#5534)
* If a packet is heard multiple times, rebroadcast using the highest hop limit

Sometimes a packet will be in the TX queue waiting to be transmitted,
when it is overheard being rebroadcast by another node, with a higher
hop limit remaining. When this occurs, modify the pending packet in
the TX queue to avoid unnecessarily wasting hops.

* Reprocess instead of modifying queued packet

In order to ensure that the traceroute module works correctly, rather
than modifying the hop limnit of the existing queued version of the
packet, simply drop it ifrom the queue and reprocess the version of the
packet with the superior hop limit.

* Update protobufs submodule

* Merge upstream/develop into overheard-hoptimisation branch

Resolved conflicts in:
- src/mesh/FloodingRouter.cpp: Integrated hop limit optimization with refactored duplicate handling
- src/mesh/MeshPacketQueue.h: Kept both hop_limit_lt parameter and new find() method

* Improve method naming and code clarity

- Rename findPacket() to getPacketFromQueue() for better clarity
- Make code DRY by having find() use getPacketFromQueue() internally
- Resolves method overloading conflict with clearer naming

* If a packet is heard multiple times, rebroadcast using the highest hop limit

Sometimes a packet will be in the TX queue waiting to be transmitted,
when it is overheard being rebroadcast by another node, with a higher
hop limit remaining. When this occurs, modify the pending packet in
the TX queue to avoid unnecessarily wasting hops.

* Improve router role checking using IS_ONE_OF macro

- Replace multiple individual role checks with cleaner IS_ONE_OF macro
- Add CLIENT_BASE support as suggested in PR #7992
- Include MeshTypes.h for IS_ONE_OF macro
- Makes code more maintainable and consistent with other parts of codebase

* Apply IS_ONE_OF improvement to NextHopRouter.cpp

- Replace multiple individual role checks with cleaner IS_ONE_OF macro
- Add CLIENT_BASE support for consistency
- Include MeshTypes.h for IS_ONE_OF macro
- Matches the pattern used in FloodingRouter.cpp

* Create and apply IS_ROUTER_ROLE() macro across codebase

- Add IS_ROUTER_ROLE() macro to meshUtils.h for consistent router role checking
- Update FloodingRouter.cpp to use macro in multiple locations
- Update NextHopRouter.cpp to use macro
- Include CLIENT_BASE role support

* Core Changes:
- Add hop_limit field to PacketRecord (17B→20B due to alignment)
- Extend wasSeenRecently() with wasUpgraded parameter
- Enable router optimization without duplicate app delivery
- Handle ROUTER_LATE delayed transmission properly

Technical Details:
- Memory overhead: ~4000 bytes for 1000 records
- Prevents duplicate message delivery while enabling routing optimization
- Maintains protocol integrity for ACK/NAK handling
- Supports upgrade from hop_limit=0 to hop_limit>0 scenarios

* Delete files accdentally added for merge

* Trunk formatting

* Packets are supposed to be unsigned. Thankfully, it's only a log message.

* Upgrade all packets, not just 0 hop packets.

* Not just unsigned, but hex. Updating packet log IDs.

* Fixed order of operations issue that prevented packetrs from being removed from the queue

* Fixing some bugs after testing. Only storing the maximum hop value in PacketRecord which makes sense. Also, updating messaging to make more sense in the logs.

* Fixed flow logic about how to handle re-inserting duplicate packets. Removed IS_ROUTER_ROLE macro and replaced it with better isRebroadcaster().

* Add logic to re-run modules, but avoid re-sending to phone.

* Refactor how to process the new packet with hops. Only update nodeDB and traceRouteModule.

* - Apply changes to both FloodingRouter and NextHopRouter classes to make packets mutable for traceroute
- MESHTASTIC_EXCLUDE_TRACEROUTE guard for when we don't want traceroute

* Allow MeshPacket to be modified in-place in processUpgradePacket

* let's not make a copy where a copy is unncessary.

---------

Co-authored-by: Clive Blackledge <clive@ansible.org>
Co-authored-by: Clive Blackledge <git@ansible.org>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-09-25 05:44:49 -05:00
.clusterfuzzlite Portduino config refactor (#7796) 2025-09-19 08:24:35 -05:00
.devcontainer Add UDP multicast support on linux. (#6342) 2025-03-20 08:47:39 -05:00
.github Allow label enforcement job to run on self-hosted runners (#7909) 2025-09-22 10:23:42 +10:00
.trunk Upgrade trunk (#8105) 2025-09-25 04:45:14 -05:00
.vscode BaseUI Updates (#7787) 2025-09-19 06:59:33 -05:00
arch portduino bump to fix gpiod bug (#8083) 2025-09-22 12:00:01 -05:00
bin Automated version bumps (#8100) 2025-09-24 06:02:55 -05:00
boards Add heltec_v4 board. (#7845) 2025-09-21 07:13:28 -05:00
branding Add customizable boot logo based on resolution (#7146) 2025-07-02 11:53:12 -07:00
data/static
debian Automated version bumps (#8100) 2025-09-24 06:02:55 -05:00
extra_scripts implement littlefs for stm32 (#5987) 2025-03-21 16:12:27 +01:00
images No idea why trunk wants to disturb these PNGs but... 2024-10-08 05:34:41 -05:00
meshtestic@dcac7e5673 python3 ref 2024-09-24 15:24:08 -05:00
monitor More trunk junk / remove old workflows (#6153) 2025-02-27 09:43:01 +08:00
protobufs@46b81e822a Update protobufs (#8045) 2025-09-19 15:50:33 -05:00
release Cleans up visibility in GPS.h (#5426) 2024-11-23 06:10:09 -06:00
src If a packet is heard multiple times, rebroadcast using the highest hop limit (#5534) 2025-09-25 05:44:49 -05:00
test Duplicate 2025-09-09 11:20:27 -05:00
variants Fix duplicated lines from merge (#8104) 2025-09-24 16:36:14 -05:00
.dockerignore Initial commit of a fuzzer for Meshtastic (#5790) 2025-01-16 18:42:21 -06:00
.env.example meshtasticd-docker: simplify, add USB compose (#5662) 2024-12-26 12:59:26 -06:00
.gitattributes update gitattributes for windows (#6289) 2025-03-11 13:05:51 -05:00
.gitignore Add customizable boot logo based on resolution (#7146) 2025-07-02 11:53:12 -07:00
.gitmodules Consume device-ui as a pio library (#6193) 2025-03-05 16:19:59 -06:00
.gitpod.yml
.semgrepignore
alpine.Dockerfile Update Alpine to 3.22 (#6927) 2025-06-08 07:49:24 +10:00
CODE_OF_CONDUCT.md Trunk 2024-11-28 06:26:51 -06:00
CONTRIBUTING.md
docker-compose.yml meshtasticd-docker: simplify, add USB compose (#5662) 2024-12-26 12:59:26 -06:00
Dockerfile Docker: fix web assets location (#7683) 2025-08-19 14:06:43 -05:00
LICENSE
meshtasticd.spec.rpkg Stop the madness! Run as a user (not root) (#6718) 2025-05-15 06:40:46 -05:00
partition-table-8MB.csv reorganize 8MB partition for MUI devices (#7860) 2025-09-08 05:56:47 -05:00
partition-table.csv
platformio.ini Update Adafruit BusIO to v1.17.4 (#8098) 2025-09-24 06:15:00 -05:00
pyocd.yaml
README.md Update README.md 2025-06-19 20:35:40 -05:00
renovate.json Renovate: Always use master as the base. (#7726) 2025-08-23 10:41:57 -05:00
rpkg.conf rpkg Fedora packaging (#5735) 2025-01-13 12:24:05 +08:00
SECURITY.md Update SECURITY.md (#6757) 2025-05-07 06:28:18 -05:00
suppressions.txt Unify the native display config between legacy display and MUI (#6838) 2025-06-21 06:36:04 -05:00
userPrefs.jsonc Set firmware edition (for events) from userprefs (#7488) 2025-07-28 07:31:33 -05:00
version.properties Automated version bumps (#8100) 2025-09-24 06:02:55 -05:00

Meshtastic Logo

Meshtastic Firmware

GitHub release downloads CI CLA assistant Fiscal Contributors Vercel

meshtastic%2Ffirmware | Trendshift

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

Join our community and help improve Meshtastic! 🚀

Stats

Alt