mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-07 23:04:49 -05:00
7e7248f6b3cd65bc4b1dd8e2d607fd2f7cb738bb
An HCI LE Extended Advertising Report carries at most 229 bytes of data, so the controller hands a longer advertisement up as several reports from the same address and SID, each but the last INCOMPLETE. NimBLE passes them through one by one. handleExtendedAdvertisement() dropped every INCOMPLETE report on the belief that nothing chains on send, then parsed the COMPLETE tail as if it were the whole advertisement, so an ESP32 heard no packet over 221 bytes. That belief was wrong twice: a 251-byte advertisement is more than the 245 one AUX_ADV_IND holds, so the Link Layer chains it, and a single PDU over 229 bytes is split at HCI anyway. BLEMeshHandler::onScanReport() now joins reports keyed on (address type, address, SID): INCOMPLETE starts or extends a buffer, COMPLETE finishes it and delivers once, TRUNCATED discards it. Memory is bounded at BLE_MESH_REASSEMBLY_SLOTS buffers of BLE_MESH_ADV_TOTAL_MAX; a further advertiser evicts the stalest, anything longer than a mesh advertisement is skipped to its last report, and HCI marks no first report, so a buffer idle for BLE_MESH_REASSEMBLY_TIMEOUT_MS is abandoned rather than prefixed to the next advertisement. The AD parser moves into BLEMeshHandler beside it, shared with nRF52. The nRF52 scan path needs no join: S140 does not support report_incomplete_evts, assembles a chained advertisement into the 255-byte scan buffer itself, and reports it COMPLETE, TRUNCATED or MISSED, of which only COMPLETE was ever parsed. The comments that called 251 bytes one unfragmented PDU now say what it is: the most one HCI Set Extended Advertising Data command carries.
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! 🚀
Stats
Languages
C++
73.6%
C
21.7%
Python
2.6%
Shell
1.5%
Batchfile
0.2%
Other
0.2%
