comm.SDRuTransmitter can not work with my USRP X310
Show older comments
I use matlab 2025a and I can connect to my USRP X310 in the radioSetupWizard. Actually, I can use basebandtransmitter to control my X310. However, when I use comm.SDRuTransmitter or comm.SDRuReceiver, it reports error as blow.
How can I solve this problem?
Thanks
Configure SDRu Transmitter and Transmit Data
Create an SDRu transmitter System object for your USRP radio at the default IP address, 192.168.10.2. Configure a sample rate of 1 MHz.
mcr = 200e6;
sampleRate = 1e6;
tx = comm.SDRuTransmitter(Platform="X310", ...
IPAddress="192.168.40.2",...
MasterClockRate=mcr, ...
InterpolationFactor=mcr/sampleRate)
tx =
comm.SDRuTransmitter - :
Platform: 'X310'
IPAddress: '192.168.40.2'
ChannelMapping: 1
CenterFrequency: 2.4500e+09
LocalOscillatorOffset: 0
Gain: 8
PPSSource: 'Internal'
EnableTimeTrigger: false
ClockSource: 'Internal'
MasterClockRate: 200000000
InterpolationFactor: 200
TransportDataType: 'int16'
EnableBurstMode: false
Create a 40 kHz sine wave for transmission.
freq = 40e3;
samplesPerFrame = 50e3;
sinewave = dsp.SineWave( ...
Amplitude=2,Frequency=freq, ...
SampleRate=sampleRate, ...
SamplesPerFrame=samplesPerFrame, ...
OutputDataType="double", ...
ComplexOutput=true);
data = sinewave();
Since the input to the SDRu transmitter System object must be in the range [-1,1], normalize the data before transmission.
amp = max(abs(data));
NormalizedData = data/amp;
Create a spectrum analyzer and time scope object to visualize the signal.
spectrumScope = spectrumAnalyzer("SampleRate",sampleRate);
frameDuration = samplesPerFrame/sampleRate;
timeScope = timescope("TimeSpan",4/freq,"SampleRate",sampleRate);
disp("Transmission started");
Transmission started
spectrumScope(NormalizedData);
timeScope(NormalizedData);
Transmit the normalized data for 10 seconds using the SDRu transmitter System object tx.
stopTime = 10;
time = 0;
while time < stopTime
tx(NormalizedData);
time = time+frameDuration;
end
Win32; Microsoft Visual C++ version 1936; Boost_108100; UHD_4.6.0.0-vendor
---------- see libuhd version information above this line ----------
错误使用 reportSDRuStatus (第 106 行)
An error occurred: Could not execute UHD driver command in 'openDataConnection_c':
Non-default FPGA image detected on X310 device 0. Use sdruload to load the default FPGA image.
出错 comm.internal.SDRuBase/setupImpl
Release the hardware resources.
release(tx)
Accepted Answer
More Answers (0)
Categories
Find more on Communications Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!