Repository navigation
Merge MeshCore v1.18.0 - #60
Merged
Merged
Conversation
commenting out the load/save of the fem_ properties
combine radio's entropy with CC310 RNG
RadioLibWrapper::setTxPower() called setOutputPower() and nothing else. On
LR2021 that writes the PA config and TxParams, which are standby-only commands,
and it never re-arms the receiver.
This only affects LR2021 boards. recvRaw() has:
#if defined(USE_LR2021)
state = STATE_RX; // LR2021 stays in Rx after readData
#else
state = STATE_IDLE; // need another startReceive()
#endif
so on SX126x the next recvRaw() re-arms Rx anyway and the write is harmless,
while on LR2021 startReceive() is never called again on its own. A 'set tx'
issued while the radio was listening could therefore stop reception until the
next reboot. Observed a few times on an LR2021 repeater; recovery required a
power cycle.
Dispatcher's stuck-radio check does not catch it: isInRecvMode() reports the
wrapper's own `state` flag rather than the chip's actual mode, so it still
believes the radio is in Rx, and it only raises ERR_EVENT_STARTRX_TIMEOUT
without attempting recovery.
Fix: on LR2021, drop to standby via idle() before writing the PA config and let
checkRecv() re-arm Rx - the same pattern resetAGC() and
applySideDetectorConfig() already use. Other radios are left untouched.
Affects meshtracker_x1 and meshnology_w12 (both USE_LR2021).
Tested on hardware with an LR2021 repeater: six consecutive 'set tx' changes
(15/18/21/14/19/14), after which the radio kept receiving and forwarding
traffic (rawrx/rxpkts increasing, no missed IRQs). Noise-floor sampling also
kept updating, which only happens while state == STATE_RX.
MAX_CLIENTS is defined in both src/helpers/ClientACL.h and examples/simple_repeater/MyMesh.h. Appears it was centralised in the former header file some time ago. Both are included in some places and, depending on which order they're in, either value can win. This change drops the duplicate entry from the repeater firmware and bumps the central limit up to 32 (per the original repeater firmware value). Changes: - Remove MAX_CLIENTS from repeater MyMesh.h - Increase MAX_CLIENTS limit in ClientACL.h to 32
Fix LR2021 occasionally stopping reception after a TX power change
Several table entries share an address and not every driver verifies a chip ID: INA226::begin() only checks that the address ACKs, so an SHT4x at 0x44 was also registered as an INA226 and reported junk current on a second channel. Mark the address consumed once a driver initializes it so later entries cannot re-claim the same device.
Grove and other Bosch modules strap SDO high, so the 0x76-only table never initialized them. Add an alternate-address entry per Bosch sensor; the bus scan still gates every probe, and all four drivers verify a chip ID before claiming an address. Each sensor type has a single static driver instance, so skip an entry whose query is already active: the alternate address is a fallback, not a second device.
repeater: set `loop.detect` to `minimal` as default for new installs
fix: move MeshadventurerBoard.h to variants/meshadventurer
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)
Update GCC toolchain for nRF52 boards to fix builds on Raspberry Pi
Fix for CMD_SEND_RAW_DATA and multi-byte paths
An unconfigured slot has an all-zero secret, so it matches null-key group traffic (a sender with an unset PSK). The zero-key MAC validates against the empty slot and the foreign message is delivered as if it belonged to that channel — every node with a free slot is a null-key sink. Skip empty slots.
Hidden repeater
Use consistent `_OTA` suffix for nRF52 OTA BLE names
Add Nelos allocation for GroupData
ESP32-S3FH4R2 (4MB flash, 2MB PSRAM, native USB-CDC) with an LR1121. Pins, the DIO5/DIO6 RF switch table and the 1.8 V TCXO follow the HF schematic and Waveshare's examples. Envs: repeater, room server, companion USB/BLE and KISS modem, all on min_spiffs so roles share one partition layout. Only RFO_HP_LF is wired (R4 on RFO_LP_LF is not fitted), so the new opt-in LR1121_FORCE_HP_PA flag keeps RadioLib on the HP PA at <= 14 dBm, where it would otherwise select the unconnected LP PA.
- Clip requested power to the active PA's range instead of failing. A stored 22 dBm was rejected at 2.4 GHz (HF PA max 13 dBm), and since setTxPower ignores errors the sub-GHz PA stayed configured. - Re-apply the requested power after every successful retune: PA choice depends on the band, and set radio / tempradio only call setParams.
Treat transport code 0 the same as un-scoped.
ACK forwarding timing fix
feat(variants): add Waveshare ESP32-S3-LR1121
LR1121: keep TX power valid across sub-GHz and 2.4 GHz
Room: "set repeat" CLI now deprecated
Add WiFi support to Heltec v3 and v4 BLE variants
Disable NRF52 undervoltage bootlock feature
added dynamic wifi to: heltec wsl3, v4r8, wireless paper; rak 3112; seeed xiao s3 (wio)
Option A: keep meshcomod's transport (USB + TCP + WebSocket + BLE via MultiTransportCompanionInterface, NimBLE, BLE/Wi-Fi coexistence), binary NodePrefs, own AES and CI; take upstream's core and radio fixes and new boards; add 1.18's companion CLI on top so app v1.50 works. Taken from upstream: - MACThenDecrypt rejects non-block-aligned ciphertext (#1809), Utils::isZeroes - SX126x AGC reset keeps the boosted-gain mode (#3158) - CMD_SEND_RAW_DATA decodes multi-byte path hashes (#3235) - channel data length bound check (#3386); incoming channel datagrams reach the app again (meshcomod 1.17 dropped them), via our per-client history ring - TXT_TYPE_CLI_COMMAND + remote-CLI contact permission, sendCommandData txt_type - board.loop() variant hook, rtc_clock.tick() kept once - unhandled contact responses forwarded as PUSH_CODE_BINARY_RESPONSE (clamped) - charging bolt / plug next to the OLED battery badge - new boards and variants (M4, M8, Muzi Base, LR1121, ...) Companion CLI (CMD_RUN_CLI_COMMAND / RESP_CODE_CLI_REPLY), re-implemented on our prefs: name, pin, ver, board, reboot, poweroff, radio/freq/af/dutycycle/ tx/rxdelay/radio.rxgain/path.hash.mode/multi.acks, and app v1.50's Wi-Fi Settings (wifi.ssid/pwd/enabled/status/ip/clear/apply) through the NVS Wi-Fi store shared with the UI. Settings with no field in our prefs answer "unsupported". get wifi.pwd is refused to remote-CLI callers. The serial CLI falls through to the same handler, with upstream's buffer clamp. Kept ours, deliberately: transport and main.cpp, binary NodePrefs (JSON prefs and its unit test dropped), the _ui UI wiring (upstream's Listener interface is not registered), ui-new/ui-orig/ui-tiny, BLE PIN selection (upstream moved it into a main.cpp we do not use, so the auto-merge had dropped it), CAD and interference threshold off, T-Deck BME680 guard, FIRMWARE_VER_CODE 27. Auto-merge damage repaired: lost channel_name preamble and #endif in the display paths, dropped new-contact alert, upstream FEM/AGC prefs fields our prefs lack, a NULL _prefs deref in board CLI hooks (companion never attaches dynamic prefs), and the moved SerialWifiInterface include. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Hardware test: Heltec V4 (regular OLED, V4.2 FEM), MAC 8c:fd:49:b6:6a:4cAll of this was driven over USB with the companion protocol ( Upgrade path (v1.17.0.1+5dec5b2 with 27 contacts → this build, flashed component-wise, partition table unchanged)
Fresh device (
Not covered here: remote CLI from a second node (including the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings meshcomod onto MeshCore v1.18.0 (upstream
companion-v1.18.0,81dbae59) as a real merge, so the next upstream merge-base is exact again.Approach
meshcomod keeps its own transport (USB + TCP + WebSocket + BLE through
MultiTransportCompanionInterface, NimBLE, BLE/Wi-Fi coexistence), its binaryNodePrefs, its own AES and its CI. From upstream it takes the core and radio fixes and the new boards, and it adds 1.18's companion CLI on top, so the official app v1.50 works against meshcomod: its Command Line and its Wi-Fi Settings both run overCMD_RUN_CLI_COMMAND.Taken from upstream
MACThenDecryptrejects ciphertext that is not block-aligned (#1809), plusUtils::isZeroesCMD_SEND_RAW_DATAdecodes multi-byte path hashes (#3235); our zero-pathota urlinterception still runs firstCMD_SYNC_NEXT_MESSAGEnever reads upstream's offline queueTXT_TYPE_CLI_COMMAND, the remote-CLI contact permission, andsendCommandData(txt_type)board.loop()variant hook;rtc_clock.tick()is called exactly oncePUSH_CODE_BINARY_RESPONSE, clamped to the frame sizeCompanion CLI, on our prefs
CMD_RUN_CLI_COMMAND(66) /RESP_CODE_CLI_REPLY(29). Commands use upstream's syntax and reply formats:get/set name,set pin,ver,board,reboot,poweroff(pending contact writes are flushed first, asCMD_REBOOTdoes)get/set radio,get freq,af,dutycycle,tx,rxdelay,radio.rxgain,path.hash.mode,multi.acksset wifi.ssid,set wifi.pwd(reconnects live),get/set wifi.enabled,get wifi.status,get wifi.ip,get wifi.ssid,set wifi.clear,wifi.apply. These go through the NVS Wi-Fi store the on-device UI already uses, so the app and the device stay in agreementcad,int.thresh,agc.reset.interval,txdelay,direct.txdelay,tz.offset) answerError: unsupportedrather than anOKthat would not survive a rebootget wifi.pwdworks locally (app, serial) but is refused to remote-CLI callers, so a contact granted remote CLI cannot read the network passwordFIRMWARE_VER_CODEstays 27 (the app enables the CLI from 14).Kept ours, on purpose
main.cppand the whole transport layer. Upstream'sMultiSerialInterfacehas no USB, no WebSocket and no mDNS. Ethernet was already restored in fix: ThinkNode M7 support + three 1.17.0 merge regressions #47NodePrefs. Upstream moved to JSON prefs; adding fields to ours shifts the layout. Upstream's JSON prefs unit test is dropped with it_uiUI wiring. Upstream'sMyMesh::Listeneris present but not registered. All 24_ui->call sites are verified intactui-new,ui-origandui-tinyUIs. Upstream's discovery screen needs the Listener wiring, so it is not carriedmain.cppwe do not use, so the auto-merge had silently dropped it, which would have left every default device on PIN 0set radio.fem.rxgainworks at runtime but is not persistedAuto-merge damage found and repaired
#endifin the display paths were lost_prefsdereference in seven boards' CLI hooks. The companion never attaches dynamic prefs, soset radio.fem.rxgainwould have crashedSerialWifiInterfacemoved fromhelpers/esp32/tohelpers/wifi/, and the single-transport Wi-Fi include had not followedVerification
heltec_v4_companion_radio_wifipio test -e native -e native_kiss_modem: 54/54 passtxt_typeparameter, ctor init, the battery icon shift)Not in this PR (pre-existing on main)
The repeater and room-server envs do not build:
DisplayDriver's colour enum has been commented out since the 1.17 one-palette change, but those UIs still useDisplayDriver::LIGHTand friends. This merge does not touch those files. meshcomod only releases companion firmware.🤖 Generated with Claude Code