SDR Reception
Introduction
Section titled “Introduction”The following examples demonstrate how to initialize an SDR, record a signal, and transmit a custom waveform. These examples assume familiarity with Python and SDR concepts.
In this example, we use the bladeRF. However, because this package presents a common interface for all SDR devices, the same code can be used to interface with additional supported radios.
In this example, we initialize the Blade SDR and configure it to record a signal for a specified duration.
import time
from ria_toolkit_oss.data.recording import Recordingfrom ria_toolkit_oss.sdr.blade import Blade
my_radio = Blade()print(my_radio)print(type(my_radio))
my_radio.init_rx( sample_rate=1e6, center_frequency=2.44e9, gain=50, channel=0,)
rx_time = 0.01start = time.time()my_rec = my_radio.record(rx_time=rx_time)end = time.time()
print(f"Total time: {end - start} seconds")print(f"Length of the recording: {len(my_rec)} samples")Conclusion
Section titled “Conclusion”This example demonstrates how to use the Blade class to receive samples into a Recording object. By customizing the parameters, we can adapt this example to various signal processing and SDR tasks.