GNU Radio Out-of-Tree module providing: - Complete TX chain: PHYEncode → FrameGen → CSSMod - Complete RX chain: CSSDemod → FrameSync → PHYDecode - NETWORKID extraction/encoding (0-255 range) - All SF (7-12) and CR (4/5-4/8) combinations - Loopback tested with 24/24 configurations passing Key features: - Fractional SFD (2.25 downchirp) handling - Gray encode/decode with proper inverse operations - gr-lora_sdr compatible decode modes - GRC block definitions and example flowgraphs - Comprehensive documentation Discovered RYLR998 sync word mapping: sync_bin_1 = (NETWORKID >> 4) * 8 sync_bin_2 = (NETWORKID & 0x0F) * 8
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
id: rylr998_rx
|
|
label: RYLR998 Receiver
|
|
category: '[RYLR998]'
|
|
flags: [python]
|
|
|
|
documentation: |-
|
|
Complete RYLR998 LoRa receiver chain.
|
|
|
|
This hierarchical block combines all RX components:
|
|
IQ Source → CSS Demod → Frame Sync → PHY Decode → Payload
|
|
|
|
Processes complex IQ samples and outputs decoded payload bytes
|
|
along with frame metadata (NETWORKID, CRC status, etc.)
|
|
|
|
Key features:
|
|
- NETWORKID extraction from sync word
|
|
- Carrier frequency offset estimation
|
|
- Hamming FEC error correction
|
|
- CRC verification
|
|
- Optional NETWORKID filtering
|
|
|
|
Typical use: Connect SDR source → RYLR998 RX → Message Debug/File Sink
|
|
|
|
templates:
|
|
imports: |-
|
|
from rylr998 import CSSDemod, FrameSync, PHYDecode, LoRaFrame
|
|
import numpy as np
|
|
make: |
|
|
# RYLR998 RX Hier Block
|
|
self.css_demod = CSSDemod(sf=${sf}, sample_rate=${sample_rate}, bw=${bw})
|
|
self.frame_sync = FrameSync(sf=${sf}, sample_rate=${sample_rate}, bw=${bw},
|
|
expected_networkid=${expected_networkid} if ${expected_networkid} >= 0 else None)
|
|
self.phy_decode = PHYDecode(sf=${sf}, cr=${cr}, has_crc=${has_crc}, ldro=${ldro})
|
|
|
|
parameters:
|
|
- id: sf
|
|
label: Spreading Factor
|
|
dtype: int
|
|
default: 9
|
|
options: [7, 8, 9, 10, 11, 12]
|
|
option_labels: ['SF7', 'SF8', 'SF9', 'SF10', 'SF11', 'SF12']
|
|
|
|
- id: sample_rate
|
|
label: Sample Rate (Hz)
|
|
dtype: real
|
|
default: 250e3
|
|
|
|
- id: bw
|
|
label: Bandwidth (Hz)
|
|
dtype: real
|
|
default: 125e3
|
|
|
|
- id: cr
|
|
label: Coding Rate
|
|
dtype: int
|
|
default: 1
|
|
options: [1, 2, 3, 4]
|
|
option_labels: ['4/5', '4/6', '4/7', '4/8']
|
|
|
|
- id: has_crc
|
|
label: CRC Enabled
|
|
dtype: bool
|
|
default: 'True'
|
|
|
|
- id: ldro
|
|
label: Low Data Rate Opt
|
|
dtype: bool
|
|
default: 'False'
|
|
|
|
- id: expected_networkid
|
|
label: Expected NETWORKID
|
|
dtype: int
|
|
default: -1
|
|
hide: part
|
|
|
|
inputs:
|
|
- label: in
|
|
domain: stream
|
|
dtype: complex
|
|
|
|
outputs:
|
|
- label: payload
|
|
domain: message
|
|
dtype: byte
|
|
|
|
- label: frame_info
|
|
domain: message
|
|
optional: true
|
|
|
|
file_format: 1
|