mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-01 20:38:19 +00:00
switch defaults to sf7/cr5
This commit is contained in:
@@ -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 <freq>,<bw>,<sf>,<cr>` 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
|
||||
|
||||
@@ -184,7 +184,7 @@ Caveats: the `sys=` tally needs `CONFIG_ZEPHCORE_GPS_SAT_DIAG` (default on for r
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `tempradio <freq> <bw> <sf> <cr> <timeout_mins>` | 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 <freq>,<bw>,<sf>,<cr>,<timeout_mins>` | 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 <name>` | No `[ ] \ : , ? *` | Set node name |
|
||||
| `set repeat <on\|off>` | | Enable or disable packet forwarding |
|
||||
| `set radio <freq> <bw> <sf> <cr>` | freq 150–2500, bw 7–500, sf 5–12, cr 5–8 | Set radio params *(reboot required)* |
|
||||
| `set radio <freq>,<bw>,<sf>,<cr>` | 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 <mhz>` | 150–2500 *(USB only)* | Set frequency alone *(reboot required)* |
|
||||
| `set tx <dbm>` | −9 to board max (default 30) | Set TX power |
|
||||
| `set lat <latitude>` | | Set stored latitude |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user