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
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
"""gr-rylr998: GNU Radio OOT module for RYLR998 LoRa modems.
|
|
|
|
Provides complete TX/RX blocks for RYLR998 LoRa modems with support for
|
|
the reverse-engineered NETWORKID → sync word mapping.
|
|
|
|
Blocks:
|
|
- css_demod: CSS demodulator (FFT peak detection)
|
|
- css_mod: CSS modulator (chirp generation)
|
|
- frame_sync: Preamble + sync word detection
|
|
- frame_gen: Header + preamble + SFD generation
|
|
- phy_decode: Gray decode → deinterleave → Hamming → dewhiten
|
|
- phy_encode: Whiten → Hamming → interleave → Gray encode
|
|
|
|
Utilities:
|
|
- networkid: NETWORKID ↔ sync word conversion
|
|
"""
|
|
|
|
from .networkid import (
|
|
networkid_to_sync_word,
|
|
sync_word_to_networkid,
|
|
sync_word_byte_to_deltas,
|
|
)
|
|
from .css_demod import CSSDemod
|
|
from .css_mod import CSSMod
|
|
from .phy_decode import PHYDecode, LoRaFrame
|
|
from .phy_encode import PHYEncode
|
|
from .frame_sync import FrameSync
|
|
from .frame_gen import FrameGen
|
|
|
|
__version__ = "0.1.0"
|
|
__all__ = [
|
|
"networkid_to_sync_word",
|
|
"sync_word_to_networkid",
|
|
"sync_word_byte_to_deltas",
|
|
"CSSDemod",
|
|
"CSSMod",
|
|
"PHYDecode",
|
|
"PHYEncode",
|
|
"FrameSync",
|
|
"FrameGen",
|
|
"LoRaFrame",
|
|
]
|