20 Commits
Author SHA1 Message Date
swaits 61eb2cfeba chore: depend on published donglora from PyPI
Drop the [tool.uv.sources] override that pointed donglora at the
sibling client-py checkout. uv.lock now resolves donglora from
pypi.org, so example consumers get the published package.
v1.0.1
2026-04-25 20:53:06 -06:00
swaits 32105c6b28 chore: release 1.0.0 v1.0.0 2026-04-22 09:59:16 -06:00
swaits 978553e5ac feat!: examples on donglora 1.0 async API with shared _common helpers
Rewrite all scripts against the DongLoRa Protocol v2 async Dongle surface, and extract the shared MeshCore US preset into a single module.

* _common.py: MESHCORE_US preset (910.525 MHz / BW 62.5 / SF 7 / CR 4/5 / sync 0x1424 / 20 dBm) plus small helpers, imported by every example.

* New: explore.py, which prints the device capabilities and runs a single TX + RX roundtrip for quick hardware validation.

* simple_rx.py, simple_tx.py, ping_pong.py, lora_bridge.py all switch to donglora.Dongle and the new Modulation / LoRaConfig types.

* all_commands.py removed; it was an index of the old v0.1 command enum that no longer exists after the Protocol v2 split.

* justfile: drop stale recipes that referenced removed scripts.
2026-04-22 09:59:16 -06:00
swaitsandClaude Opus 4.6 80c02788cc docs: fix dependency link, remove stale recipe references
- clients/python → client-py GitHub link
- Removed meshcore/orac/telemetry recipes from README (scripts never existed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:46:11 -06:00
swaitsandClaude Opus 4.6 ef8261da57 fix: update dependency path, remove dead recipes, apply lint fixes
Fixed broken dependency path (../clients/python -> ../client-py).
Added strict ruff config. Removed dead meshcore/orac/telemetry
justfile recipes (scripts never existed). Applied SIM105
(contextlib.suppress) and I001 (import sorting) lint fixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:34:00 -06:00
swaits b3e8f07459 chore: add consistent mise.toml, justfile, and tooling config 2026-04-07 14:41:28 -06:00
swaitsandClaude Opus 4.6 8b0f161a89 feat(examples): add SNR-based packet filtering to LoRa bridge
Drop INVALID and UNRELIABLE packets per PROTOCOL.md quality grading
to avoid retransmitting likely-corrupt data. MARGINAL packets are
forwarded with a warning tag. All RX log lines now include SNR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:33:56 -06:00
swaits fe69e2cf7d docs: add cd examples, mux usage, and Linux device permissions to READMEs 2026-04-03 10:43:28 -06:00
swaits f2d01e93a0 chore: massive repo reorganization 2026-04-03 10:28:38 -06:00
swaitsandClaude Opus 4.6 33c42a120e chore: tooling improvements
- Add cargo-binutils to mise.toml (needed for `just size`)
- Remove jj from mise.toml (optional, not a build dependency)
- Silence `mise install` output when tools are current (--quiet)
- Add `just outdated` recipe with embassy-executor exclusion
  (esp-rtos 0.2 pins embassy-executor ^0.9; 0.10 renamed arch-*
  features to platform-*, which crashes cargo-outdated)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:57:44 -06:00
swaits aa33609bc1 chore: update tooling (mise, justfile, examples)
Add mise.toml for tool version management, rename Justfile to justfile,
add examples/justfile for running Python examples, and update docs.
2026-03-31 17:31:47 -06:00
swaits ff43d72cfc feat: GetMac command + MacAddress response
New protocol command (tag 8): GetMac returns the board's 6-byte hardware
address. Useful when multiple dongles are connected to one host.

Response (tag 6): MacAddress containing 6 raw bytes.

Updated: PROTOCOL.md, CHANGELOG, donglora.py decoder, all_commands.py.
2026-03-30 09:08:59 -06:00
swaits d6087f278e feat: lora_bridge.py — two-way LoRa bridge over TCP (Tailscale, WireGuard, etc.) 2026-03-30 08:51:15 -06:00
swaits 6359b16135 feat: decode Config response in donglora.py, add all_commands.py example
Config response (GetConfig) now returns decoded RadioConfig fields instead
of raw hex. New all_commands.py exercises all 8 protocol commands in
sequence — Ping, SetConfig, GetConfig, StartRx, StopRx, Transmit,
DisplayOff, DisplayOn.
2026-03-29 22:24:46 -06:00
swaits 84be92f263 fix: handle SerialException gracefully in all example scripts
All examples now catch serial.SerialException instead of crashing with
a traceback. This covers port contention (multiple processes), device
disconnect, and USB errors. meshcore_rx.py already had this.
2026-03-29 22:01:20 -06:00
swaits 68753b5dfe fix: remove stale postcard/serde references from README, DESIGN.md, CHANGELOG, donglora.py 2026-03-29 21:47:03 -06:00
swaits c596271748 refactor: update Python examples for fixed-size LE wire format
Remove all varint/zigzag encoding. Every field is now struct.pack/unpack
with fixed-size little-endian format strings. RadioConfig is a single
struct.pack('<IBBBHB', ...) call. Response decoding uses struct.unpack_from
with known offsets. No encoding helpers needed beyond struct.
2026-03-29 20:42:59 -06:00
swaits 5f47fff2c3 feat: per-board TX power range, TX_POWER_MAX sentinel (-128)
- Each board exports TX_POWER_RANGE constant (min, max dBm)
- RadioConfig::validate() uses the board's range, not hardcoded limits
- TX_POWER_MAX sentinel (-128 on the wire) means "use board's maximum"
  — resolved to the actual max before storing config
- GetConfig returns the resolved actual power, not the sentinel
- Default configs in examples use TX_POWER_MAX
- Protocol docs updated
2026-03-29 20:42:58 -06:00
swaits 30331d5204 fix: correct postcard encoding for u8/i8 fields (was using varint/zigzag)
ROOT CAUSE: postcard encodes u8 and i8 as raw bytes, NOT varint/zigzag.
The Python encoders used varint() for u8 and zigzag() for i8. For small
values this was silently correct (varint(7) == raw byte 7), but for
tx_power_dbm: zigzag(14) = 28, which the new validation correctly
rejected as out of range (-9..22). This was a pre-existing bug masked
by the absence of validation.

Fix all RadioConfig field encoders in both donglora.py and meshcore_rx.py.
Fix docs/PROTOCOL.md to correctly document i8 as raw byte, not zigzag.
Restore full config validation.
2026-03-29 20:42:58 -06:00
swaits 17721cc660 feat: example scripts (simple_rx, simple_tx, ping_pong) with shared donglora.py helper 2026-03-29 20:42:58 -06:00