Commit Graph
12312 Commits
Author SHA1 Message Date
Ben MeadorsandGitHub 01d1873bfc Deliver locally-generated replies addressed to us to the phone (#11185)
* Deliver locally-generated replies addressed to us to the phone

Config get/set from the phone times out on every device: the client sends an
admin request, the node handles it, and the response is silently dropped
before it reaches the phone queue.

#10967 changed Router::sendLocal's isToUs branch from enqueueReceivedMessage()
to handleReceived(p, src), so a local packet keeps its RxSource instead of
being relabeled RX_SRC_RADIO by the queue round-trip. That is the right call
for the new policy gates, but module replies go out through
MeshService::sendToMesh() with the default RX_SRC_LOCAL, and a reply to a
phone-originated request is addressed to our own node (setReplyTo resolves
from == 0 to ourNodeNum). Those replies now re-enter callModules as
RX_SRC_LOCAL, where the loopback gate skips every module whose loopbackOk is
false - including RoutingModule, whose promiscuous sniff is the only path that
moves a received packet into toPhoneQueue. The reply is released, never sent.

Requests still work, because the phone's own packets arrive as RX_SRC_USER and
pass the gate, so a set_config is applied and only its acknowledgement is lost.
That is why a client can connect and download config but times out on every
config screen and every setter.

Deliver the phone's copy from sendToMesh() instead: for a local packet
addressed to us, the loopback gate is doing its job in keeping the packet away
from module re-dispatch, and the phone copy is exactly what is missing. Setting
loopbackOk on RoutingModule would instead echo every locally-generated
broadcast back to the phone, and relabeling replies RX_SRC_RADIO would undo the
origin separation #10967 added.

Also stop reporting ERRNO_SHOULD_RELEASE (35) to the phone in the QueueStatus
for these packets. It means "caller frees", not a send failure, and the same
hunk changed it from the 0 the phone used to see.

* Address review: trim comments, assert the QueueStatus count

Condense the added comments to the one-or-two-line house style; the rationale
lives in the commit message and PR.

The reply test drained QueueStatus records in a while loop, which would have
passed just as happily on an empty queue. Count them and require both the
request's and the reply's.
2026-07-24 09:02:51 +00:00
JorropoandGitHub 4c17dda3e6 lint: drop dead terrascan ignore in devcontainer Dockerfile (#11167)
terrascan is not an enabled linter, so the trunk-ignore-all directive only
produced a "disabled linter" note. Remove it.
2026-07-24 08:57:16 +00:00
JorropoandGitHub ee74c3c446 lint: suppress intentional root USER in runtime Dockerfiles (#11166)
meshtasticd must run as root to reach GPIO/I2C/SPI hardware, so the final
USER root is deliberate. The existing file-level ignore used the old trivy
code (DS002); rename it to DS-0002 and add checkov/CKV_DOCKER_8 so the
last-USER-root findings are suppressed with an explicit justification.
2026-07-24 08:28:21 +00:00
JorropoandGitHub 419e8ee11f lint: fix stale trivy rule codes in clusterfuzzlite Dockerfile (#11165)
The trunk upgrade (#11140) renamed trivy's Dockerfile rules from DSxxx to
DS-xxxx, so the trunk-ignore-all directives for DS026/DS002 stopped
suppressing and the HEALTHCHECK / non-root-USER findings resurfaced.
Update the codes to DS-0026 / DS-0002, and drop the checkov/CKV_DOCKER_8,
hadolint/DL3002 and disabled terrascan ignores that no longer match any
finding.
2026-07-24 07:45:06 +00:00
JorropoandGitHub 79ade464a5 lint: clean up pr_tests workflow lint findings (#11169)
Suppress checkov/CKV_GHA_7 (the workflow_dispatch reason input is a
free-text run label that never reaches the build) and drop the redundant
quotes yamllint flags on the description/default/name scalars.
2026-07-24 07:38:18 +00:00
Ben MeadorsandGitHub b08c04f264 Add Meshnology W12 (WiFi LoRa 32 V5) LR2021 board support (#10910)
* Add Meshnology W12 (WiFi LoRa 32 V5) variant with LR2021 radio

ESP32-S3R8 + 16 MB flash + Semtech LR2021 dual-band LoRa + SSD1315 OLED,
Heltec V3-style pinout.

Pin map comes from the vendor pin sheet and vendor Arduino demos, confirmed
on hardware: I2C scan finds the OLED at 0x3C on SDA17/SCL18, and the LR2021
answers on NSS=8 SCK=9 MISO=11 MOSI=10 with BUSY=13/NRESET=12 verified by
reset-pulse probing.

The IRQ line needs LR2021_IRQ_DIO_NUM 8. RadioLib defaults irqDioNum to 5,
but DIO5 is not bonded out on this board - the two IRQ lines are DIO7 -> IO7
and DIO8 -> IO14, established by driving each radio DIO as a GPIO output and
watching which ESP32 pin followed. Left at the default, every interrupt is
routed to a floating pin: RX/TX still appear to work because
RadioLibInterface::pollMissedIrqs() falls back to polling the IRQ status
register, but the blocking scanChannel() waits on the pin itself and never
returns.

A shadow pins_arduino.h is needed because the generic esp32s3 one defines
RGB_BUILTIN, which pulls the Arduino RMT HAL into the link and fails against
this build's FreeRTOS config.

* Address review: add W12 variant metadata, trim comments

Declares the custom_meshtastic_* metadata the build manifest expects. Without
it the emitted .mt.json carried no hwModel, slug, display name or support
level, so the board was invisible to the flasher - and board_level = extra
kept it out of PR builds entirely, which is why it never appeared in this
PR's board list. It now matches the W10 sibling at board_level = pr with
support level 1. hwModel stays 255/PRIVATE_HW until a W12 enum lands in the
protobufs.

Also trims the header comments to the one-or-two-line limit in AGENTS.md;
the vendor pin sheet and probing evidence live in the PR description.
2026-07-24 03:29:44 +00:00
AustinandGitHub 372b751dc8 Actions: Run --level pr on merge_group (for now) (#11186)
Other branches aren't set up for this (yet?) so go back to the old behaviour for now.
2026-07-23 22:41:38 -04:00
AustinandGitHub 6908d27660 Enable merge queues (#11162) 2026-07-23 19:02:57 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
d0d029c8b1 Update python to v3.14.6 (#11063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-23 13:59:36 +02:00
Ben Meadors 876962e8f2 Protos 2026-07-23 06:49:09 -05:00
Ben MeadorsandGitHub d9150e8dc7 ci: warn and skip the pio check job on transient network failures (#11145)
* ci: warn and skip the pio check job on transient network failures

The `check` matrix job intermittently fails before it analyses anything:
`pio check` has to fetch the platform package first, and that download gets
reset mid-flight by the CDN often enough to be a nuisance. Three of the last
~200 CI runs died this way, all identical and all ~1s into the run:

    Checking station-g3 > cppcheck (board: station-g3; platform:
    https://github.com/pioarduino/platform-espressif32/.../platform-espressif32.zip)
    requests.exceptions.ConnectionError: ('Connection aborted.',
        ConnectionResetError(104, 'Connection reset by peer'))

cppcheck never ran, so there is no signal at all - just a red X someone has to
re-run by hand.

`pio check` exits 1 for both a dead socket and a real defect, so only the output
can tell them apart. check-all.sh now tees the run and classifies the failure:

  * cppcheck reported something (summary table or a `file:line: [severity]`
    defect line) -> real, propagate the exit status. This is checked first, so
    no amount of network noise elsewhere in the log can mask a genuine defect.
  * transport-level error and nothing else -> log a ::warning:: annotation
    naming the board and the underlying error, and exit 0 under CI (exit 2
    locally, so a local run never quietly reports itself clean).
  * anything else -> propagate the exit status.

404 / 403 / UnknownPackageError are deliberately not treated as transient: a
missing or forbidden package is a reproducible break from a bad pin in a .ini,
not weather.

No workflow change is needed - gh-action-firmware's entrypoint runs
/workspace/bin/check-all.sh for MT_TARGET=check, so the whole fix lives in this
repo and applies to local runs too.

Verified by replaying the captured CI logs through the script with a stubbed
`pio`: the station-g3 connection-reset log skips with a warning under CI and
exits 2 locally, the rak11200 `Total 1 0 0` defect log still fails, that same
defect log with the reset traceback appended still fails, and a 404 still fails.

* ci: pass board names to pio as an argument array

Addresses CodeRabbit review feedback on the previous commit (and the SC2086 the
line has carried since it was written): BOARDS was a space-joined string and
$CHECK was expanded unquoted, so a board override containing whitespace or a
glob character could turn into extra pio arguments.

BOARDS and CHECK are arrays now, and pio is invoked with "${CHECK[@]}", so board
names reach it as literal arguments. The two skip messages use "${BOARDS[*]}" -
a bare "${BOARDS}" would have quietly named only the first board.

shellcheck -x is clean on the file. Re-verified with a stubbed pio that records
its argv: 'tb*' and 'tbeam extra' each arrive as one literal argument, the
default list still expands to 15 -e pairs, a two-board skip names both boards,
and all six classification cases (network/CI, network/local, real defects,
defects with a reset traceback appended, 404, clean pass) are unchanged.
2026-07-23 06:25:18 -05:00
ef1aedd569 Fixes a crash when you favorite a node (#11146)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-07-23 10:08:34 +02:00
efc9708236 Add userpref for the packet signature policy default (#11144)
Co-authored-by: Austin <vidplace7@gmail.com>
2026-07-23 10:05:02 +02:00
Carlos ValdesandGitHub 2c1fd6b7ea fix(ScanI2C): fetch the SE050 probe response with requestFrom() (#11133) 2026-07-23 09:57:14 +02:00
Ben MeadorsandGitHub 8a9980576f Merge pull request #11154 from RCGV1/codex/fix-packet-policy-excluded-test
test: cover packet policy coercion on excluded builds
2026-07-22 15:52:27 -05:00
Benjamin Faershtein 8acb7fec73 test: cover coerced packet signature policy 2026-07-22 12:25:19 -07:00
Ben MeadorsandGitHub 1804fd1886 Merge pull request #11150 from meshtastic/always-exclude-rangetest
Always exclude range test
2026-07-22 12:20:06 -05:00
Ben Meadors cad3a3a5c7 Always exclude range test
Range test is excluded on every target as of 2.8, so set
MESHTASTIC_EXCLUDE_RANGETEST=1 globally in [env] build_flags and drop the
now-redundant per-variant flags from esp32, rak11200 and stm32.

Guard RangeTestModule.cpp with the same condition used in Modules.cpp so the
translation unit compiles to nothing rather than relying on --gc-sections to
strip it, and always report RANGETEST_CONFIG in the device metadata
excluded_modules bitmask so clients hide the config.
2026-07-22 10:25:54 -05:00
Ben MeadorsandGitHub 9662c818b5 Merge pull request #11148 from NomDeTom/flash-clawback
claw back some space from signing policies
2026-07-22 08:54:23 -05:00
nomdetom 583248c19d claw back some space from signing policies 2026-07-22 14:36:06 +01:00
Ben MeadorsandGitHub f90c1340de Merge pull request #11117 from NomDeTom/nailed-test-number
Nailed native test numbers so PRs don't forget to increment
2026-07-22 06:06:08 -05:00
Thomas GöttgensandGitHub b9c7858fd0 enable autoLDRO on LR2021 (#11139) 2026-07-22 11:12:52 +02:00
Thomas GöttgensandGitHub f09f2b1366 Gate the PKI-decrypt key on signer-proven, not the opportunistic cache (#11116) 2026-07-22 11:12:06 +02:00
Thomas GöttgensandGitHub 11c510ff1b WIP: Big Display Node (#10926) 2026-07-22 09:35:36 +02:00
Ben MeadorsandGitHub c263a9e4a3 Merge pull request #11136 from meshtastic/renovate/rak13800-w5100s-1.x
Update RAK13800-W5100S to v1.0.3
2026-07-21 19:40:27 -05:00
Ben MeadorsandGitHub 1d6f8a8f34 Merge pull request #11130 from meshtastic/ci-native-tests-by-area
Run native PlatformIO tests by area for readable failures
2026-07-21 19:39:58 -05:00
Ben MeadorsandGitHub 5e3d1ea606 Merge pull request #11129 from RCGV1/agent/include-statusmessage-config
phoneapi: send status message config
2026-07-21 19:37:35 -05:00
renovate[bot]andGitHub b800c18055 Update RAK13800-W5100S to v1.0.3 2026-07-22 00:37:15 +00:00
Ben MeadorsandGitHub c6669a4ed8 Merge pull request #11128 from RCGV1/agent/keyverification-allocation-safety
keyverification: handle response allocation failure
2026-07-21 19:36:19 -05:00
TomandGitHub 99efee53ef Merge branch 'meshtastic:develop' into nailed-test-number 2026-07-22 01:10:35 +01:00
Ben MeadorsandGitHub 6e37b53324 Merge pull request #11134 from RCGV1/codex/verify-packet-auth-config-docker
fix(security): round-trip packet policy defaults
2026-07-21 17:50:43 -05:00
Ben MeadorsandGitHub 72aac12b8d Merge branch 'develop' into agent/keyverification-allocation-safety 2026-07-21 16:35:38 -05:00
Ben MeadorsandGitHub df971c2921 Merge branch 'develop' into agent/include-statusmessage-config 2026-07-21 16:34:50 -05:00
Benjamin Faershtein d195ec6748 fix(security): round-trip packet policy defaults 2026-07-21 14:25:53 -07:00
nomdetom d5bb2c2bc3 fix a nitpicky semgrep 2026-07-21 21:54:51 +01:00
TomandGitHub 9f6fb6b2a7 Merge branch 'develop' into nailed-test-number 2026-07-21 21:47:04 +01:00
nomdetom d8118358af nitpicks and guards 2026-07-21 21:46:11 +01:00
Thomas Göttgens dfee95c5c1 Consolidate per-area reports into testreport.xml for downstream consumers 2026-07-21 21:32:10 +02:00
Ben MeadorsandGitHub 6e48fac741 Merge pull request #11125 from meshtastic/baseui_fixindicator 2026-07-21 13:50:34 -05:00
Thomas Göttgens 4906f8a6d9 Run native PlatformIO tests by area for readable failures
The native test job ran every test_* suite in a single platformio invocation,
so a failure in the growing suite set could land past the viewable log limit.

Build the test programs once, then run the suites grouped by area in sequential
invocations, each with its own JUnit report and collapsible log. The runs share
one build dir, so gcov coverage still accumulates and a single capture holds the
union. Areas are ordered regex rules with a catch-all, so a new suite always runs.
2026-07-21 20:04:12 +02:00
Benjamin Faershtein 566d95f7d2 test: terminate status message fixture 2026-07-21 10:15:44 -07:00
Benjamin Faershtein 91915a0539 Merge commit '5548bd3195c18ec9274b2ff8171504acfc2647b3' into agent/include-statusmessage-config 2026-07-21 10:11:16 -07:00
Benjamin Faershtein dbe41e42a1 keyverification: handle response allocation failure 2026-07-21 10:10:34 -07:00
Benjamin Faershtein 9cce99400b phoneapi: send status message config 2026-07-21 10:10:34 -07:00
Ben MeadorsandGitHub 5548bd3195 Merge pull request #10967 from RCGV1/codex/packet-auth-policy 2026-07-21 11:32:40 -05:00
Ben MeadorsandGitHub fdb7668c15 Merge pull request #11124 from meshtastic/fix/admin-pin-tests-simradio 2026-07-21 11:31:44 -05:00
Jason P ef386afee5 Fixes SEEED Indicator when booting to BaseUI 2026-07-21 11:30:31 -05:00
Ben Meadors 6fc7c1b1db test: unset force_simradio so admin request pinning is exercised
The native test harness boots Portduino in simulated mode, and
wouldEncryptWithPKC() short-circuits to false whenever
portduino_config.force_simradio is set. noteOutgoingAdminRequest() derives its
pin from that predicate:

    keyValid = haveDestKey && wouldEncryptWithPKC(&p, p.channel, haveDestKey);

so under the harness no outgoing admin request is ever key-pinned, and
responseIsSolicited() admits a plaintext response to a PKC-pinned request.
test_pinned_request_keeps_its_key_after_an_unpinned_request and
test_request_to_keyed_node_pins_the_stored_key have therefore failed since
#11092 added them, on develop and on every branch that merges it.

Instrumenting the predicate shows every other term already satisfied
(haveDestKey=1, isFromUs=1, private_key=32, unicast, ADMIN_APP, channel
LongFast) with wouldEncryptWithPKC=0, leaving only the simradio guard.

Clear the flag in setUp so the fixture models a real device. Skipping PKC under
force_simradio is correct for a simulated radio - there is no PKC to pin - so
the predicate is left alone rather than relaxed to make a test pass. The only
sim-mode path in this suite is AdminModule's exit_simulator intercept, which no
test here exercises.

Native suite: 38 suites, 723/723 cases, no sanitizer findings.
2026-07-21 10:49:35 -05:00
Ben MeadorsandGitHub a58daf015d Don't misdetect the ES7210 audio codec as an INA219 (#11120)
The T-Deck's ES7210 audio ADC straps to 0x40, which is INA_ADDR. It
answers none of the INA226/INA260/SHT2X checks, so it fell into the bare
"assume INA219" fallback and PowerTelemetry then drove an audio codec as
a power monitor, panicking the board into a boot loop.

The INA219 has no manufacturer or die ID register, so it can only ever be
inferred. Positively identify the ES7210 instead, via its chip ID
registers 0x3D/0x3E (0x72/0x10), and leave the device unclaimed.

Also guard the INA219 fallback on the type rather than chaining it to the
SHT2X check: that else bound to the SHT2X if, so a positively identified
INA226/INA260 was overwritten with INA219 right after being found.

Fixes #11115
2026-07-21 07:24:01 -05:00
Ben MeadorsandGitHub e11635baa2 Merge branch 'develop' into codex/packet-auth-policy 2026-07-21 07:18:02 -05:00