3 Commits
Author SHA1 Message Date
swaits dba6f264cd chore: release 1.1.0
CI / Test (all-features) (push) Canceled after 0s
CI / Test (default) (push) Canceled after 0s
CI / Test (no-default-features) (push) Canceled after 0s
CI / Clippy (all-features) (push) Canceled after 0s
CI / Clippy (default) (push) Canceled after 0s
CI / Clippy (no-default-features) (push) Canceled after 0s
CI / Format (push) Canceled after 0s
CI / Doc (push) Canceled after 0s
CI / Cargo Deny (push) Canceled after 0s
CI / Miri (push) Canceled after 0s
CI / Fuzz (60s per target) (push) Canceled after 0s
CI / Mutants (default) (push) Canceled after 0s
CI / Mutants (no-default-features) (push) Canceled after 0s
2026-04-22 11:45:21 -06:00
swaits acf715b3f0 feat: auto-resume RX across SET_CONFIG (no more re-issue of RX_START)
Spec §3.5 and §6.3 (SET_CONFIG side effects) previously required the host to re-issue RX_START after any successful SET_CONFIG, because the radio was unconditionally left in idle. That chore is hostile to scanner, time-division, and dynamic-modulation use cases and violates the principle of least surprise.


Update the normative text so that SET_CONFIG applied while the radio is in continuous RX auto-re-arms RX with the new parameters once reconfiguration completes. RX ring is still cleared (stale packets from the old modulation are not semantically meaningful). The OK response is still held until the radio is ready, so hosts may TX / RX immediately after it.


Behavior when RX was not active on SET_CONFIG is unchanged: radio lands in idle. No wire-format change. Old hosts that re-issue RX_START after SET_CONFIG keep working (the redundant call is a no-op OK on a radio already in Receiving).
2026-04-22 11:44:53 -06:00
swaits 66a2484aeb ci: update fuzz target list to the v2 names
The Fuzz workflow step was still iterating the old v0.1 target names (parse_radio_config, cobs_decoder_feed, cobs_roundtrip, command_roundtrip, cobs_decoder_multi_frame, cobs_chunk_invariant). After the Protocol v2 rewrite only five targets exist: decoder_feed, frame_roundtrip, lora_config_roundtrip, parse_command, parse_device_message. Update the workflow to match.
2026-04-22 10:33:06 -06:00
4 changed files with 39 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ jobs:
- name: Smoke-run every target
working-directory: fuzz
run: |
for target in parse_command parse_radio_config cobs_decoder_feed cobs_roundtrip command_roundtrip cobs_decoder_multi_frame cobs_chunk_invariant; do
for target in decoder_feed frame_roundtrip lora_config_roundtrip parse_command parse_device_message; do
echo "── $target ──"
cargo +nightly fuzz run "$target" --target x86_64-unknown-linux-gnu -- -max_total_time=60
done
+35
View File
@@ -4,6 +4,41 @@ All notable changes to this crate are documented here. The format
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
this project adheres to [Semantic Versioning](https://semver.org/).
## 1.1.0 — 2026-04-22
Spec-only release. No code change in the crate; `PROTOCOL.md`
normative behavior is amended so `SET_CONFIG` no longer disrupts
continuous RX.
### Changed
- `PROTOCOL.md` §3.5 ("Operations Spanning Reconfiguration") and
§6.3 ("Side effects on `APPLIED`"): a `SET_CONFIG` issued while
the radio is in continuous RX now **auto-re-arms RX** with the
new parameters once reconfiguration completes. The RX ring is
still cleared. The host does **not** need to re-issue `RX_START`
after `SET_CONFIG`.
Rationale: the previous "RX is stopped, re-issue RX_START
yourself" rule was hostile to scanner / time-division /
dynamic-modulation workflows and violated the principle of least
surprise. Scope of the change is strictly additive: hosts that
still issue a redundant `RX_START` after `SET_CONFIG` continue
to work (firmware replies `OK` with the radio already in
Receiving).
- No wire-format, field-layout, or `type_id` changes. The CRC, COBS
framing, tag semantics, and every message shape are byte-for-byte
identical to 1.0.0.
### Compatibility
- Wire-compatible with 1.0.0 firmware and hosts.
- Behavior-compatible with 1.0.0 hosts (old-style "always re-issue
RX_START" code paths are now no-ops but still correct).
- New-style hosts that rely on auto-resume **require** firmware
`donglora 1.1.0` or later, which implements the new semantics.
## 1.0.0 — 2026-04-22
The 1.0 wire-format rewrite. Every message shape, tag-correlation
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "donglora-protocol"
version = "1.0.0"
version = "1.1.0"
edition = "2024"
rust-version = "1.85"
authors = ["Stephen Waits <steve@waits.net>"]
+2 -3
View File
@@ -200,7 +200,7 @@ A client whose inactivity timer has fired is considered disconnected. Transport-
### 3.5 Operations Spanning Reconfiguration
**`SET_CONFIG` while a TX is on the air**: the in-progress TX is allowed to physically complete. Its `TX_DONE` is emitted normally. Any queued-but-not-yet-started TXs are cancelled and emit `TX_DONE(result=CANCELLED)`. Continuous RX, if active, is aborted. RX ring is cleared. New configuration takes effect after the in-flight TX finishes.
**`SET_CONFIG` while a TX is on the air**: the in-progress TX is allowed to physically complete. Its `TX_DONE` is emitted normally. Any queued-but-not-yet-started TXs are cancelled and emit `TX_DONE(result=CANCELLED)`. The RX ring is cleared. If the radio was in continuous RX when `SET_CONFIG` was issued, RX is automatically re-armed with the new parameters once the in-flight TX finishes and the radio has completed reconfiguration; the host does **not** need to re-issue `RX_START`. New configuration takes effect after the in-flight TX finishes.
**`SET_CONFIG` validation failure (`ERR(EPARAM)`, `ERR(ELENGTH)`, `ERR(EMODULATION)`)**: the chip is not touched. All parameters are validated before any SPI write to the radio. If validation fails, the radio and state machine are unchanged.
@@ -381,9 +381,8 @@ Offset Size Field Description
**Side effects on `APPLIED`**:
- Any in-progress TX is allowed to finish; its `TX_DONE` is emitted normally.
- All queued (not yet started) TXs are cancelled with `TX_DONE(result=CANCELLED)`.
- Any continuous RX is stopped.
- RX ring is cleared.
- Radio is reconfigured, calibrated if required, and left in idle. The `OK` response is not emitted until this sequence completes.
- Radio is reconfigured and calibrated if required. If the radio was in continuous RX when `SET_CONFIG` was issued, RX is automatically re-armed with the new parameters once reconfiguration completes; otherwise the radio is left in idle. Either way, the `OK` response is not emitted until this sequence finishes, so the host may issue TX / RX commands immediately after `OK`.
**Notes**:
- **Auto-LDRO**: For LoRa, the device automatically enables Low Data Rate Optimization when `(2^SF) / BW_Hz > 16 ms` (the Semtech-recommended threshold). The host does not specify LDRO and is not informed of its state.