Commit Graph
1233 Commits
Author SHA1 Message Date
tthandClaude Fable 5 04838e8492 feat(repeater): antispam — FairnessLimiter (port #1502) + kanálový deny list
Reakce na 5. 9.: ujetý AI bot lil 11dílný Gemini 429 dump na #meshcore
(99 ze 100 posledních zpráv kanálu) a naše repeatery ho poslušně šířily.

Vrstva A — FairnessLimiter (port Beanowovy větve beanow/wp-repeat,
upstream návrh meshcore-dev/MeshCore#1502): token buckety nad
FORWARDOVANÝM provozem, klíčované 1B identifikátory v plaintextu
(channel hash / src hash / pubkey[0]). Nový virtual
Mesh::takeForwardingRateLimit() jako poslední podmínka všech čtyř
forward rozhodnutí. DIRECT se nelimituje. Odchylky od originálu: bez
RTC závislosti (logy přes MESH_DEBUG_PRINTLN), bounds guardy na
payload_len. Kill switch: `fairness on|off` (persistovaný pref).

Vrstva B — ChannelFilter: repeater se znalostí PSK (committed
[channel_filter] — klíče hashtag kanálů jsou SHA256(jméno)[:16],
tedy veřejné z konstrukce; derivace ověřená na 0xEF z éteru)
dešifruje GRP_TXT a zprávy odesílatelů z runtime deny listu
odmítne přeposlat (markDoNotRetransmit, stejný mechanismus jako
ANON větev). CLI `filter add|del|list|clear`, seznam v NodePrefs.
Jméno je spoofovatelné — je to zadržení ujetého bota, ne security;
příjem a rxlog/pktfeed (CoreScope) nedotčené. Fork-only, upstream
by to nevzal (privacy/no-censorship, viz diskuze u #169).

ChannelBot refactor: registr kanálů + parse sdílené v ChannelCommon.h
(bot = botOnChannelText), čisté helpery v ChanListUtil.h kvůli native
testům. Nové testy test_fairness_limiter + test_chan_list (native i
ASAN, 164/164 zelených).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-05 21:35:36 +02:00
tthandClaude Opus 5 a043033910 Merge remote-tracking branch 'origin/dev' into main
58 commitů upstreamu nad v1.17.1. Šest konfliktů, všechny ručně:

- `src/helpers/radiolib/RadioLibWrappers.cpp` — OBOJE. Upstream `aa229245`
  přidává `idle()` před `setOutputPower()` na LR2021 (tam jsou to standby-only
  příkazy a přijímač se sám nevrátí do Rx); naše část si dál drží návratový
  status, aby „rádio to odmítlo" a „rádio to změnilo" nevypadaly z konzole
  stejně. Nezávislé věci, obě zůstávají.
- `src/helpers/CommonCLI.cpp` — VERZE UPSTREAMU. Celý blok `radio`,
  `radio.rxgain` a `radio.fem.*` byl čistě upstreamový kód (diff proti merge
  base v té oblasti je prázdný) a upstream ho přestěhoval do nového
  `CommonRadioPrefs`; FEM příkazy zrušil ve prospěch per-variant klíčů
  `fem_rxgain`/`fem_txgain`.
- `examples/simple_repeater/MyMesh.h` — NAŠE + úklid. `static_assert` na
  64bajtový wire formát `RepeaterStats` zůstává, `MAX_CLIENTS` odsud mizí:
  `1a8d860d` ho centralizoval do `helpers/ClientACL.h`, který je tu už
  includovaný.
- `examples/simple_repeater/MyMesh.cpp` — NAŠE. Konflikt byl falešný (upstream
  ten řádek nemění), jde o naše dva countery `tx_start_fail`/`tx_timeout`.
- `examples/companion_radio/ui-new/UITask.cpp` — OBOJE. Upstream přidal větve
  pro `UI_SHOW_CLOCK`, my podmínku `_task->isBluetoothEnabled()`, aby displej
  nenabízel PIN k párování, které není jak navázat.
- `platformio.ini` — OBOJE. Vedle našeho symlinku na lokální nRF52 framework
  přibyl upstreamový `toolchain-gccarmnoneeabi@^1.140201.0`.

Navíc: `[env:native_asan]` musel dostat `DynamicConfigSerializer.cpp` do
`build_src_filter`. Merge ho přidal jen do `[env:native]` a ASAN env pak padal
na undefined reference — což vypadá jako nález sanitizeru a je to jen chybějící
překladová jednotka. Ty dva envy musí zůstat v zákrytu.

Ověřeno: `pio test -e native` i `-e native_asan` 53/53, a čtyři envy, které
skutečně flashujeme, se přeloží (Xiao repeater / companion_radio_usb /
kiss_modem, t1000e_companion_radio_ble).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 02:19:04 +02:00
tthandClaude Opus 5 9383ec2221 feat(telemetry): dotaz na polohu nahřeje duty-cyklovanou GPS na příště
Uzel s `gps duty` odpovídal na telemetrii polohou starou až celý
GPS_DUTY_SYNC_INTERVAL_SECS (u nás 30 min). Dotaz s LOCATION právem teď
předsune nejbližší okno na hned, takže NÁSLEDUJÍCÍ dotaz dostane čerstvou
polohu. Při periodickém sběru to stojí jeden cyklus a nepotřebuje to,
aby uzel cokoli věděl o rozvrhu sběru.

Čekat na fix v rámci té odpovědi nejde: odpověď se skládá a odesílá
synchronně (BaseChatMesh.cpp:290), zatímco warm fix trval na T1000-E
změřených ~65 s -- a klient čeká 10 s. Meshtastic to ostatně řeší stejně,
position request tam vrací poslední známou polohu a GPS jede na vlastním
`gps_update_interval`.

Metoda je na SensorManageru, takže ji mají obě implementace: T1000
(vlastní manager) i EnvironmentSensorManager (SenseCAPy). Budí jen když
uzel opravdu duty-cykluje -- `gps on` už běží a `gps off` je přání
uživatele, které telemetrický dotaz nemá přebíjet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pwhe5XoCuuEbBCNLvsJBPL
2026-09-01 00:19:09 +02:00
tthandClaude Opus 5 7ffb8d0b8f feat(t1000-e): gps duty cycle — deska ho neměla vůbec
9c033063 spravil persistenci prefs, jenže na T1000-E nebylo co
persistovat: tahle varianta má vlastní T1000SensorManager a celá duty
mašinérie žila jen v EnvironmentSensorManager, který nepoužívá. Slovo
"duty" se ve variants/t1000-e/ nevyskytovalo ani jednou.

Projevilo se to tiše, protože setSettingValue bral všechno nenulové jako
"zapni": `gps:2` tedy vrátilo OK a rozsvítilo GPS naplno. Ověřeno na
a-card — po nastavení i po rebootu hlásila `gps:1`.

Konstanty GPS_DUTY_* se stěhují do SensorManager.h, aby je viděly obě
implementace místo duplikátu.

Jeden záměrný rozdíl proti environment verzi: off-stavem je tady
sleep_gps(), ne stop_gps(). Sleep drží GPS_VRTC_EN, takže si přijímač
nechá almanach a další okno chytá teplý fix; stop shodí i VRTC a platil
by se studený start každých 30 minut — přesně to, čemu se duty vyhýbá.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pwhe5XoCuuEbBCNLvsJBPL
2026-08-31 22:54:07 +02:00
Liam Cottle 5edc936301 Merge pull request #3298 from meshcore-dev/companion-cli
Companion CLI
2026-08-27 18:17:10 +12:00
Scott Powell 3d4eadd2cd * fix for RPI Picow 2026-08-25 19:04:32 +10:00
liamcottle 2136978378 add UI_NO_HIBERNATE build flag to disable hibernate screen on wio tracker l1 2026-08-24 13:45:19 +12:00
Scott Powell b5b20a7738 * refactored 'FEM' commands for HeltecTrackerV2 & HeltecV4 2026-08-24 02:16:18 +10:00
Scott Powell 8c73c948b4 * T096, and Station G3: refactoring the 'FEM' prefs to variant-specific code
* CommonCLI: 'FEM' commands removed
* introduced static no-op attachDynamicPrefs() for all boards
2026-08-24 01:50:22 +10:00
liamcottle f58c7293e2 add support for rak12500 and rak12501 gps on rak3401 2026-08-22 16:16:32 +12:00
ripplebiz 1e2e577885 Merge pull request #3236 from DominikTyrala/fix/c3_partition_setup
Fix Seeed C3 radio BLE exceeding flash size
2026-08-20 13:38:26 +10:00
tthandClaude Opus 5 1da521859c build: stamp the version in every nRF52 env, not in two of them
`ver` on a bench board reported the literal from the upstream header, so
there was no way to tell which build was actually on it -- which is exactly
what AGENTS.md says must never happen for a flashed env. The audit was worse
than expected: of 585 envs in the repo, TWO stamped. The T1000-E only looks
right because it is flashed from a local env in platformio.local.ini.

So the stamping moved into [nrf52_base], where every nRF52 env inherits it,
and the two per-env copies are gone (they would have run the script twice).

Verified on hardware, not just in the ELF: after reflashing, x4 reports
  ver -> v1.17.1-tthec20d77+ (Build: 260819 1957)
and x2's device query returns v1.17.1-tthec20d77+ / 260819 2003. The `+`
marks a dirty tree, the sha is the commit that built it.

ESP32/RP2040/STM32 bases can take the same one-liner if boards on those
platforms ever get flashed from here; not done blind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 20:06:33 +02:00
fdlamotte ed227b9cb6 Merge pull request #3180 from fdlamotte/thinknode_m8
thinknode_m8: initial support

adds some functionalities to ui_task and epddisplay:

epd display, 
- supports screen off, and clear screen
- supports forcing full refresh every N partial refreshes (off by default, configured to 60 for M8)

ui_task
- UI_SHOW_CLOCK flag to display clock on first screen
- rotary button can act like joystick (with regards to Enter key), defaults to old config for existing nodes
- screen off on long press when using rotary button (very handy for the watch)
2026-08-18 09:33:42 -04:00
Rastislav Vysoky 053fa3eb83 fix: move MeshadventurerBoard.h to correct location 2026-08-18 13:51:55 +02:00
Dominik Tyrala 630fa35604 Fixes BLE exceeding flash size 2026-08-18 09:34:34 +02:00
Florent c54139f7db M8: preview messages up to 164 cars 2026-08-17 09:24:17 -04:00
tthandClaude Opus 5 e38f311563 Merge upstream v1.17.1 (origin/main)
Small one after v1.17.0: 57 files, +825/-200, and it merged with no conflicts at
all. Unlike 1.17.0, the release tags sit directly on origin/main, so no
`-s ours` is needed for git describe to see the release.

What matters for our nodes:

* fix-rxgain-setting-post-agc-reset -- rx gain no longer resets after an AGC
  adjustment. The release notes ask repeater admins to verify radio.rxgain (and
  the new radio.fem.rxgain) after updating, so that goes on the post-flash list.
* NRF52 CC310 crypto is initialised once instead of on every call, and several
  NRF52 pin maps were corrected.
* New 'get/set radio.fem.rxgain/txgain' CLI commands (companion cannot configure
  them yet).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 14:13:50 +02:00
taco a80ddbf4e2 Fix LilyGo T-Echo Lite SPI pins 2026-08-13 00:53:58 +10:00
taco d0ceba7976 Fix Heltec MeshPocket SPI pins 2026-08-13 00:15:34 +10:00
taco 0028bd9bec Fix Heltec T1 pin definitions
SPI pins that are set to -1 cause OOB reads on NRF52. The unused Serial2 pin definitions were removed to avoid potential issues with the Uart framework.
2026-08-13 00:12:37 +10:00
ripplebiz 09933264fb Merge pull request #3188 from oltaco/heltec-t096-pin-fix
Fix Heltec T096 Tx issue
2026-08-12 23:00:31 +10:00
taco 248e6a9fab Heltec T096: fix PIN_SPI1_MISO
Setting SPI pins to values that are OOB of the g_ADigitalPinMap[] array causes OOB reads. This variant.h has pin 0 as 0xFF which passes through as NRFX_SPIM_PIN_NOT_USED.
2026-08-12 22:31:57 +10:00
taco 920ee315ec Revert "T096 PA_CTX pin direction workaround"
This reverts commit b13962d7de.
2026-08-12 22:28:05 +10:00
ripplebiz 6b79020bbd Merge pull request #3185 from oltaco/fix-techo-card-txco-voltage
Set T-Echo Card TCXO voltage to 3.0
2026-08-12 18:13:44 +10:00
ripplebiz d5949f93d8 Merge pull request #3137 from agessaman/feat/station-g3-fem-prefs
Station G3: Expose, persist, and apply FEM gain preferences
2026-08-12 16:11:23 +10:00
taco 309a04162e set T-Echo Card TCXO voltage to 3.0
as per https://github.com/meshcore-dev/MeshCore/pull/3140 and https://github.com/Xinyuan-LilyGO/T-Echo-Lite/issues/14
2026-08-12 16:08:05 +10:00
taco b13962d7de T096 PA_CTX pin direction workaround 2026-08-12 14:07:31 +10:00
Florent 109ed685b2 thinknode_m8: initial support 2026-08-11 17:37:35 -04:00
Rastislav Vysoky 3631de37de removed misleading 'GPIO' from pin numbers 2026-08-11 10:37:20 +02:00
Rastislav Vysoky a3825aa272 make promicro pinmap more tidy, move the LoRa pins to variant.h 2026-08-10 20:13:59 +02:00
ripplebiz 04fda41bd5 Merge pull request #3142 from oltaco/buildfix-userbtn
Build fix for R1 Neo and Minewsemi repeater
2026-08-10 13:30:24 +10:00
tthandClaude Opus 5 9d5491f5db Merge upstream v1.17.0 (origin/main) into the analyzer/BLE fork
Upstream shipped companion/repeater/room-server v1.17.0 today; its tree is
identical to origin/main, so that is what this merges. Our base was 7 Jul
(7b566670), i.e. 350 files / +11k lines of upstream behind.

Conflicts and how they were settled:

* Mesh.cpp -- upstream split the dedup into wasSeen() + explicit markSeen().
  Kept BOTH: their new call pair AND our payload-length bound on the TRACE
  path-hash read, which is what stops a crafted short TRACE from steering
  isHashMatch() past the buffer.
* companion_radio/main.cpp -- upstream grew its own MultiSerialInterface
  (BLE + USB + WiFi + Ethernet registered side by side), which is a superset
  of the SerialDualInterface we backported from PR #1779. Took theirs whole;
  our copy is now dead code. NOTE: envs that relied on the backport for a USB
  console alongside BLE now need an explicit -D ENABLE_USB_INTERFACE.
* ui-new/UITask.cpp -- isSerialEnabled() was renamed isBluetoothEnabled()
  upstream and DisplayDriver::RED became UIColor::warning_txt. Same intent
  either way: no BT pin on screen while Bluetooth is off.
* EnvironmentSensorManager.cpp -- upstream fixed the millis() wrap on the GPS
  update timer in the exact line our gpsDutyLoop() call sits on. Kept both,
  with their wrap-safe compare.
* NRF52Board.cpp -- upstream independently arrived at the same sd_temp_get()
  fix for SoftDevice-protected TEMP. Took their form, kept our comment, which
  is the only place recording WHY (APP_MEMACC fault -> reboot on telemetry).
* RadioLibWrappers.{h,cpp}, simple_repeater/main.cpp -- add/add. Their
  configSideDetectors()/performChannelScan()/external watchdog next to our
  irqDoneMask()/probeDio1()/BLE pump/WDT feed. The repeater console keeps the
  1032-byte reply buffer for paged analyzer output and now clears it, since a
  static buffer would otherwise reprint the previous reply.
* .vscode/extensions.json -- deleted upstream, and it is in .gitignore; our
  only change was a comment. Gone.

Built clean: Xiao_x1_rpt, Xiao_x2_cmp, Xiao_x3_obs, SenseCap_s1_rpt,
T1000E_cmp_cz. Not flashed to anything yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:44:07 +02:00
Scott Powell 49319023e5 Merge branch 'dev'
# Conflicts:
#	docs/payloads.md
2026-08-09 14:36:53 -04:00
Huw Duddy 79d2eeaa76 Merge pull request #3148 from recrof/add-missing-kiss-radio
add missing kiss radio roles, add kiss radio build to build.sh
2026-08-09 22:22:08 +10:00
Rastislav Vysoky d3f9cbb922 add missing kiss radio roles, add kiss radio build to build.sh 2026-08-09 14:17:18 +02:00
Huw Duddy 66eb74f0fb Merge pull request #3140 from entr0p1/fix/techo-lite-pins
Lilygo T-Echo Lite Pin Fixes
2026-08-09 22:06:21 +10:00
taco 2d412be465 minewsemi: build fix and platformio.ini tidy up
fixes minewsemi repeater failing build due to user_btn missing.
2026-08-09 18:33:27 +10:00
taco 05bdabe425 R1 neo: remove stray lib_deps entry 2026-08-09 16:51:45 +10:00
taco 7634c077e5 build fix for R1 Neo repeater
added missing declarations for user_btn and NullDisplayDriver
2026-08-09 16:50:44 +10:00
entr0p1 430ef3b086 Lilygo T-Echo Lite Pin Fixes
- Aligned to Lilygo's updated schematic and pin map as per https://github.com/Xinyuan-LilyGO/T-Echo-Lite/issues/14
2026-08-09 14:09:35 +10:00
ripplebiz 02f7fb7cbc Merge pull request #3139 from oltaco/x1-flash
Add QSPIFlash support for Seeed MeshTracker X1
2026-08-09 13:52:56 +10:00
taco 964d87c890 add QSPIFlash support for Seeed MeshTracker X1 2026-08-09 11:41:09 +10:00
Adam Gessaman 5704db9f74 fix(station-g3): apply FEM PA level at TX start
PA PL1 re-targets the PA's DC-DC supply rail rather than selecting a
logic-level gain, and the serial CLI is serviced on every main-loop pass
regardless of whether a transmit is in flight. A `set radio.fem.txgain`
write could therefore move the rail mid-transmit, while the SX1262 was
still driving the PA at full input power.

Record the requested level in setPAGainEnable() and drive the pin from
setTxModeEnable(), which runs from onBeforeTransmit() ahead of
startTransmit(). The level only matters while transmitting, so deferring
costs nothing.

Document that the pref is saved immediately but applied at the next
transmit, so `get radio.fem.txgain` can lead the hardware until then.
2026-08-08 14:53:57 -07:00
Hacuchino-hash 4160dfbb87 Fix X1 charge status LED always showing charged 2026-08-07 08:08:08 -05:00
agessaman 2eb7feffe0 fix(station-g3): expose FEM gain preferences 2026-08-06 15:29:14 -07:00
Hacuchino-hash dc8e2d6745 Add SPA06 barometer telemetry and charge status LED for MeshTracker X1 2026-08-06 07:27:05 -05:00
Hacuchino-hash f8ea866b1f Add RGB LED and haptic notifications for SenseCAP MeshTracker X1 2026-08-06 07:27:05 -05:00
Rastislav Vysoky 63108c2c90 ThinkNode M6: Remove QSPIFLASH=1 build flag to fix companion roles
M6 doesn't have flash chip available, so companion roles fail to start.
2026-08-06 12:37:21 +02:00
Hacuchino-hash 5b2613fc0a Add support for Seeed SenseCAP MeshTracker X1 (LR2021) 2026-08-05 05:50:21 -05:00
ripplebiz 8bf182fb41 Merge pull request #3115 from oltaco/meshnology_w12
Add support for Meshnology W12 and LR2021 Wrapper
2026-08-05 15:04:00 +10:00