Skip to content

TEST - #4

Open
marelab wants to merge 4759 commits into
marelab:masterfrom
meshtastic:master
Open

TEST#4
marelab wants to merge 4759 commits into
marelab:masterfrom
meshtastic:master

Conversation

@marelab

@marelab marelab commented Mar 15, 2024

Copy link
Copy Markdown
Owner

Thank you for sending in a pull request, here's some tips to get started!

(Please delete all these tips and replace with your text)

  • Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first
    to say "hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback
    is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
  • Please do not check in files that don't have real changes
  • Please do not reformat lines that you didn't have to change the code on
  • We recommend using the Visual Studio Code editor along with the 'Trunk Check' extension (In beta for windows, WSL2 for the linux version),
    because it automatically follows our indentation rules and its auto reformatting will not cause spurious changes to lines.
  • If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description.
  • If your other co-developers have comments on your PR please tweak as needed.
  • Please also enable "Allow edits by maintainers".

renovate Bot and others added 28 commits April 10, 2026 11:21
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
These configs were generated programatically by Opus 4.6.

See: https://github.com/vidplace7/meshtasticd-40pin

Tested with MeshAdv-Pi, other pinmaps are untested but should work.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Use Google / Amazon mirrors, not DockerHub, when pulling images for Docker builds.

Should prevent Docker ratelimiting during CI (Actions) builds.
* Upload to PPA via SFTP

* PPA-SFTP: Trust Launchpad's SSH Key

* Move SSH key import next to GPG

* Increase dput timeout...

* Use env for inputs (address semgrep gripe)
…10146)

Addresses cppcheck `src/graphics/EInkParallelDisplay.cpp:205: [low:style] Variable 'prev' can be declared as pointer to const [constVariablePointer]`
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ronization (#9895)

* fix(native): implement BinarySemaphorePosix with proper pthread synchronization

The BinarySemaphorePosix class (used on all Linux/portduino/native builds)
had stub implementations: give() was a no-op and take() just called
delay(msec) and returned false. This broke the cooperative thread scheduler
on native platforms — threads could not wake the main loop, radio RX
interrupts were missed, and telemetry never transmitted over the mesh.

Replace the stubs with a proper binary semaphore using pthread_mutex_t +
pthread_cond_t + bool signaled:

- take(msec): pthread_cond_timedwait with CLOCK_REALTIME timeout, consumes
  signal atomically (binary semaphore semantics)
- give(): sets signaled=true, signals condition variable
- giveFromISR(): delegates to give(), sets pxHigherPriorityTaskWoken

Tested on Raspberry Pi 3 Model B (ARM64, Debian Bookworm) with Adafruit
LoRa Radio Bonnet (SX1276). Before fix: no radio TX/RX, no telemetry on
mesh. After fix: bidirectional LoRa, MQTT gateway, telemetry all working.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ARCH_PORTDUINO

* Refactor BinarySemaphorePosix header for ARCH_PORTDUINO

* Change preprocessor directive from ifndef to ifdef

* Gate new Semaphore code to Portduino and fix STM compilation

* Binary Semaphore Posix better error handling

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Fix heap blowout on TBeams

* Update src/graphics/draw/MessageRenderer.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Set MESSAGE_HISTORY_LIMIT to 10 for original ESP32 to optimize RAM usage

* Optimize message frame allocation to prevent excessive memory usage

* Refine message history limits for resource-constrained builds and cap cached lines to prevent heap overflow

* Update src/graphics/draw/MessageRenderer.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-actions Bot and others added 30 commits June 24, 2026 08:00
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

* fix(nrf52): restore BLE security state on resume

NRF52Bluetooth::shutdown() swaps the passkey callback to onUnwantedPairing() while Bluetooth is disabled. resumeAdvertising() used to restart GAP advertising without rebuilding that security state, which could leave the node advertising while normal pairing attempts were still rejected until reboot.

Restore the configured security state before advertising resumes. PIN-based modes reinstall the pairing, completion, and secured callbacks, explicitly restore display-only IO capabilities, and explicitly require MITM. NO_PIN mode clears those callbacks and clears MITM after setPairPasskeyCallback(nullptr), because Bluefruit enables MITM as a callback-setter side effect even when clearing the callback.

Share the same restore helpers with setup(), keep TX power setup symmetric with the resume path, and log unexpected onUnwantedPairing() hits so callback poisoning is visible in diagnostics.

* fix(nrf52): remove blocking BLE pairing wait

NRF52Bluetooth::onPairingPasskey() blocked the firmware loop for up to 30 seconds when match_request was true. That wait did not yield or delay, so it could starve application-level BLE event handling while the SoftDevice connection was active.

Remove the busy-wait. The passkey UI remains visible because pairing completion and disconnect callbacks already dismiss it, so pairing can continue through the normal callback flow without stalling the rest of the firmware.

* fix(nrf52): redact BLE pairing secrets from logs

The nRF52 BLE pairing path logged both the configured boot PIN and the per-pairing passkey at INFO level. Those values can be exposed through serial diagnostics or log streaming even though they are intended only for the pairing UI and status observers.

Keep the diagnostic signal without printing secret digits: log that a PIN is configured, log the pairing start with match_request state, and remove the now-unused passkey-splitting locals and duplicate match_request log.
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Avoid nested spiLock acquisition in MessageStore::clearAllMessages() by
only holding the lock during the write() call. SafeFile's constructor
and close() methods already handle their own spiLock acquisition, so
nesting the guard around the entire operation causes a deadlock until
the watchdog timer triggers a reset.

Relates to PR #10809.
The automated trunk upgrade (#10865) enabled ascii-dash@SYSTEM and
too-many-defined@SYSTEM without any lint.definitions for them, so trunk
reports 'not a supported linter' (trunk/config-error) and fails the Trunk
Check on every open PR. trunk_check.yml runs on pull_request only, so
master's push CI never caught it. Remove the two undefined entries to
restore a valid config; the version bumps from #10865 are kept.
* Backport Tracker X1 to Master
* Add SPA06 to generated TelemetrySensorType enum
* Rename TRACKER_T1000_E_PRO to MESH_TRACKER_X1 in generated HardwareModel enum
* Update RadioLib dependency to the fixed version
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Trunk loves to complain about svgs and pngs in `branding`. Make it stop!
…10927)

Back-port of #10911 to master. Adds support for boards that route the SX126x
control lines (NRESET/DIO1/BUSY) through an I2C GPIO expander with no /INT wired
to the MCU, so RadioLib cannot take a hardware DIO1 interrupt.

Two reusable pieces, both gated behind USE_MCP23017 / LORA_DIO1_SOFTWARE_POLL so
builds that don't define them are unaffected:

- ExtensionIOMCP23017 + MCP23017LockingArduinoHal: a RadioLib HAL that maps
  virtual pins (MCP23017_VPIN_BASE .. +15) onto an MCP23017's GPIO, so
  RESET/BUSY/DIO1 reads and writes become I2C transactions while the real SPI
  GPIOs (SCK/MOSI/MISO/CS) pass straight through. A failed I2C read skips the
  read-modify-write rather than clobbering the rest of the bank. Expander access
  is mutex-guarded since it is touched from both the radio thread and setup.
- LORA_DIO1_SOFTWARE_POLL: with no DIO1 interrupt available, the SX126x
  interface polls the radio IRQ status register from the radio thread and
  synthesizes the ISR_TX/ISR_RX events, filtering noisy preamble/header IRQs so
  they can't starve TX. A 1 ms ISR_POLL_TICK drives the poll; TX timers may
  overwrite the pending tick (pollMissedIrqs() bounds the busy-Rx contention
  latency). Behaviour is unchanged on boards that keep the hardware interrupt.

Variants opt into shared behavior via reusable capability macros instead of
per-model #ifdefs: AUDIO_AMP_ENABLE(on) (speaker amp power, shared with the
T-LoRa Pager) and LORA_DIO1_EXTENDED_IO (DIO1 lives on an expander, not a
wake-capable GPIO; shared with the SenseCAP Indicator so sleep.cpp skips the
GPIO wakeup path).

The Meshnology W10 variant: ESP32-S3R8 + EBYTE E22-900MM22S (SX1262) + AXP2101
PMIC + Quectel L76KB GPS + SPI TFT + ES8311 codec, with the radio's
RESET/DIO1/BUSY and the LCD reset routed through an MCP23017 at 0x20. Pins come
from the board schematic and were verified on hardware. master's protobufs
predate the MESHNOLOGY_W10 HardwareModel enum, so the board reports PRIVATE_HW
until that enum lands here via a protobuf bump.
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
* rebased to master

* Update bin/config.d/lora-ZebraHat_2W.yaml

Co-authored-by: Austin <vidplace7@gmail.com>

* Update bin/config.d/lora-ZebraHat_1W.yaml

Co-authored-by: Austin <vidplace7@gmail.com>

* Update bin/config.d/lora-NebraHat_2W.yaml

Co-authored-by: Austin <vidplace7@gmail.com>

* Update bin/config.d/lora-NebraHat_1W.yaml

Co-authored-by: Austin <vidplace7@gmail.com>

* Remove TX_GAIN_LORA configuration line

* Remove TX_GAIN_LORA configuration line

* Comment out TX_GAIN_LORA configuration

* Comment out TX_GAIN_LORA configuration

* Update lora-ok3506-RAK6421-13300-slot1.yaml

* Update lora-ok3506-RAK6421-13300-slot2.yaml

* Update lora-RAK6421-13300-slot1.yaml

* Update lora-RAK6421-13300-slot2.yaml

* Added Zebra Hat Duo

---------

Co-authored-by: Austin <vidplace7@gmail.com>
…ardputer Advanced (#10884)

* Implement SD card backup/restore of preferences; add SD support for Cardputer Advanced

Fills the two 'TODO: After more mainline SD card support' stubs in
NodeDB::backupPreferences / restorePreferences so the existing
backup_preferences / restore_preferences admin messages work with
BackupLocation_SD. Same BackupPreferences proto as the FLASH location,
stored at /backups/backup.proto on the card; guarded by
HAS_SDCARD && !SDCARD_USE_SOFT_SPI; SD access under spiLock.

Also defines the SD card slot pins for the M5Stack Cardputer Advanced
(shares the SPI bus with the SX1262, separate CS), whose physical slot
was previously unused by the firmware.

Hardware-tested on two Cardputer Advanced units (as a v2.7.26
backport): mount, backup write, and full restore (config, module
config, channels, owner, security keys) verified; LoRa unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Deduplicate backup construction and restore application

Extract buildBackupPreferences() and applyRestoredPreferences() shared
by the FLASH and SD locations, per review feedback, so the two paths
cannot drift apart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Maksym Tereshko <maxim.tereshko@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Maksym Tereshko <termax@ter-air-12.taila94f88.ts.net>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Includes HM330X sensor used at the fab26 event.
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Both are enabled but never defined on master. Their definitions and the
bin/lint-*.sh scripts they invoke exist only on develop, so Trunk Check
exits with a config error before scanning any files, failing every PR.

Reapplies #10869, which was undone by the trunk upgrade in #10895.
…LIB_ERR_NONE (#10407) (#11540)

(cherry picked from commit b11d29f)

Co-authored-by: Tom <116762865+NomDeTom@users.noreply.github.com>
Bumps the submodule to the protobufs 2.7 branch tip, adding
SEEED_WIO_TRACKER_L1_PRO_1W = 144 (protobufs#1041).

Regenerated with nanopb 0.4.9.1 against protobufs 2.7, which is the
branch this line tracks.
* chore(deps): bump RadioLib to 510e00cf

Carries the current LR11x0 and LR2021 fixes.

* fix(sx126x): allow boards to opt out of the PA optimization table

Boards driving an external PA can define SX126X_NO_POWER_OPTIMIZATION_TABLE
to use the fixed PA config instead of RadioLib's table, which is tuned for a
bare SX126x.

Default behaviour is unchanged. init() applies the fixed config after begin(),
which programs power through the table.

* feat(variants): add Seeed Wio Tracker L1 Pro 1W

nRF52840 + SX1262 with a 1 W external PA, L76K GNSS, SH1106 OLED.

Uses hw_model 144 (meshtastic/protobufs#1038), opts into
SX126X_NO_POWER_OPTIMIZATION_TABLE and declares SX126X_MAX_POWER explicitly.
The PA gain table is indexed by SX1262 output power in dBm.

Requires protobufs#1038 and a protobuf regen before it builds.

* fix(variants): correct L1 Pro 1W QSPI pins and clean up comments

PIN_QSPI_* are logical pin indices. The QSPI flash sits at D19-D24 in
variant.cpp, but the defines carried D21-D26 from seeed_solar_node, where
that block does start at D21. D25 and D26 are trackball pins.

Also replaces mis-encoded characters in the pin comments and drops the
migration note, which referenced a private repo path and a stale PINS_COUNT.

* fix(variants): move L1 Pro 1W out of the per-PR build matrix

board_level = pr is the high-attention tier that builds on every PR. This
board belongs with the mainline set, which on this branch carries no
board_level and builds in the release matrix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.