diff --git a/data/azure-pipelines.yml b/data/azure-pipelines.yml
index daba7636..e0c41231 100644
--- a/data/azure-pipelines.yml
+++ b/data/azure-pipelines.yml
@@ -252,9 +252,12 @@ jobs:
displayName: "Install build dependencies"
- script: |
- brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8d748e26ccc9afc8ea0d0201ae234fda35de721e/Formula/boost.rb
+ echo "Reinstall icu4c"
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/a806a621ed3722fb580a58000fb274a2f2d86a6d/Formula/icu4c.rb
+ echo "Link icu4c"
brew link icu4c --force
+ echo "Install boost"
+ brew install --force --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/8d748e26ccc9afc8ea0d0201ae234fda35de721e/Formula/boost.rb
cd /tmp
wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2
tar xf libusb-1.0.22.tar.bz2
diff --git a/data/ui/send_recv_device_settings.ui b/data/ui/send_recv_device_settings.ui
index 3ec97a26..e074e4f3 100644
--- a/data/ui/send_recv_device_settings.ui
+++ b/data/ui/send_recv_device_settings.ui
@@ -6,8 +6,8 @@
0
0
- 860
- 754
+ 859
+ 741
@@ -81,19 +81,10 @@ QGroupBox::indicator:checked {
0
- -
-
-
- <html><head/><body><p>Set the frequency correction in <span style=" font-weight:600;">ppm</span>. If you do not know what to enter here, just leave it to one.</p></body></html>
-
-
- -1000
-
-
- 1000
-
-
- 1
+
-
+
+
+ Antenna:
@@ -107,129 +98,33 @@ QGroupBox::indicator:checked {
- -
-
-
-
-
-
- <html><head/><body><p>The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by <span style=" font-weight:600;">complex downsampling</span>.</p></body></html>
-
-
- 0
-
-
- Qt::Horizontal
-
-
- false
-
-
- false
-
-
- QSlider::NoTicks
-
-
- 0
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- <html><head/><body><p>The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by <span style=" font-weight:600;">complex downsampling</span>.</p></body></html>
-
-
-
-
-
- -
-
-
- Bandwidth (Hz):
-
-
-
- -
-
+
-
+
- <html><head/><body><p>Set the frequency correction in <span style=" font-weight:600;">ppm</span>. If you do not know what to enter here, just leave it to one.</p></body></html>
-
-
- Frequency correction:
+ <html><head/><body><p>Configure the subdevice of your USRP. For example, <span style=" font-weight:600;">B:0 </span>to select a WBX on slot B. You can learn more at <a href="http://files.ettus.com/manual/page_configuration.html#config_subdev"><span style=" text-decoration: underline; color:#2980b9;">http://files.ettus.com/manual/page_configuration.html#config_subdev.</span></a></p></body></html>
- -
-
+
-
+
+
+ 10
+
+
+ 0.001000000000000
+
+
+ 1000000000000.000000000000000
+
+
+
+ -
+
- <html><head/><body><p>The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.</p></body></html>
+ <html><head/><body><p>Configure the subdevice of your USRP. For example, <span style=" font-weight:600;">B:0 </span>to select a WBX on slot B. You can learn more at <a href="http://files.ettus.com/manual/page_configuration.html#config_subdev"><span style=" text-decoration: underline; color:#2980b9;">http://files.ettus.com/manual/page_configuration.html#config_subdev.</span></a></p></body></html>
- Gain:
-
-
-
- -
-
-
- <html><head/><body><p>You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will <span style=" font-weight:600;">automatically</span> select an attached SDR of the configured type if you leave this value empty.</p></body></html>
-
-
- true
-
-
- QComboBox::NoInsert
-
-
-
- -
-
-
- Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero.
-
-
- DC correction:
-
-
-
- -
-
-
- <html><head/><body><p>You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will <span style=" font-weight:600;">automatically</span> select an attached SDR of the configured type if you leave this value empty.</p></body></html>
-
-
- Device Identifier:
-
-
-
- -
-
-
- Port number:
-
-
-
- -
-
-
- <html><head/><body><p>The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.</p></body></html>
-
-
- IF Gain:
-
-
-
- -
-
-
- Device:
+ <html><head/><body><p>Subdevice:</p></body></html>
@@ -249,10 +144,10 @@ QGroupBox::indicator:checked {
- -
-
+
-
+
- Antenna:
+ 127.0.0.1
@@ -270,73 +165,20 @@ QGroupBox::indicator:checked {
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ <html><head/><body><p>Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The<span style=" font-weight:600;"> native backend</span> is recommended, when using this setting.</p></body></html>
-
-
-
- USRP
-
-
- -
-
- HackRF
-
-
-
-
- -
-
- 127.0.0.1
+ Direct sampling:
- -
-
+
-
+
- IP address:
-
-
-
- -
-
-
- Frequency (Hz):
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- ...
-
-
-
- :/icons/icons/lock.svg:/icons/icons/lock.svg
-
-
-
- 16
- 16
-
-
-
- true
-
-
- true
+ Bandwidth (Hz):
@@ -385,69 +227,6 @@ QGroupBox::indicator:checked {
- -
-
-
- 1
-
-
- 65535
-
-
- 1234
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The<span style=" font-weight:600;"> native backend</span> is recommended, when using this setting.</p></body></html>
-
-
-
- -
-
-
- <html><head/><body><p>Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The<span style=" font-weight:600;"> native backend</span> is recommended, when using this setting.</p></body></html>
-
-
- Direct sampling:
-
-
-
- -
-
-
- Repeat:
-
-
-
- -
-
-
- Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero.
-
-
- Apply DC correction
-
-
- true
-
-
-
- -
-
-
- -
-
-
- Channel:
-
-
-
-
@@ -482,7 +261,50 @@ QGroupBox::indicator:checked {
- -
+
-
+
+
+ <html><head/><body><p>Set the frequency correction in <span style=" font-weight:600;">ppm</span>. If you do not know what to enter here, just leave it to one.</p></body></html>
+
+
+ Frequency correction:
+
+
+
+ -
+
+
+ <html><head/><body><p>You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will <span style=" font-weight:600;">automatically</span> select an attached SDR of the configured type if you leave this value empty.</p></body></html>
+
+
+ true
+
+
+ QComboBox::NoInsert
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
-
+
+ USRP
+
+
+ -
+
+ HackRF
+
+
+
+
+ -
Infinite
@@ -492,6 +314,55 @@ QGroupBox::indicator:checked {
+ -
+
+
-
+
+
+ <html><head/><body><p>The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by <span style=" font-weight:600;">complex downsampling</span>.</p></body></html>
+
+
+ 0
+
+
+ Qt::Horizontal
+
+
+ false
+
+
+ false
+
+
+ QSlider::NoTicks
+
+
+ 0
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ <html><head/><body><p>The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by <span style=" font-weight:600;">complex downsampling</span>.</p></body></html>
+
+
+
+
+
+ -
+
+
+ Port number:
+
+
+
-
@@ -505,33 +376,182 @@ QGroupBox::indicator:checked {
- -
-
-
- 10
-
-
- 0.001000000000000
-
-
- 1000000000000.000000000000000
-
-
-
- -
-
+
-
+
- <html><head/><body><p>Configure the subdevice of your USRP. For example, <span style=" font-weight:600;">B:0 </span>to select a WBX on slot B. You can learn more at <a href="http://files.ettus.com/manual/page_configuration.html#config_subdev"><span style=" text-decoration: underline; color:#2980b9;">http://files.ettus.com/manual/page_configuration.html#config_subdev.</span></a></p></body></html>
+ <html><head/><body><p>The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.</p></body></html>
- <html><head/><body><p>Subdevice:</p></body></html>
+ Gain:
- -
-
+
-
+
- <html><head/><body><p>Configure the subdevice of your USRP. For example, <span style=" font-weight:600;">B:0 </span>to select a WBX on slot B. You can learn more at <a href="http://files.ettus.com/manual/page_configuration.html#config_subdev"><span style=" text-decoration: underline; color:#2980b9;">http://files.ettus.com/manual/page_configuration.html#config_subdev.</span></a></p></body></html>
+ Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero.
+
+
+ Apply DC correction
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p>You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will <span style=" font-weight:600;">automatically</span> select an attached SDR of the configured type if you leave this value empty.</p></body></html>
+
+
+ Device Identifier:
+
+
+
+ -
+
+
+ -
+
+
+ Frequency (Hz):
+
+
+
+ -
+
+
+ 1
+
+
+ 65535
+
+
+ 1234
+
+
+
+ -
+
+
+ IP address:
+
+
+
+ -
+
+
+ <html><head/><body><p>Set the frequency correction in <span style=" font-weight:600;">ppm</span>. If you do not know what to enter here, just leave it to one.</p></body></html>
+
+
+ -1000
+
+
+ 1000
+
+
+ 1
+
+
+
+ -
+
+
+ Repeat:
+
+
+
+ -
+
+
+ <html><head/><body><p>Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The<span style=" font-weight:600;"> native backend</span> is recommended, when using this setting.</p></body></html>
+
+
+
+ -
+
+
+ Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero.
+
+
+ DC correction:
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.</p></body></html>
+
+
+ IF Gain:
+
+
+
+ -
+
+
+ Channel:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ ...
+
+
+
+ :/icons/icons/lock.svg:/icons/icons/lock.svg
+
+
+
+ 16
+ 16
+
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Device:
+
+
+
+ -
+
+
+ <html><head/><body><p>Enable the bias tee of your SDR, if you have an external LNA connected. Leave this disabled if you have no external LNA attached.</p></body></html>
+
+
+ Bias Tee:
+
+
+
+ -
+
+
+ <html><head/><body><p>Enable the bias tee of your SDR, if you have an external LNA connected. Leave this disabled if you have no external LNA attached.</p></body></html>
+
+
+ Enable Bias Tee
diff --git a/src/urh/controller/widgets/DeviceSettingsWidget.py b/src/urh/controller/widgets/DeviceSettingsWidget.py
index 1642c70c..d27d80b1 100644
--- a/src/urh/controller/widgets/DeviceSettingsWidget.py
+++ b/src/urh/controller/widgets/DeviceSettingsWidget.py
@@ -106,6 +106,11 @@ class DeviceSettingsWidget(QWidget):
checked = True if checked == "True" else False
self.ui.checkBoxDCCorrection.setChecked(checked)
+ checked = conf_dict.get("bias_tee_enabled", False)
+ if isinstance(checked, str):
+ checked = True if checked == "True" else False
+ self.ui.checkBoxBiasTee.setChecked(checked)
+
self.emit_editing_finished_signals()
@property
@@ -164,6 +169,7 @@ class DeviceSettingsWidget(QWidget):
self.ui.comboBoxDeviceIdentifier.editTextChanged.connect(self.on_combo_box_device_identifier_edit_text_changed)
+ self.ui.checkBoxBiasTee.clicked.connect(self.on_check_box_bias_tee_clicked)
self.ui.checkBoxDCCorrection.clicked.connect(self.on_check_box_dc_correction_clicked)
def set_gain_defaults(self):
@@ -307,6 +313,10 @@ class DeviceSettingsWidget(QWidget):
self.ui.checkBoxDCCorrection.setVisible(show_dc_correction)
self.ui.labelDCCorrection.setVisible(show_dc_correction)
+ show_bias_tee = "bias_tee_enabled" in conf and self.device is not None and self.device.bias_tee_enabled is not None
+ self.ui.labelBiasTee.setVisible(show_bias_tee)
+ self.ui.checkBoxBiasTee.setVisible(show_bias_tee)
+
def get_devices_for_combobox(self, continuous_send_mode):
items = []
for device_name in self.backend_handler.DEVICE_NAMES:
@@ -357,7 +367,7 @@ class DeviceSettingsWidget(QWidget):
def emit_device_parameters_changed(self):
settings = {"name": str(self.device.name)}
for attrib in ("frequency", "sample_rate", "bandwidth", "gain", "if_gain", "baseband_gain", "freq_correction",
- "antenna_index", "num_sending_repeats", "apply_dc_correction", "subdevice"):
+ "antenna_index", "num_sending_repeats", "apply_dc_correction", "subdevice", "bias_tee_enabled"):
try:
value = getattr(self.device, attrib, None)
if value is not None:
@@ -510,6 +520,11 @@ class DeviceSettingsWidget(QWidget):
self.ui.comboBoxDeviceIdentifier.clear()
self.ui.comboBoxDeviceIdentifier.addItems(self.device.get_device_list())
+ @pyqtSlot(bool)
+ def on_check_box_bias_tee_clicked(self, checked: bool):
+ if self.device is not None:
+ self.device.bias_tee_enabled = bool(checked)
+
@pyqtSlot(bool)
def on_check_box_dc_correction_clicked(self, checked: bool):
self.device.apply_dc_correction = bool(checked)
diff --git a/src/urh/dev/VirtualDevice.py b/src/urh/dev/VirtualDevice.py
index beea51f6..a88782c3 100644
--- a/src/urh/dev/VirtualDevice.py
+++ b/src/urh/dev/VirtualDevice.py
@@ -158,6 +158,10 @@ class VirtualDevice(QObject):
if mode == Mode.spectrum:
self.__dev.is_in_spectrum_mode = True
+ @property
+ def backend_is_native(self) -> bool:
+ return self.backend == Backends.native
+
@property
def data_type(self):
if self.backend == Backends.native:
@@ -213,6 +217,18 @@ class VirtualDevice(QObject):
if self.backend == Backends.native:
self.__dev.apply_dc_correction = bool(value)
+ @property
+ def bias_tee_enabled(self):
+ if self.backend_is_native:
+ return self.__dev.bias_tee_enabled
+ else:
+ return None
+
+ @bias_tee_enabled.setter
+ def bias_tee_enabled(self, value: bool):
+ if self.backend_is_native:
+ self.__dev.bias_tee_enabled = value
+
@property
def bandwidth_is_adjustable(self):
if self.backend == Backends.grc:
diff --git a/src/urh/dev/config.py b/src/urh/dev/config.py
index dcac0a05..a0b7a15b 100644
--- a/src/urh/dev/config.py
+++ b/src/urh/dev/config.py
@@ -48,7 +48,8 @@ DEVICE_CONFIG["HackRF"] = {
"rx_rf_gain": [0, 14],
"rx_if_gain": [0, 8, 16, 24, 32, 40],
"tx_if_gain": list(range(0, 48)),
- "rx_baseband_gain": list(range(0, 63, 2)) # only available in RX
+ "rx_baseband_gain": list(range(0, 63, 2)), # only available in RX
+ "bias_tee_enabled": [False, True]
}
# https://kb.ettus.com/About_USRP_Bandwidths_and_Sampling_Rates
diff --git a/src/urh/dev/native/Device.py b/src/urh/dev/native/Device.py
index 75da4553..484a95a6 100644
--- a/src/urh/dev/native/Device.py
+++ b/src/urh/dev/native/Device.py
@@ -39,6 +39,7 @@ class Device(object):
SET_FREQUENCY_CORRECTION = 8
SET_CHANNEL_INDEX = 9
SET_ANTENNA_INDEX = 10
+ SET_BIAS_TEE_ENABLED = 11
ASYNCHRONOUS = False
@@ -250,6 +251,7 @@ class Device(object):
self.__antenna_index = 0
self.__freq_correction = 0
+ self.__bias_tee_enabled = False
self.__direct_sampling_mode = 0
self.bandwidth_is_adjustable = True
@@ -523,6 +525,23 @@ class Device(object):
except (BrokenPipeError, OSError):
pass
+ @property
+ def bias_tee_enabled(self):
+ return self.__bias_tee_enabled
+
+ @bias_tee_enabled.setter
+ def bias_tee_enabled(self, value: bool):
+ value = bool(value)
+ if value != self.__bias_tee_enabled:
+ self.__bias_tee_enabled = value
+ self.set_device_bias_tee_enabled(value)
+
+ def set_device_bias_tee_enabled(self, value):
+ try:
+ self.parent_ctrl_conn.send((self.Command.SET_BIAS_TEE_ENABLED.name, int(value)))
+ except (BrokenPipeError, OSError):
+ pass
+
@property
def freq_correction(self):
return self.__freq_correction
diff --git a/src/urh/dev/native/HackRF.py b/src/urh/dev/native/HackRF.py
index 5e35910f..bbeecc3d 100644
--- a/src/urh/dev/native/HackRF.py
+++ b/src/urh/dev/native/HackRF.py
@@ -1,3 +1,4 @@
+from collections import OrderedDict
from multiprocessing import Array
from multiprocessing.connection import Connection
@@ -13,7 +14,8 @@ class HackRF(Device):
DEVICE_METHODS = Device.DEVICE_METHODS.copy()
DEVICE_METHODS.update({
Device.Command.SET_FREQUENCY.name: "set_freq",
- Device.Command.SET_BANDWIDTH.name: "set_baseband_filter_bandwidth"
+ Device.Command.SET_BANDWIDTH.name: "set_baseband_filter_bandwidth",
+ Device.Command.SET_BIAS_TEE_ENABLED.name: "set_bias_tee"
})
DATA_TYPE = np.int8
@@ -31,7 +33,7 @@ class HackRF(Device):
msg = "SETUP"
if device_identifier:
msg += " ({})".format(device_identifier)
- msg += ": "+str(ret)
+ msg += ": " + str(ret)
ctrl_connection.send(msg)
return ret == 0
@@ -87,6 +89,17 @@ class HackRF(Device):
-9999: "HACKRF_ERROR_OTHER"
}
+ @property
+ def device_parameters(self) -> OrderedDict:
+ return OrderedDict([(self.Command.SET_FREQUENCY.name, self.frequency),
+ (self.Command.SET_SAMPLE_RATE.name, self.sample_rate),
+ (self.Command.SET_BANDWIDTH.name, self.bandwidth),
+ (self.Command.SET_RF_GAIN.name, self.gain),
+ (self.Command.SET_IF_GAIN.name, self.if_gain),
+ (self.Command.SET_BB_GAIN.name, self.baseband_gain),
+ (self.Command.SET_BIAS_TEE_ENABLED.name, self.bias_tee_enabled),
+ ("identifier", self.device_serial)])
+
@property
def has_multi_device_support(self):
return hackrf.has_multi_device_support()
diff --git a/src/urh/dev/native/lib/chackrf.pxd b/src/urh/dev/native/lib/chackrf.pxd
index 47955c0a..a1382db5 100644
--- a/src/urh/dev/native/lib/chackrf.pxd
+++ b/src/urh/dev/native/lib/chackrf.pxd
@@ -1,3 +1,5 @@
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
+
cdef extern from "libhackrf/hackrf.h":
enum hackrf_error:
HACKRF_SUCCESS = 0
@@ -40,11 +42,6 @@ cdef extern from "libhackrf/hackrf.h":
ctypedef struct hackrf_device:
pass
- ctypedef unsigned char uint8_t
- ctypedef unsigned short uint16_t
- ctypedef unsigned int uint32_t
- ctypedef unsigned long long uint64_t
-
ctypedef struct hackrf_transfer:
hackrf_device* device
uint8_t* buffer
@@ -81,7 +78,7 @@ cdef extern from "libhackrf/hackrf.h":
int hackrf_open(hackrf_device** device);
IF HACKRF_MULTI_DEVICE_SUPPORT == 1:
- int hackrf_open_by_serial(const char* const desired_serial_number, hackrf_device** device)
+ int hackrf_open_by_serial(const char* desired_serial_number, hackrf_device** device)
hackrf_device_list_t* hackrf_device_list()
@@ -108,12 +105,11 @@ cdef extern from "libhackrf/hackrf.h":
int hackrf_rffc5071_write(hackrf_device* device, uint8_t register_number, uint16_t value)
int hackrf_spiflash_erase(hackrf_device* device)
- int hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* const data)
+ int hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, const unsigned char* data)
int hackrf_spiflash_read(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* data)
# device will need to be reset after hackrf_cpld_write
- int hackrf_cpld_write(hackrf_device* device,
- unsigned char* const data, const unsigned int total_length)
+ int hackrf_cpld_write(hackrf_device* device, const unsigned char* data, const unsigned int total_length)
int hackrf_board_id_read(hackrf_device* device, uint8_t* value)
int hackrf_version_string_read(hackrf_device* device, char* version, uint8_t length)
@@ -130,7 +126,10 @@ cdef extern from "libhackrf/hackrf.h":
# external amp, bool on/off
int hackrf_set_amp_enable(hackrf_device* device, const uint8_t value)
-
+
+ # Bias Tee, bool on/off
+ int hackrf_set_antenna_enable(hackrf_device* device, const uint8_t value)
+
int hackrf_board_partid_serialno_read(hackrf_device* device, read_partid_serialno_t* read_partid_serialno)
# range 0-40 step 8d, IF gain in osmosdr
diff --git a/src/urh/dev/native/lib/hackrf.pyx b/src/urh/dev/native/lib/hackrf.pyx
index c74742e4..1d43f622 100644
--- a/src/urh/dev/native/lib/hackrf.pyx
+++ b/src/urh/dev/native/lib/hackrf.pyx
@@ -1,4 +1,5 @@
cimport urh.dev.native.lib.chackrf as chackrf
+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
from libc.stdlib cimport malloc
import time
@@ -70,7 +71,7 @@ ELSE:
cpdef get_device_list():
return None
-cpdef setup(str serial):
+cpdef int setup(str serial):
"""
Convenience method for init + open. This one is used by HackRF class.
:return:
@@ -78,13 +79,13 @@ cpdef setup(str serial):
init()
return open(serial)
-cpdef init():
+cpdef int init():
return chackrf.hackrf_init()
-cpdef exit():
+cpdef int exit():
return chackrf.hackrf_exit()
-cpdef close():
+cpdef int close():
return chackrf.hackrf_close(_c_device)
cpdef int start_rx_mode(callback):
@@ -93,42 +94,25 @@ cpdef int start_rx_mode(callback):
f = callback
return chackrf.hackrf_start_rx(_c_device, _c_callback_recv, NULL)
-cpdef stop_rx_mode():
+cpdef int stop_rx_mode():
global RUNNING
RUNNING = -1
time.sleep(TIMEOUT)
return chackrf.hackrf_stop_rx(_c_device)
-cpdef start_tx_mode(callback):
+cpdef int start_tx_mode(callback):
global f, RUNNING
RUNNING = 0
f = callback
return chackrf.hackrf_start_tx(_c_device, _c_callback_send, NULL)
-cpdef stop_tx_mode():
+cpdef int stop_tx_mode():
global RUNNING
RUNNING = -1
time.sleep(TIMEOUT)
return chackrf.hackrf_stop_tx(_c_device)
-cpdef board_id_read():
- cdef unsigned char value
- ret = chackrf.hackrf_board_id_read(_c_device, &value)
- if ret == hackrf_success:
- return value
- else:
- return ""
-
-cpdef version_string_read():
- cdef char*version = malloc(20 * sizeof(char))
- cdef unsigned char length = 20
- ret = chackrf.hackrf_version_string_read(_c_device, version, length)
- if ret == hackrf_success:
- return version.decode('UTF-8')
- else:
- return ""
-
-cpdef set_freq(freq_hz):
+cpdef int set_freq(freq_hz):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_freq(_c_device, freq_hz)
@@ -140,35 +124,39 @@ cpdef is_streaming():
else:
return False
-cpdef set_rf_gain(value):
- """ Enable or disable RF amplifier """
+cpdef int set_amp_enable(value):
time.sleep(TIMEOUT)
+ cdef uint8_t val = 1 if value else 0
+ return chackrf.hackrf_set_amp_enable(_c_device, val)
+
+cpdef int set_rf_gain(value):
+ """ Enable or disable RF amplifier """
return set_amp_enable(value)
-cpdef set_if_rx_gain(value):
+cpdef int set_if_rx_gain(value):
""" Sets the LNA gain, in 8Db steps, maximum value of 40 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_lna_gain(_c_device, value)
-cpdef set_if_tx_gain(value):
+cpdef int set_if_tx_gain(value):
""" Sets the txvga gain, in 1db steps, maximum value of 47 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_txvga_gain(_c_device, value)
-cpdef set_baseband_gain(value):
+cpdef int set_baseband_gain(value):
""" Sets the vga gain, in 2db steps, maximum value of 62 """
time.sleep(TIMEOUT)
return chackrf.hackrf_set_vga_gain(_c_device, value)
-cpdef set_sample_rate(sample_rate):
+cpdef int set_sample_rate(sample_rate):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_sample_rate(_c_device, sample_rate)
-cpdef set_amp_enable(value):
+cpdef int set_bias_tee(on_or_off):
time.sleep(TIMEOUT)
- cdef bint val = 1 if value else 0
- return chackrf.hackrf_set_amp_enable(_c_device, val)
+ cdef uint8_t bias_tee = 1 if on_or_off else 0
+ return chackrf.hackrf_set_antenna_enable(_c_device, bias_tee)
-cpdef set_baseband_filter_bandwidth(bandwidth_hz):
+cpdef int set_baseband_filter_bandwidth(bandwidth_hz):
time.sleep(TIMEOUT)
return chackrf.hackrf_set_baseband_filter_bandwidth(_c_device, bandwidth_hz)
diff --git a/src/urh/ui/ui_send_recv_device_settings.py b/src/urh/ui/ui_send_recv_device_settings.py
index 18e5f4c1..7188ffd9 100644
--- a/src/urh/ui/ui_send_recv_device_settings.py
+++ b/src/urh/ui/ui_send_recv_device_settings.py
@@ -2,7 +2,8 @@
#
#
-# WARNING! All changes made in this file will be lost!
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
@@ -11,7 +12,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_FormDeviceSettings(object):
def setupUi(self, FormDeviceSettings):
FormDeviceSettings.setObjectName("FormDeviceSettings")
- FormDeviceSettings.resize(860, 754)
+ FormDeviceSettings.resize(859, 741)
self.verticalLayout = QtWidgets.QVBoxLayout(FormDeviceSettings)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
@@ -51,64 +52,24 @@ class Ui_FormDeviceSettings(object):
self.frame_2.setObjectName("frame_2")
self.gridLayout = QtWidgets.QGridLayout(self.frame_2)
self.gridLayout.setObjectName("gridLayout")
- self.spinBoxFreqCorrection = QtWidgets.QSpinBox(self.frame_2)
- self.spinBoxFreqCorrection.setMinimum(-1000)
- self.spinBoxFreqCorrection.setMaximum(1000)
- self.spinBoxFreqCorrection.setProperty("value", 1)
- self.spinBoxFreqCorrection.setObjectName("spinBoxFreqCorrection")
- self.gridLayout.addWidget(self.spinBoxFreqCorrection, 13, 1, 1, 1)
+ self.labelAntenna = QtWidgets.QLabel(self.frame_2)
+ self.labelAntenna.setObjectName("labelAntenna")
+ self.gridLayout.addWidget(self.labelAntenna, 4, 0, 1, 1)
self.labelBasebandGain = QtWidgets.QLabel(self.frame_2)
self.labelBasebandGain.setObjectName("labelBasebandGain")
self.gridLayout.addWidget(self.labelBasebandGain, 12, 0, 1, 1)
- self.gridLayout_8 = QtWidgets.QGridLayout()
- self.gridLayout_8.setObjectName("gridLayout_8")
- self.sliderBasebandGain = QtWidgets.QSlider(self.frame_2)
- self.sliderBasebandGain.setSliderPosition(0)
- self.sliderBasebandGain.setOrientation(QtCore.Qt.Horizontal)
- self.sliderBasebandGain.setInvertedAppearance(False)
- self.sliderBasebandGain.setInvertedControls(False)
- self.sliderBasebandGain.setTickPosition(QtWidgets.QSlider.NoTicks)
- self.sliderBasebandGain.setTickInterval(0)
- self.sliderBasebandGain.setObjectName("sliderBasebandGain")
- self.gridLayout_8.addWidget(self.sliderBasebandGain, 0, 0, 1, 1)
- self.spinBoxBasebandGain = QtWidgets.QSpinBox(self.frame_2)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.spinBoxBasebandGain.sizePolicy().hasHeightForWidth())
- self.spinBoxBasebandGain.setSizePolicy(sizePolicy)
- self.spinBoxBasebandGain.setObjectName("spinBoxBasebandGain")
- self.gridLayout_8.addWidget(self.spinBoxBasebandGain, 0, 1, 1, 1)
- self.gridLayout.addLayout(self.gridLayout_8, 12, 1, 1, 1)
- self.labelBandwidth = QtWidgets.QLabel(self.frame_2)
- self.labelBandwidth.setObjectName("labelBandwidth")
- self.gridLayout.addWidget(self.labelBandwidth, 9, 0, 1, 1)
- self.labelFreqCorrection = QtWidgets.QLabel(self.frame_2)
- self.labelFreqCorrection.setObjectName("labelFreqCorrection")
- self.gridLayout.addWidget(self.labelFreqCorrection, 13, 0, 1, 1)
- self.labelGain = QtWidgets.QLabel(self.frame_2)
- self.labelGain.setObjectName("labelGain")
- self.gridLayout.addWidget(self.labelGain, 10, 0, 1, 1)
- self.comboBoxDeviceIdentifier = QtWidgets.QComboBox(self.frame_2)
- self.comboBoxDeviceIdentifier.setEditable(True)
- self.comboBoxDeviceIdentifier.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
- self.comboBoxDeviceIdentifier.setObjectName("comboBoxDeviceIdentifier")
- self.gridLayout.addWidget(self.comboBoxDeviceIdentifier, 1, 1, 1, 1)
- self.labelDCCorrection = QtWidgets.QLabel(self.frame_2)
- self.labelDCCorrection.setObjectName("labelDCCorrection")
- self.gridLayout.addWidget(self.labelDCCorrection, 16, 0, 1, 1)
- self.labelDeviceIdentifier = QtWidgets.QLabel(self.frame_2)
- self.labelDeviceIdentifier.setObjectName("labelDeviceIdentifier")
- self.gridLayout.addWidget(self.labelDeviceIdentifier, 1, 0, 1, 1)
- self.labelPort = QtWidgets.QLabel(self.frame_2)
- self.labelPort.setObjectName("labelPort")
- self.gridLayout.addWidget(self.labelPort, 6, 0, 1, 1)
- self.labelIFGain = QtWidgets.QLabel(self.frame_2)
- self.labelIFGain.setObjectName("labelIFGain")
- self.gridLayout.addWidget(self.labelIFGain, 11, 0, 1, 1)
- self.label_3 = QtWidgets.QLabel(self.frame_2)
- self.label_3.setObjectName("label_3")
- self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
+ self.lineEditSubdevice = QtWidgets.QLineEdit(self.frame_2)
+ self.lineEditSubdevice.setObjectName("lineEditSubdevice")
+ self.gridLayout.addWidget(self.lineEditSubdevice, 2, 1, 1, 1)
+ self.spinBoxBandwidth = KillerDoubleSpinBox(self.frame_2)
+ self.spinBoxBandwidth.setDecimals(10)
+ self.spinBoxBandwidth.setMinimum(0.001)
+ self.spinBoxBandwidth.setMaximum(1000000000000.0)
+ self.spinBoxBandwidth.setObjectName("spinBoxBandwidth")
+ self.gridLayout.addWidget(self.spinBoxBandwidth, 9, 1, 1, 1)
+ self.labelSubdevice = QtWidgets.QLabel(self.frame_2)
+ self.labelSubdevice.setObjectName("labelSubdevice")
+ self.gridLayout.addWidget(self.labelSubdevice, 2, 0, 1, 1)
self.spinBoxFreq = KillerDoubleSpinBox(self.frame_2)
self.spinBoxFreq.setDecimals(10)
self.spinBoxFreq.setMinimum(0.001)
@@ -116,47 +77,20 @@ class Ui_FormDeviceSettings(object):
self.spinBoxFreq.setProperty("value", 433920000.0)
self.spinBoxFreq.setObjectName("spinBoxFreq")
self.gridLayout.addWidget(self.spinBoxFreq, 7, 1, 1, 1)
- self.labelAntenna = QtWidgets.QLabel(self.frame_2)
- self.labelAntenna.setObjectName("labelAntenna")
- self.gridLayout.addWidget(self.labelAntenna, 4, 0, 1, 1)
+ self.lineEditIP = QtWidgets.QLineEdit(self.frame_2)
+ self.lineEditIP.setObjectName("lineEditIP")
+ self.gridLayout.addWidget(self.lineEditIP, 5, 1, 1, 1)
self.btnRefreshDeviceIdentifier = QtWidgets.QToolButton(self.frame_2)
icon = QtGui.QIcon.fromTheme("view-refresh")
self.btnRefreshDeviceIdentifier.setIcon(icon)
self.btnRefreshDeviceIdentifier.setObjectName("btnRefreshDeviceIdentifier")
self.gridLayout.addWidget(self.btnRefreshDeviceIdentifier, 1, 2, 1, 1)
- self.cbDevice = QtWidgets.QComboBox(self.frame_2)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.cbDevice.sizePolicy().hasHeightForWidth())
- self.cbDevice.setSizePolicy(sizePolicy)
- self.cbDevice.setObjectName("cbDevice")
- self.cbDevice.addItem("")
- self.cbDevice.addItem("")
- self.gridLayout.addWidget(self.cbDevice, 0, 1, 1, 1)
- self.lineEditIP = QtWidgets.QLineEdit(self.frame_2)
- self.lineEditIP.setObjectName("lineEditIP")
- self.gridLayout.addWidget(self.lineEditIP, 5, 1, 1, 1)
- self.labelIP = QtWidgets.QLabel(self.frame_2)
- self.labelIP.setObjectName("labelIP")
- self.gridLayout.addWidget(self.labelIP, 5, 0, 1, 1)
- self.labelFreq = QtWidgets.QLabel(self.frame_2)
- self.labelFreq.setObjectName("labelFreq")
- self.gridLayout.addWidget(self.labelFreq, 7, 0, 1, 1)
- self.btnLockBWSR = QtWidgets.QToolButton(self.frame_2)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.btnLockBWSR.sizePolicy().hasHeightForWidth())
- self.btnLockBWSR.setSizePolicy(sizePolicy)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(":/icons/icons/lock.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.btnLockBWSR.setIcon(icon)
- self.btnLockBWSR.setIconSize(QtCore.QSize(16, 16))
- self.btnLockBWSR.setCheckable(True)
- self.btnLockBWSR.setChecked(True)
- self.btnLockBWSR.setObjectName("btnLockBWSR")
- self.gridLayout.addWidget(self.btnLockBWSR, 8, 2, 2, 1)
+ self.labelDirectSampling = QtWidgets.QLabel(self.frame_2)
+ self.labelDirectSampling.setObjectName("labelDirectSampling")
+ self.gridLayout.addWidget(self.labelDirectSampling, 15, 0, 1, 1)
+ self.labelBandwidth = QtWidgets.QLabel(self.frame_2)
+ self.labelBandwidth.setObjectName("labelBandwidth")
+ self.gridLayout.addWidget(self.labelBandwidth, 9, 0, 1, 1)
self.gridLayout_5 = QtWidgets.QGridLayout()
self.gridLayout_5.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.gridLayout_5.setObjectName("gridLayout_5")
@@ -178,34 +112,6 @@ class Ui_FormDeviceSettings(object):
self.spinBoxGain.setObjectName("spinBoxGain")
self.gridLayout_5.addWidget(self.spinBoxGain, 0, 1, 1, 1)
self.gridLayout.addLayout(self.gridLayout_5, 10, 1, 1, 1)
- self.spinBoxPort = QtWidgets.QSpinBox(self.frame_2)
- self.spinBoxPort.setMinimum(1)
- self.spinBoxPort.setMaximum(65535)
- self.spinBoxPort.setProperty("value", 1234)
- self.spinBoxPort.setObjectName("spinBoxPort")
- self.gridLayout.addWidget(self.spinBoxPort, 6, 1, 1, 1)
- self.comboBoxAntenna = QtWidgets.QComboBox(self.frame_2)
- self.comboBoxAntenna.setObjectName("comboBoxAntenna")
- self.gridLayout.addWidget(self.comboBoxAntenna, 4, 1, 1, 1)
- self.comboBoxDirectSampling = QtWidgets.QComboBox(self.frame_2)
- self.comboBoxDirectSampling.setObjectName("comboBoxDirectSampling")
- self.gridLayout.addWidget(self.comboBoxDirectSampling, 14, 1, 1, 1)
- self.labelDirectSampling = QtWidgets.QLabel(self.frame_2)
- self.labelDirectSampling.setObjectName("labelDirectSampling")
- self.gridLayout.addWidget(self.labelDirectSampling, 14, 0, 1, 1)
- self.labelNRepeat = QtWidgets.QLabel(self.frame_2)
- self.labelNRepeat.setObjectName("labelNRepeat")
- self.gridLayout.addWidget(self.labelNRepeat, 15, 0, 1, 1)
- self.checkBoxDCCorrection = QtWidgets.QCheckBox(self.frame_2)
- self.checkBoxDCCorrection.setChecked(True)
- self.checkBoxDCCorrection.setObjectName("checkBoxDCCorrection")
- self.gridLayout.addWidget(self.checkBoxDCCorrection, 16, 1, 1, 1)
- self.comboBoxChannel = QtWidgets.QComboBox(self.frame_2)
- self.comboBoxChannel.setObjectName("comboBoxChannel")
- self.gridLayout.addWidget(self.comboBoxChannel, 3, 1, 1, 1)
- self.labelChannel = QtWidgets.QLabel(self.frame_2)
- self.labelChannel.setObjectName("labelChannel")
- self.gridLayout.addWidget(self.labelChannel, 3, 0, 1, 1)
self.labelSampleRate = QtWidgets.QLabel(self.frame_2)
self.labelSampleRate.setObjectName("labelSampleRate")
self.gridLayout.addWidget(self.labelSampleRate, 8, 0, 1, 1)
@@ -224,28 +130,129 @@ class Ui_FormDeviceSettings(object):
self.spinBoxIFGain.setObjectName("spinBoxIFGain")
self.gridLayout_7.addWidget(self.spinBoxIFGain, 0, 1, 1, 1)
self.gridLayout.addLayout(self.gridLayout_7, 11, 1, 1, 1)
+ self.labelFreqCorrection = QtWidgets.QLabel(self.frame_2)
+ self.labelFreqCorrection.setObjectName("labelFreqCorrection")
+ self.gridLayout.addWidget(self.labelFreqCorrection, 13, 0, 1, 1)
+ self.comboBoxDeviceIdentifier = QtWidgets.QComboBox(self.frame_2)
+ self.comboBoxDeviceIdentifier.setEditable(True)
+ self.comboBoxDeviceIdentifier.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
+ self.comboBoxDeviceIdentifier.setObjectName("comboBoxDeviceIdentifier")
+ self.gridLayout.addWidget(self.comboBoxDeviceIdentifier, 1, 1, 1, 1)
+ self.cbDevice = QtWidgets.QComboBox(self.frame_2)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.cbDevice.sizePolicy().hasHeightForWidth())
+ self.cbDevice.setSizePolicy(sizePolicy)
+ self.cbDevice.setObjectName("cbDevice")
+ self.cbDevice.addItem("")
+ self.cbDevice.addItem("")
+ self.gridLayout.addWidget(self.cbDevice, 0, 1, 1, 1)
self.spinBoxNRepeat = QtWidgets.QSpinBox(self.frame_2)
self.spinBoxNRepeat.setMaximum(999999999)
self.spinBoxNRepeat.setObjectName("spinBoxNRepeat")
- self.gridLayout.addWidget(self.spinBoxNRepeat, 15, 1, 1, 1)
+ self.gridLayout.addWidget(self.spinBoxNRepeat, 16, 1, 1, 1)
+ self.gridLayout_8 = QtWidgets.QGridLayout()
+ self.gridLayout_8.setObjectName("gridLayout_8")
+ self.sliderBasebandGain = QtWidgets.QSlider(self.frame_2)
+ self.sliderBasebandGain.setSliderPosition(0)
+ self.sliderBasebandGain.setOrientation(QtCore.Qt.Horizontal)
+ self.sliderBasebandGain.setInvertedAppearance(False)
+ self.sliderBasebandGain.setInvertedControls(False)
+ self.sliderBasebandGain.setTickPosition(QtWidgets.QSlider.NoTicks)
+ self.sliderBasebandGain.setTickInterval(0)
+ self.sliderBasebandGain.setObjectName("sliderBasebandGain")
+ self.gridLayout_8.addWidget(self.sliderBasebandGain, 0, 0, 1, 1)
+ self.spinBoxBasebandGain = QtWidgets.QSpinBox(self.frame_2)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.spinBoxBasebandGain.sizePolicy().hasHeightForWidth())
+ self.spinBoxBasebandGain.setSizePolicy(sizePolicy)
+ self.spinBoxBasebandGain.setObjectName("spinBoxBasebandGain")
+ self.gridLayout_8.addWidget(self.spinBoxBasebandGain, 0, 1, 1, 1)
+ self.gridLayout.addLayout(self.gridLayout_8, 12, 1, 1, 1)
+ self.labelPort = QtWidgets.QLabel(self.frame_2)
+ self.labelPort.setObjectName("labelPort")
+ self.gridLayout.addWidget(self.labelPort, 6, 0, 1, 1)
self.spinBoxSampleRate = KillerDoubleSpinBox(self.frame_2)
self.spinBoxSampleRate.setDecimals(10)
self.spinBoxSampleRate.setMinimum(0.001)
self.spinBoxSampleRate.setMaximum(1000000000000.0)
self.spinBoxSampleRate.setObjectName("spinBoxSampleRate")
self.gridLayout.addWidget(self.spinBoxSampleRate, 8, 1, 1, 1)
- self.spinBoxBandwidth = KillerDoubleSpinBox(self.frame_2)
- self.spinBoxBandwidth.setDecimals(10)
- self.spinBoxBandwidth.setMinimum(0.001)
- self.spinBoxBandwidth.setMaximum(1000000000000.0)
- self.spinBoxBandwidth.setObjectName("spinBoxBandwidth")
- self.gridLayout.addWidget(self.spinBoxBandwidth, 9, 1, 1, 1)
- self.labelSubdevice = QtWidgets.QLabel(self.frame_2)
- self.labelSubdevice.setObjectName("labelSubdevice")
- self.gridLayout.addWidget(self.labelSubdevice, 2, 0, 1, 1)
- self.lineEditSubdevice = QtWidgets.QLineEdit(self.frame_2)
- self.lineEditSubdevice.setObjectName("lineEditSubdevice")
- self.gridLayout.addWidget(self.lineEditSubdevice, 2, 1, 1, 1)
+ self.labelGain = QtWidgets.QLabel(self.frame_2)
+ self.labelGain.setObjectName("labelGain")
+ self.gridLayout.addWidget(self.labelGain, 10, 0, 1, 1)
+ self.checkBoxDCCorrection = QtWidgets.QCheckBox(self.frame_2)
+ self.checkBoxDCCorrection.setChecked(True)
+ self.checkBoxDCCorrection.setObjectName("checkBoxDCCorrection")
+ self.gridLayout.addWidget(self.checkBoxDCCorrection, 17, 1, 1, 1)
+ self.labelDeviceIdentifier = QtWidgets.QLabel(self.frame_2)
+ self.labelDeviceIdentifier.setObjectName("labelDeviceIdentifier")
+ self.gridLayout.addWidget(self.labelDeviceIdentifier, 1, 0, 1, 1)
+ self.comboBoxAntenna = QtWidgets.QComboBox(self.frame_2)
+ self.comboBoxAntenna.setObjectName("comboBoxAntenna")
+ self.gridLayout.addWidget(self.comboBoxAntenna, 4, 1, 1, 1)
+ self.labelFreq = QtWidgets.QLabel(self.frame_2)
+ self.labelFreq.setObjectName("labelFreq")
+ self.gridLayout.addWidget(self.labelFreq, 7, 0, 1, 1)
+ self.spinBoxPort = QtWidgets.QSpinBox(self.frame_2)
+ self.spinBoxPort.setMinimum(1)
+ self.spinBoxPort.setMaximum(65535)
+ self.spinBoxPort.setProperty("value", 1234)
+ self.spinBoxPort.setObjectName("spinBoxPort")
+ self.gridLayout.addWidget(self.spinBoxPort, 6, 1, 1, 1)
+ self.labelIP = QtWidgets.QLabel(self.frame_2)
+ self.labelIP.setObjectName("labelIP")
+ self.gridLayout.addWidget(self.labelIP, 5, 0, 1, 1)
+ self.spinBoxFreqCorrection = QtWidgets.QSpinBox(self.frame_2)
+ self.spinBoxFreqCorrection.setMinimum(-1000)
+ self.spinBoxFreqCorrection.setMaximum(1000)
+ self.spinBoxFreqCorrection.setProperty("value", 1)
+ self.spinBoxFreqCorrection.setObjectName("spinBoxFreqCorrection")
+ self.gridLayout.addWidget(self.spinBoxFreqCorrection, 13, 1, 1, 1)
+ self.labelNRepeat = QtWidgets.QLabel(self.frame_2)
+ self.labelNRepeat.setObjectName("labelNRepeat")
+ self.gridLayout.addWidget(self.labelNRepeat, 16, 0, 1, 1)
+ self.comboBoxDirectSampling = QtWidgets.QComboBox(self.frame_2)
+ self.comboBoxDirectSampling.setObjectName("comboBoxDirectSampling")
+ self.gridLayout.addWidget(self.comboBoxDirectSampling, 15, 1, 1, 1)
+ self.labelDCCorrection = QtWidgets.QLabel(self.frame_2)
+ self.labelDCCorrection.setObjectName("labelDCCorrection")
+ self.gridLayout.addWidget(self.labelDCCorrection, 17, 0, 1, 1)
+ self.comboBoxChannel = QtWidgets.QComboBox(self.frame_2)
+ self.comboBoxChannel.setObjectName("comboBoxChannel")
+ self.gridLayout.addWidget(self.comboBoxChannel, 3, 1, 1, 1)
+ self.labelIFGain = QtWidgets.QLabel(self.frame_2)
+ self.labelIFGain.setObjectName("labelIFGain")
+ self.gridLayout.addWidget(self.labelIFGain, 11, 0, 1, 1)
+ self.labelChannel = QtWidgets.QLabel(self.frame_2)
+ self.labelChannel.setObjectName("labelChannel")
+ self.gridLayout.addWidget(self.labelChannel, 3, 0, 1, 1)
+ self.btnLockBWSR = QtWidgets.QToolButton(self.frame_2)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.btnLockBWSR.sizePolicy().hasHeightForWidth())
+ self.btnLockBWSR.setSizePolicy(sizePolicy)
+ icon = QtGui.QIcon()
+ icon.addPixmap(QtGui.QPixmap(":/icons/icons/lock.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.btnLockBWSR.setIcon(icon)
+ self.btnLockBWSR.setIconSize(QtCore.QSize(16, 16))
+ self.btnLockBWSR.setCheckable(True)
+ self.btnLockBWSR.setChecked(True)
+ self.btnLockBWSR.setObjectName("btnLockBWSR")
+ self.gridLayout.addWidget(self.btnLockBWSR, 8, 2, 2, 1)
+ self.label_3 = QtWidgets.QLabel(self.frame_2)
+ self.label_3.setObjectName("label_3")
+ self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
+ self.labelBiasTee = QtWidgets.QLabel(self.frame_2)
+ self.labelBiasTee.setObjectName("labelBiasTee")
+ self.gridLayout.addWidget(self.labelBiasTee, 14, 0, 1, 1)
+ self.checkBoxBiasTee = QtWidgets.QCheckBox(self.frame_2)
+ self.checkBoxBiasTee.setObjectName("checkBoxBiasTee")
+ self.gridLayout.addWidget(self.checkBoxBiasTee, 14, 1, 1, 1)
self.gridLayout_6.addWidget(self.frame_2, 0, 0, 1, 1)
self.verticalLayout.addWidget(self.groupBoxDeviceSettings)
@@ -278,49 +285,53 @@ class Ui_FormDeviceSettings(object):
_translate = QtCore.QCoreApplication.translate
FormDeviceSettings.setWindowTitle(_translate("FormDeviceSettings", "Form"))
self.groupBoxDeviceSettings.setTitle(_translate("FormDeviceSettings", "Device settings"))
- self.spinBoxFreqCorrection.setToolTip(_translate("FormDeviceSettings", "Set the frequency correction in ppm. If you do not know what to enter here, just leave it to one.
"))
+ self.labelAntenna.setText(_translate("FormDeviceSettings", "Antenna:"))
self.labelBasebandGain.setToolTip(_translate("FormDeviceSettings", "The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by complex downsampling.
"))
self.labelBasebandGain.setText(_translate("FormDeviceSettings", "Baseband gain:"))
- self.sliderBasebandGain.setToolTip(_translate("FormDeviceSettings", " The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by complex downsampling.
"))
- self.spinBoxBasebandGain.setToolTip(_translate("FormDeviceSettings", "The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by complex downsampling.
"))
- self.labelBandwidth.setText(_translate("FormDeviceSettings", "Bandwidth (Hz):"))
- self.labelFreqCorrection.setToolTip(_translate("FormDeviceSettings", " Set the frequency correction in ppm. If you do not know what to enter here, just leave it to one.
"))
- self.labelFreqCorrection.setText(_translate("FormDeviceSettings", "Frequency correction:"))
- self.labelGain.setToolTip(_translate("FormDeviceSettings", "
The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
- self.labelGain.setText(_translate("FormDeviceSettings", "Gain:"))
- self.comboBoxDeviceIdentifier.setToolTip(_translate("FormDeviceSettings", "You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will automatically select an attached SDR of the configured type if you leave this value empty.
"))
- self.labelDCCorrection.setToolTip(_translate("FormDeviceSettings", "Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero."))
- self.labelDCCorrection.setText(_translate("FormDeviceSettings", "DC correction:"))
- self.labelDeviceIdentifier.setToolTip(_translate("FormDeviceSettings", "You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will automatically select an attached SDR of the configured type if you leave this value empty.
"))
- self.labelDeviceIdentifier.setText(_translate("FormDeviceSettings", "Device Identifier:"))
- self.labelPort.setText(_translate("FormDeviceSettings", "Port number:"))
- self.labelIFGain.setToolTip(_translate("FormDeviceSettings", "The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.
"))
- self.labelIFGain.setText(_translate("FormDeviceSettings", "IF Gain:"))
- self.label_3.setText(_translate("FormDeviceSettings", "Device:"))
- self.labelAntenna.setText(_translate("FormDeviceSettings", "Antenna:"))
+ self.lineEditSubdevice.setToolTip(_translate("FormDeviceSettings", "Configure the subdevice of your USRP. For example, B:0 to select a WBX on slot B. You can learn more at http://files.ettus.com/manual/page_configuration.html#config_subdev.
"))
+ self.labelSubdevice.setToolTip(_translate("FormDeviceSettings", "Configure the subdevice of your USRP. For example, B:0 to select a WBX on slot B. You can learn more at http://files.ettus.com/manual/page_configuration.html#config_subdev.
"))
+ self.labelSubdevice.setText(_translate("FormDeviceSettings", "Subdevice:
"))
+ self.lineEditIP.setText(_translate("FormDeviceSettings", "127.0.0.1"))
self.btnRefreshDeviceIdentifier.setToolTip(_translate("FormDeviceSettings", "Automatically detect connected SDRs of the above configured type. There is no need to press this button if you have only one SDR of a certain type attached.
"))
self.btnRefreshDeviceIdentifier.setText(_translate("FormDeviceSettings", "..."))
- self.cbDevice.setItemText(0, _translate("FormDeviceSettings", "USRP"))
- self.cbDevice.setItemText(1, _translate("FormDeviceSettings", "HackRF"))
- self.lineEditIP.setText(_translate("FormDeviceSettings", "127.0.0.1"))
- self.labelIP.setText(_translate("FormDeviceSettings", "IP address:"))
- self.labelFreq.setText(_translate("FormDeviceSettings", "Frequency (Hz):"))
- self.btnLockBWSR.setText(_translate("FormDeviceSettings", "..."))
- self.sliderGain.setToolTip(_translate("FormDeviceSettings", "The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
- self.spinBoxGain.setToolTip(_translate("FormDeviceSettings", "The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
- self.comboBoxDirectSampling.setToolTip(_translate("FormDeviceSettings", "Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The native backend is recommended, when using this setting.
"))
self.labelDirectSampling.setToolTip(_translate("FormDeviceSettings", "Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The native backend is recommended, when using this setting.
"))
self.labelDirectSampling.setText(_translate("FormDeviceSettings", "Direct sampling:"))
- self.labelNRepeat.setText(_translate("FormDeviceSettings", "Repeat:"))
- self.checkBoxDCCorrection.setToolTip(_translate("FormDeviceSettings", "Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero."))
- self.checkBoxDCCorrection.setText(_translate("FormDeviceSettings", "Apply DC correction"))
- self.labelChannel.setText(_translate("FormDeviceSettings", "Channel:"))
+ self.labelBandwidth.setText(_translate("FormDeviceSettings", "Bandwidth (Hz):"))
+ self.sliderGain.setToolTip(_translate("FormDeviceSettings", "The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
+ self.spinBoxGain.setToolTip(_translate("FormDeviceSettings", "The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
self.labelSampleRate.setText(_translate("FormDeviceSettings", "Sample rate (Sps):"))
self.sliderIFGain.setToolTip(_translate("FormDeviceSettings", "The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.
"))
self.spinBoxIFGain.setToolTip(_translate("FormDeviceSettings", "The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.
"))
+ self.labelFreqCorrection.setToolTip(_translate("FormDeviceSettings", "Set the frequency correction in ppm. If you do not know what to enter here, just leave it to one.
"))
+ self.labelFreqCorrection.setText(_translate("FormDeviceSettings", "Frequency correction:"))
+ self.comboBoxDeviceIdentifier.setToolTip(_translate("FormDeviceSettings", "You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will automatically select an attached SDR of the configured type if you leave this value empty.
"))
+ self.cbDevice.setItemText(0, _translate("FormDeviceSettings", "USRP"))
+ self.cbDevice.setItemText(1, _translate("FormDeviceSettings", "HackRF"))
self.spinBoxNRepeat.setSpecialValueText(_translate("FormDeviceSettings", "Infinite"))
- self.labelSubdevice.setToolTip(_translate("FormDeviceSettings", "Configure the subdevice of your USRP. For example, B:0 to select a WBX on slot B. You can learn more at http://files.ettus.com/manual/page_configuration.html#config_subdev.
"))
- self.labelSubdevice.setText(_translate("FormDeviceSettings", "Subdevice:
"))
- self.lineEditSubdevice.setToolTip(_translate("FormDeviceSettings", "Configure the subdevice of your USRP. For example, B:0 to select a WBX on slot B. You can learn more at http://files.ettus.com/manual/page_configuration.html#config_subdev.
"))
+ self.sliderBasebandGain.setToolTip(_translate("FormDeviceSettings", "The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by complex downsampling.
"))
+ self.spinBoxBasebandGain.setToolTip(_translate("FormDeviceSettings", "The baseband gain is applied to the baseband signal in your software defined radio. The baseband signal is at low frequency and gathered from the RF signal by complex downsampling.
"))
+ self.labelPort.setText(_translate("FormDeviceSettings", "Port number:"))
+ self.labelGain.setToolTip(_translate("FormDeviceSettings", "The gain (more exactly RF gain) is the gain applied to the RF signal. This amplifies the high frequent signal arriving at the antenna of your Software Defined Radio.
"))
+ self.labelGain.setText(_translate("FormDeviceSettings", "Gain:"))
+ self.checkBoxDCCorrection.setToolTip(_translate("FormDeviceSettings", "Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero."))
+ self.checkBoxDCCorrection.setText(_translate("FormDeviceSettings", "Apply DC correction"))
+ self.labelDeviceIdentifier.setToolTip(_translate("FormDeviceSettings", "You can enter a device identifier here if you have multiple SDRs of the same type attached to separate them. There is no need to configure this value otherwise. URH will automatically select an attached SDR of the configured type if you leave this value empty.
"))
+ self.labelDeviceIdentifier.setText(_translate("FormDeviceSettings", "Device Identifier:"))
+ self.labelFreq.setText(_translate("FormDeviceSettings", "Frequency (Hz):"))
+ self.labelIP.setText(_translate("FormDeviceSettings", "IP address:"))
+ self.spinBoxFreqCorrection.setToolTip(_translate("FormDeviceSettings", "Set the frequency correction in ppm. If you do not know what to enter here, just leave it to one.
"))
+ self.labelNRepeat.setText(_translate("FormDeviceSettings", "Repeat:"))
+ self.comboBoxDirectSampling.setToolTip(_translate("FormDeviceSettings", "Set the direct sampling mode. If you do not know what to choose here, just set it to disabled. The native backend is recommended, when using this setting.
"))
+ self.labelDCCorrection.setToolTip(_translate("FormDeviceSettings", "Apply DC correction during recording, that is, ensure the captured signal has a mean value of zero."))
+ self.labelDCCorrection.setText(_translate("FormDeviceSettings", "DC correction:"))
+ self.labelIFGain.setToolTip(_translate("FormDeviceSettings", "The IF Gain is applied to the Intermediate Frequency signal in your Software Defined Radio. An IF signal has a lower frequency than the high frequent RF signal, so signal processing can be applied more efficiently.
"))
+ self.labelIFGain.setText(_translate("FormDeviceSettings", "IF Gain:"))
+ self.labelChannel.setText(_translate("FormDeviceSettings", "Channel:"))
+ self.btnLockBWSR.setText(_translate("FormDeviceSettings", "..."))
+ self.label_3.setText(_translate("FormDeviceSettings", "Device:"))
+ self.labelBiasTee.setToolTip(_translate("FormDeviceSettings", "Enable the bias tee of your SDR, if you have an external LNA connected. Leave this disabled if you have no external LNA attached.
"))
+ self.labelBiasTee.setText(_translate("FormDeviceSettings", "Bias Tee:"))
+ self.checkBoxBiasTee.setToolTip(_translate("FormDeviceSettings", "Enable the bias tee of your SDR, if you have an external LNA connected. Leave this disabled if you have no external LNA attached.
"))
+ self.checkBoxBiasTee.setText(_translate("FormDeviceSettings", "Enable Bias Tee"))
from urh.ui.KillerDoubleSpinBox import KillerDoubleSpinBox
from . import urh_rc