mirror of
https://github.com/smittix/intercept.git
synced 2026-07-21 07:48:11 -07:00
Add bias_t parameter to build_ism_command()
Same fix as build_fm_demod_command() - the parameter was being passed but not defined in the method signatures. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -126,7 +126,8 @@ class AirspyCommandBuilder(CommandBuilder):
|
|||||||
device: SDRDevice,
|
device: SDRDevice,
|
||||||
frequency_mhz: float = 433.92,
|
frequency_mhz: float = 433.92,
|
||||||
gain: Optional[float] = None,
|
gain: Optional[float] = None,
|
||||||
ppm: Optional[int] = None
|
ppm: Optional[int] = None,
|
||||||
|
bias_t: bool = False
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
||||||
@@ -145,6 +146,9 @@ class AirspyCommandBuilder(CommandBuilder):
|
|||||||
if gain is not None and gain > 0:
|
if gain is not None and gain > 0:
|
||||||
cmd.extend(['-g', str(int(gain))])
|
cmd.extend(['-g', str(int(gain))])
|
||||||
|
|
||||||
|
if bias_t:
|
||||||
|
cmd.extend(['-T'])
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
def get_capabilities(self) -> SDRCapabilities:
|
def get_capabilities(self) -> SDRCapabilities:
|
||||||
|
|||||||
+3
-1
@@ -138,7 +138,8 @@ class CommandBuilder(ABC):
|
|||||||
device: SDRDevice,
|
device: SDRDevice,
|
||||||
frequency_mhz: float = 433.92,
|
frequency_mhz: float = 433.92,
|
||||||
gain: Optional[float] = None,
|
gain: Optional[float] = None,
|
||||||
ppm: Optional[int] = None
|
ppm: Optional[int] = None,
|
||||||
|
bias_t: bool = False
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Build ISM band decoder command (433MHz sensors).
|
Build ISM band decoder command (433MHz sensors).
|
||||||
@@ -148,6 +149,7 @@ class CommandBuilder(ABC):
|
|||||||
frequency_mhz: Center frequency in MHz (default 433.92)
|
frequency_mhz: Center frequency in MHz (default 433.92)
|
||||||
gain: Gain in dB (None for auto)
|
gain: Gain in dB (None for auto)
|
||||||
ppm: PPM frequency correction
|
ppm: PPM frequency correction
|
||||||
|
bias_t: Enable bias-T power (for active antennas)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Command as list of strings for subprocess
|
Command as list of strings for subprocess
|
||||||
|
|||||||
+5
-1
@@ -123,7 +123,8 @@ class HackRFCommandBuilder(CommandBuilder):
|
|||||||
device: SDRDevice,
|
device: SDRDevice,
|
||||||
frequency_mhz: float = 433.92,
|
frequency_mhz: float = 433.92,
|
||||||
gain: Optional[float] = None,
|
gain: Optional[float] = None,
|
||||||
ppm: Optional[int] = None
|
ppm: Optional[int] = None,
|
||||||
|
bias_t: bool = False
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
||||||
@@ -142,6 +143,9 @@ class HackRFCommandBuilder(CommandBuilder):
|
|||||||
if gain is not None and gain > 0:
|
if gain is not None and gain > 0:
|
||||||
cmd.extend(['-g', str(int(gain))])
|
cmd.extend(['-g', str(int(gain))])
|
||||||
|
|
||||||
|
if bias_t:
|
||||||
|
cmd.extend(['-T'])
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
def get_capabilities(self) -> SDRCapabilities:
|
def get_capabilities(self) -> SDRCapabilities:
|
||||||
|
|||||||
@@ -104,12 +104,14 @@ class LimeSDRCommandBuilder(CommandBuilder):
|
|||||||
device: SDRDevice,
|
device: SDRDevice,
|
||||||
frequency_mhz: float = 433.92,
|
frequency_mhz: float = 433.92,
|
||||||
gain: Optional[float] = None,
|
gain: Optional[float] = None,
|
||||||
ppm: Optional[int] = None
|
ppm: Optional[int] = None,
|
||||||
|
bias_t: bool = False
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
Build rtl_433 command with SoapySDR support for ISM band decoding.
|
||||||
|
|
||||||
rtl_433 has native SoapySDR support via -d flag.
|
rtl_433 has native SoapySDR support via -d flag.
|
||||||
|
Note: LimeSDR does not support bias-T, parameter is ignored.
|
||||||
"""
|
"""
|
||||||
device_str = self._build_device_string(device)
|
device_str = self._build_device_string(device)
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -115,7 +115,8 @@ class RTLSDRCommandBuilder(CommandBuilder):
|
|||||||
device: SDRDevice,
|
device: SDRDevice,
|
||||||
frequency_mhz: float = 433.92,
|
frequency_mhz: float = 433.92,
|
||||||
gain: Optional[float] = None,
|
gain: Optional[float] = None,
|
||||||
ppm: Optional[int] = None
|
ppm: Optional[int] = None,
|
||||||
|
bias_t: bool = False
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Build rtl_433 command for ISM band sensor decoding.
|
Build rtl_433 command for ISM band sensor decoding.
|
||||||
@@ -135,6 +136,9 @@ class RTLSDRCommandBuilder(CommandBuilder):
|
|||||||
if ppm is not None and ppm != 0:
|
if ppm is not None and ppm != 0:
|
||||||
cmd.extend(['-p', str(ppm)])
|
cmd.extend(['-p', str(ppm)])
|
||||||
|
|
||||||
|
if bias_t:
|
||||||
|
cmd.extend(['-T'])
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
def get_capabilities(self) -> SDRCapabilities:
|
def get_capabilities(self) -> SDRCapabilities:
|
||||||
|
|||||||
Reference in New Issue
Block a user