From 46a6b34bddc3970893ecc66bc55f302c77d84588 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Sat, 22 Aug 2026 11:54:52 +0200 Subject: [PATCH] switch defaults to sf7/cr5 --- releasenotes/RELEASE_NOTES_1.17.2-zephcore.md | 30 ++++++++++++++++++- zephcore/Repeater_CLI_commands.md | 4 +-- zephcore/app/ObserverMesh.cpp | 4 +-- zephcore/app/RepeaterDataStore.cpp | 4 +-- zephcore/app/main_observer.cpp | 2 +- zephcore/helpers/NodePrefs.h | 4 +-- zephcore/include/mesh/LoRaConfig.h | 4 +-- 7 files changed, 40 insertions(+), 12 deletions(-) diff --git a/releasenotes/RELEASE_NOTES_1.17.2-zephcore.md b/releasenotes/RELEASE_NOTES_1.17.2-zephcore.md index 2661d62..da5f06a 100644 --- a/releasenotes/RELEASE_NOTES_1.17.2-zephcore.md +++ b/releasenotes/RELEASE_NOTES_1.17.2-zephcore.md @@ -7,10 +7,38 @@ A small release. Most of it is fixes, and a few of them only matter on specific > a **T1000-E** (temperature and light sensors work again), or **any repeater** (1.17.1 broke guest logins > without a password). Everyone else can wait for the next release. > -> Upgrading from 1.17.1 is straightforward — your contacts, settings and phone pairing all survive. +> Upgrading from 1.17.1 is straightforward — your contacts, settings and phone pairing all survive. Note +> that the **factory default radio settings changed to SF7 / CR 4/5**; this affects fresh flashes and +> factory resets only, never a node that already has settings. --- +## New nodes start on SF7 / CR 4/5 + +A node with no saved settings — freshly flashed, or after a factory reset — now comes up on +**SF7, coding rate 4/5**. It was SF8 / 4/8. Frequency (869.618 MHz), bandwidth (62.5 kHz) and +transmit power are unchanged. + +Hungary moved its mesh to these settings, and ZephCore is aimed mainly at Hungarian users, so this is +now what a node uses out of the box. On SF7 / 4/5 a packet spends roughly a third of the time on air +that it did on SF8 / 4/8, which leaves the channel free for far more traffic. The trade is a little +less range on the weakest links. + +> [!IMPORTANT] +> **Nodes that already have settings are not touched.** Upgrading to 1.17.2 leaves your frequency, +> spreading factor, coding rate and power exactly as you set them. Nothing is rewritten and nothing +> needs checking afterwards. + +> [!WARNING] +> **A factory reset now leaves the node on SF7 / 4/5.** If your mesh still runs SF8 / 4/8, a node that +> has been reset will not hear it and will not be heard — radios only talk to other radios using the +> same settings. Put it back with `set radio 869.618,62.5,8,8` after a reset, or move the whole mesh to +> SF7 / 4/5. + +To change a node already in service, use `set radio ,,,` on a repeater (the four +values are comma-separated, and it needs a reboot to apply), or the radio settings screen in the phone +app for a companion. + ## Commands to your own node get their tick straight away When you send a command to your node's own chat contact (the one named `v` plus your node name), the app diff --git a/zephcore/Repeater_CLI_commands.md b/zephcore/Repeater_CLI_commands.md index 46c079e..ca310c9 100644 --- a/zephcore/Repeater_CLI_commands.md +++ b/zephcore/Repeater_CLI_commands.md @@ -184,7 +184,7 @@ Caveats: the `sys=` tally needs `CONFIG_ZEPHCORE_GPS_SAT_DIAG` (default on for r | Command | Description | |---------|-------------| -| `tempradio ` | Apply temporary radio parameters; automatically reverts after `timeout_mins`. Constraints: freq 150–2500 MHz, bw 7–500 kHz, sf 5–12, cr 5–8. Saved prefs are never mutated — concurrent `set` commands and reboots both restore the real saved values. | +| `tempradio ,,,,` | Apply temporary radio parameters; automatically reverts after `timeout_mins`. Constraints: freq 150–2500 MHz, bw 7–500 kHz, sf 5–12, cr 5–8. Saved prefs are never mutated — concurrent `set` commands and reboots both restore the real saved values. | --- @@ -272,7 +272,7 @@ Changes are persisted immediately unless noted. Some require a reboot. |---------|-------------|-------------| | `set name ` | No `[ ] \ : , ? *` | Set node name | | `set repeat ` | | Enable or disable packet forwarding | -| `set radio ` | freq 150–2500, bw 7–500, sf 5–12, cr 5–8 | Set radio params *(reboot required)* | +| `set radio ,,,` | freq 150–2500, bw 7–500, sf 5–12, cr 5–8 | **Comma-separated**, not space-separated — spaces parse as a single argument and the command is rejected. Set radio params *(reboot required)* | | `set freq ` | 150–2500 *(USB only)* | Set frequency alone *(reboot required)* | | `set tx ` | −9 to board max (default 30) | Set TX power | | `set lat ` | | Set stored latitude | diff --git a/zephcore/app/ObserverMesh.cpp b/zephcore/app/ObserverMesh.cpp index ec9a6c0..851f508 100644 --- a/zephcore/app/ObserverMesh.cpp +++ b/zephcore/app/ObserverMesh.cpp @@ -54,9 +54,9 @@ void ObserverMesh::begin(RepeaterDataStore *store, struct ObserverCreds *creds) /* Initialize prefs with observer-specific defaults */ initNodePrefs(&_prefs); - _prefs.cr = 5; /* CR 4/5 */ + _prefs.cr = 5; /* CR 4/5 (same as initNodePrefs; kept explicit) */ _prefs.tx_power_dbm = 0; /* observer never TXes anyway */ - /* freq=869.618, bw=62.5, sf=8 already set by initNodePrefs */ + /* freq=869.618, bw=62.5, sf=7 already set by initNodePrefs */ /* First boot has to be detected BEFORE loadPrefs(): the store is shared * with the repeater and its no-file branch re-runs initNodePrefs(), applies diff --git a/zephcore/app/RepeaterDataStore.cpp b/zephcore/app/RepeaterDataStore.cpp index f9651ae..2bbe5f6 100644 --- a/zephcore/app/RepeaterDataStore.cpp +++ b/zephcore/app/RepeaterDataStore.cpp @@ -260,8 +260,8 @@ bool RepeaterDataStore::loadPrefs(NodePrefs& prefs) { (double)prefs.freq, prefs.sf, (double)prefs.bw); prefs.freq = 869.618f; prefs.bw = 62.5f; - prefs.sf = 8; - prefs.cr = 8; + prefs.sf = 7; + prefs.cr = 5; prefs.tx_power_dbm = 22; } /* Everything else that came off flash — bounds, NaNs, and the char fields, diff --git a/zephcore/app/main_observer.cpp b/zephcore/app/main_observer.cpp index eaecd96..0c9b115 100644 --- a/zephcore/app/main_observer.cpp +++ b/zephcore/app/main_observer.cpp @@ -290,7 +290,7 @@ int main(void) { /* Initialize radio prefs with observer-specific defaults */ initNodePrefs(&s_radio_prefs); - s_radio_prefs.cr = 5; /* CR 4/5 (initNodePrefs sets 8) */ + s_radio_prefs.cr = 5; /* CR 4/5 (same as initNodePrefs; kept explicit) */ s_radio_prefs.tx_power_dbm = 0; /* observer never TXes */ strncpy(s_radio_prefs.node_name, "Observer", sizeof(s_radio_prefs.node_name) - 1); diff --git a/zephcore/helpers/NodePrefs.h b/zephcore/helpers/NodePrefs.h index 39e412f..7279c52 100644 --- a/zephcore/helpers/NodePrefs.h +++ b/zephcore/helpers/NodePrefs.h @@ -276,8 +276,8 @@ static inline void initNodePrefs(NodePrefs* prefs) { /* Radio params - MUST match LoRaConfig.h for interop with companion nodes */ prefs->freq = 869.618f; // LoRaConfig::FREQ_HZ / 1000000.0 prefs->bw = 62.5f; // LoRaConfig::BANDWIDTH - prefs->sf = 8; // LoRaConfig::SPREADING_FACTOR - prefs->cr = 8; // CR 4/8 (MeshCore uses 5-8 for CR 4/5 through 4/8) + prefs->sf = 7; // LoRaConfig::SPREADING_FACTOR + prefs->cr = 5; // CR 4/5 (MeshCore uses 5-8 for CR 4/5 through 4/8) #ifdef CONFIG_ZEPHCORE_DEFAULT_TX_POWER_DBM prefs->tx_power_dbm = CONFIG_ZEPHCORE_DEFAULT_TX_POWER_DBM; #else diff --git a/zephcore/include/mesh/LoRaConfig.h b/zephcore/include/mesh/LoRaConfig.h index e50fb43..524b567 100644 --- a/zephcore/include/mesh/LoRaConfig.h +++ b/zephcore/include/mesh/LoRaConfig.h @@ -12,8 +12,8 @@ namespace mesh { struct LoRaConfig { static constexpr uint32_t FREQ_HZ = 869618000; /* MeshCore default channel (EU 869 MHz ISM) */ static constexpr uint16_t BANDWIDTH = 62; /* BW_62_KHZ — MeshCore default */ - static constexpr uint8_t SPREADING_FACTOR = 8; /* SF8: balance of range vs airtime */ - static constexpr uint8_t CODING_RATE = 8; /* CR_4_8: max FEC */ + static constexpr uint8_t SPREADING_FACTOR = 7; /* SF7: HU regional default since 2026-08 */ + static constexpr uint8_t CODING_RATE = 5; /* CR_4_5: lowest overhead */ static constexpr uint16_t PREAMBLE_LEN = 16; /* MeshCore default; longer aids RX sync */ static constexpr int8_t TX_POWER_DBM = 22; /* SX1262 max */ };