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
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
id: rylr998_frame_sync
|
|
label: RYLR998 Frame Sync
|
|
category: '[RYLR998]/Synchronization'
|
|
flags: [python, cpp]
|
|
|
|
documentation: |-
|
|
LoRa frame synchronization block.
|
|
|
|
Detects preamble, extracts sync word (NETWORKID), locates SFD,
|
|
and outputs aligned data symbols.
|
|
|
|
Frame structure:
|
|
[Preamble: N upchirps at bin 0]
|
|
[Sync Word: 2 upchirps encoding NETWORKID nibbles]
|
|
[SFD: 2.25 downchirps]
|
|
[Data: encoded payload symbols]
|
|
|
|
Input: CSS-demodulated bin values
|
|
Output: Aligned data symbol bins + NETWORKID message
|
|
|
|
The NETWORKID is extracted from the sync word and can be used to
|
|
filter frames or identify the source device.
|
|
|
|
templates:
|
|
imports: from rylr998 import frame_sync
|
|
make: rylr998.frame_sync(sf=${sf}, sample_rate=${sample_rate}, expected_networkid=${expected_networkid})
|
|
|
|
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: expected_networkid
|
|
label: Expected NETWORKID
|
|
dtype: int
|
|
default: -1
|
|
hide: ${ 'part' if expected_networkid < 0 else 'none' }
|
|
|
|
- id: preamble_min
|
|
label: Min Preamble Symbols
|
|
dtype: int
|
|
default: 4
|
|
hide: part
|
|
|
|
inputs:
|
|
- label: in
|
|
domain: stream
|
|
dtype: complex
|
|
|
|
outputs:
|
|
- label: symbols
|
|
domain: message
|
|
dtype: int
|
|
optional: false
|
|
|
|
- label: networkid
|
|
domain: message
|
|
dtype: int
|
|
optional: true
|
|
|
|
file_format: 1
|