RHYTHM SDR USRP transmission and reception of signals via the RF path
This example illustrates the application of RHYTHM SDR USRP in the Engee environment. The material is the second in a series. The first example, which examined the principles of basic interaction with the specified complex, can be found at the link: "Getting started with the RHYTHM SDR USRP". Here are two options for experimental verification of the reception and transmission of radio signals over the radio frequency (RF) path.
- Check 1. Transmission and reception of user radio signals via the RF path
The joint functioning of the Engee environment and the SDR USRP RHYTHM is demonstrated. In this case, Engee is used to generate, display, and analyze the signal, and the SDR USRP RHYTHM provides reception and transmission of the signal generated in Engee. Two types of RF-transmitted test effects have been implemented: harmonic (sinusoidal) and multi-frequency. - Check 2. Reception of a wireless network signal of the IEEE 802.11 (Wi‑Fi) standard
Shows the practical application of the RHYTHM SDR USRP as a broadband receiver device for monitoring radio broadcasts. The verification includes recording and displaying the signal in the frequency range occupied by IEEE 802.11 (Wi‑Fi) standard networks.
These experimental checks demonstrate the use of the module Targets.RITM_SDR_API in the Engee environment. To work with the RHYTHM SDR USRP, you need to connect the file ritm_sdr_utils.jl, containing auxiliary functions. This file automatically downloads the module that provides the SDR USRP RHYTHM management functions.
include("ritm_sdr_utils.jl")
Receiving and transmitting radio signals using RHYTHM SDR USRP
The code snippet below demonstrates the order of interaction of the SDR USRP RHYTHM with the Engee environment in terms of signal generation, transmission and reception, and also illustrates the possibilities of processing user signals using the library EngeeDSP.
The code generates, transmits, receives, and analyzes a harmonic (sinusoidal) signal. A connection to the SDR USRP server is pre-established at the IP address: 192.168.2.70.
RITM_SDR_API.@log_on
client = RITM_SDR_API.RITMClient("192.168.2.70")
RITM_SDR_API.connect(client) || (exit(1));
Below is the configuration of programmable logic blocks by calling the function configure_sdr, which adjusts the registers of the specified blocks as part of the RHYTHM SDR USRP.
configure_sdr(client);
Using the function agc_set_mode Automatic gain control (AGC) is activated.
RITM_SDR_API.agc_set_mode(client, 1);
Next, a harmonic signal is generated with a frequency of 10 MHz.
fs_hz = 245.76e6
tone_freq_hz = 10e6
n_samples = 600000
t = (0:n_samples-1) / fs_hz
signal = exp.(2π * im * tone_freq_hz * t);
After that, the generated signal is loaded into the internal storage device RHYTHM SDR USRP and its cyclic playback is started from the random access memory (RAM). The SDR USRP RHYTHM provides a mode in which the signal is continuously broadcast in a cyclic mode.
tx_data = RITM_SDR_API.prepare_tx_data(signal)
if RITM_SDR_API._put_data(client, tx_data)
sleep(5.0)
RITM_SDR_API.send_to_ram(client)
sleep(10.0)
else
RITM_SDR_API.@logmsg "Error sending data"
end
Reception of quadrature components is carried out by the function receive_iq().
rx_iq = receive_iq(client, n_samples);
The analysis of the received signal is performed by the function plot_signal(), which performs plotting in the time and frequency domains. This function uses the tools provided by the library. EngeeDSP.
if rx_iq !== nothing && length(rx_iq) > 0
RITM_SDR_API.@logmsg "Accepted $(length(rx_iq)) counts"
plot_signal(rx_iq[1:min(end, 5000)], fs_hz, "Analog loop: $(round(tone_freq_hz/1e6, digits=2)) MHz, Fs=$(round(fs_hz/1e6, digits=2)) MHz");
end
Next, a multi-frequency signal is triggered. According to the algorithm, this check completely repeats the previous one, but instead of a harmonic signal, the function is used generate_signal(), designed to create specialized test effects: multi-frequency, linear-frequency-modulated (LFM) or dual-frequency signals. In this example, a multi-frequency signal is generated consisting of 15 harmonic components distributed in the frequency range from 10 MHz to 100 MHz.
signal = generate_signal(fs_hz, n_samples; signal_type="multitone", f_low=10e6, f_high=100e6, num_tones=15)
sleep(10.0)
tx_data = RITM_SDR_API.prepare_tx_data(signal)
if RITM_SDR_API._put_data(client, tx_data)
sleep(5.0)
RITM_SDR_API.send_to_ram(client)
sleep(10.0)
else
RITM_SDR_API.@logmsg "Error sending data"
end
rx_iq = receive_iq(client, n_samples)
if rx_iq !== nothing && length(rx_iq) > 0
RITM_SDR_API.@logmsg "Accepted $(length(rx_iq)) counts"
plot_signal(rx_iq[1:min(end, 5000)], fs_hz, "Analog loop, multi-frequency signal");
end
At the end, the transfer is stopped and the SDR USRP memory is cleared.
RITM_SDR_API.disconnect(client)
RITM_SDR_API.close_log();
These examples clearly show the joint functioning of Engee and the SDR USRP RHYTHM, in addition, the second example allows you to evaluate the quality of processing multi-frequency signals.
IEEE 802.11 wireless network signal Reception (Wi‑Fi)
The following test demonstrates the practical application of the SDR USRP RHYTHM for monitoring radio broadcasts, namely for recording and analyzing signals in the range occupied by IEEE 802.11 (Wi‑Fi) networks. The verification shows the ability of the RHYTHM SDR USRP to function as an overview broadband receiver for broadcast monitoring tasks. During the verification, the correctness of the connection, data reception and the possibility of visual analysis of the spectral situation on a given channel are evaluated. The results can serve as a basis for debugging and subsequent development of more complex algorithms for demodulating and decoding IEEE 802.11 network traffic.
The IEEE 802.11 (Wireless Fidelity, Wi‑Fi) standard defines a wireless data transmission technology that allows devices to connect to a local network and access the Internet without using a wired connection via radio waves. Frequency ranges used in IEEE 802.11 networks:
- 2.4 GHz (2400-2483.5 MHz) is the most common band that provides good signal penetration through obstacles, but is subject to interference from other devices (microwave ovens, Bluetooth equipment).
- 5 GHz (5150-5850 MHz, divided into several sub—bands) - provides higher data transfer speeds and lower congestion, but penetrates obstacles worse.
- 6 GHz (5925-7125 MHz) is a new band used in the Wi‑Fi 6E and Wi‑Fi 7 standards; designed for ultra-high speeds and low delays, it operates mainly over short distances within line of sight.
Let's look at the verification structure by stages. Determining the channel frequency. The test begins by calculating the center frequency of the target Wi‑Fi channel using the function wifi_channel_frequency. Information about available networks can be used to select a channel, for example, the command netsh wlan show interfaces in a Windows environment, displaying the current channel and frequency range (2.4GHz or 5 GHz) for wireless adapters.
RITM_SDR_API.@log_on
wifi_freq_mhz = wifi_channel_frequency("2.4GHz", 2)
RITM_SDR_API.@logmsg "Wi-Fi Frequency: $wifi_freq_mhz MHz";
The algorithm records 600,000 samples of quadrature components (I/Q data) using the function receive_iq. This volume corresponds to a segment of the signal with a duration of approximately 19.5 ms at a sampling frequency of 30.72 MHz.
client = RITM_SDR_API.RITMClient("192.168.2.70")
RITM_SDR_API.connect(client) || (exit(1))
configure_sdr(client, Int(wifi_freq_mhz * 1e6))
RITM_SDR_API.agc_set_mode(client, 1)
sleep(0.5)
iq_data = receive_iq(client, 600000)
if iq_data !== nothing
RITM_SDR_API.@logmsg "written $(length(iq_data)) counts";
end
Display of the recorded signal. If the data is received, it is passed to the function plot_signal with the parameter signal_type="wi-fi". The function builds a two-panel graph: in the time domain and in the frequency domain (the spectral power density in decibels relative to full scale, centered relative to the set frequency of the Wi-Fi channel). The graph is automatically saved to a data file.
plot_signal(iq_data, 30.72e6, "Wi-Fi: $(wifi_freq_mhz) MHz", center_freq_hz=wifi_freq_mhz * 1e6, signal_type="wi-fi")
Breaking the connection. After completing the work with the RHYTHM SDR USRP, the connection is terminated.
RITM_SDR_API.disconnect(client)
RITM_SDR_API.close_log();
Conclusion
Using the example of two experimental tests — operation in analog loop mode and reception of Wi-Fi signals on the air — support for SDR USRP RHYTHM in the Engee environment is shown.
During the measurements, a sinusoidal signal at a preset frequency of 10 MHz was confidently observed in the captured data. Similarly, when transmitting a multi-frequency signal, its main components were recorded in the spectrum, which confirms the correctness of the formation, transmission and reception of test radio signals.
An experiment on receiving a Wi-Fi signal demonstrated the possibility of using the RHYTHM SDR USRP as a broadband receiver device for analyzing real radio signals. The resulting spectrum clearly shows the shape of the spectral envelope characteristic of Wi-Fi signals with OFDM modulation. This indicates the correct configuration of the receiving path, sufficient reception bandwidth, and the ability to capture complex broadband modulated signals using RHYTHM SDR USRP in the Engee environment.