Jonathan Bennett cc87ea82c0 Clamp LoRa bandwidth to what the radio can program (LR2021: 812.5 kHz)
The wide-LoRa turbo presets (SHORT_TURBO, MEDIUM_TURBO, LONG_TURBO) ask for
1625 kHz on a wideLora region. The LR2021 has no such bandwidth: LR20xx DS
V2.2 Table 9-3 stops at LORA_BW_812 for the SX1280-compatible set and at
LORA_BW_1000 overall, and RadioLib's LR2021::setBandwidth() returns
INVALID_BANDWIDTH above 1000 kHz. LR2021::begin() asserts on that call, so
LR20x0Interface::init() returned false and the node came up with no radio at
all ("No LR2021 radio") on region LORA_24 with any turbo preset. Nothing
checked bandwidth against the part - clampBandwidthCode() only rewrites a
bandwidth code of 0.

RadioInterface gains maxBandwidthKHz(), the widest bandwidth the part can
program, 0 for a part with no limit the presets can reach (every driver but
the LR20x0 family). applyModemConfig() clamps bw to it once both the preset
and custom paths have resolved, before the value sizes the frequency slots.
LR20x0Interface declares 812.5 kHz, which never binds sub-GHz since the
widest sub-GHz preset is 500 kHz.

The clamp warns, because it is not free: an LR2021 on a clamped turbo preset
no longer shares airtime with an SX1280 or LR1120 node on the same preset, so
those two will not hear each other. Coming up deaf on the configured preset
is the worse of the two.

Tests: test_radio covers the clamp on a wide turbo preset, the no-op below
the limit (wide LONG_FAST, sub-GHz MEDIUM_TURBO), and that a part declaring
no limit still gets 1625 kHz.
2026-10-23 04:21:30 +00:00
2026-10-22 11:17:05 +00:00
2021-10-09 17:15:12 +11:00
2024-09-24 15:24:08 -05:00
2026-10-21 04:57:09 +00:00
2026-07-01 19:01:27 -05:00
2026-01-29 10:06:58 -06:00
2024-11-28 06:26:51 -06:00
2024-09-04 15:33:28 -07:00
2026-01-29 10:06:58 -06:00
2026-01-29 10:06:58 -06:00
2026-10-03 22:43:30 +00:00
2025-01-13 12:24:05 +08:00
2026-01-29 10:06:58 -06:00

Meshtastic Logo

Meshtastic Firmware

GitHub release downloads CI CLA assistant Fiscal Contributors Vercel MemBrowse

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

S
Description
No description provided
Readme GPL-3.0
314 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 73.6%
C 21.7%
Python 2.6%
Shell 1.5%
Batchfile 0.2%
Other 0.2%