From 1e2b34c367496f66b5465893fef21a741ccf9dc7 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Wed, 8 Apr 2026 14:14:07 -0600 Subject: [PATCH] fix: replace broken quick-start snippet with real API (packet listener with RSSI/SNR) --- src/pages/index.astro | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 89eb38f..dbb7fcf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -175,13 +175,18 @@ your code ──► client library ──┘
  • 3.
    -

    Send your first packet

    +

    Listen for packets

    from donglora import DongLoRa
    +          >import donglora as dl
     
    -radio = DongLoRa()
    -radio.send(b"hello lora")
    +ser = dl.connect() +dl.send(ser, "SetConfig", config=dl.DEFAULT_CONFIG) +dl.send(ser, "StartRx") + +while pkt := dl.recv(ser): + p = pkt["payload"] + print(f'{pkt["rssi"]:4d}dBm {pkt["snr"]:3d}dB {p.hex()}')