MicroPhase / antsdr-fw

ANTSDR Firmware
Other
127 stars 48 forks source link

How to use ANTSDR E310 that AD9361 with MATLAB2022b #21

Open MOUmeiqi opened 1 year ago

MOUmeiqi commented 1 year ago

question:I run the Capture RF Data to Baseband File Using ADALM-PLUTO Radio example with matlab 2022b configurePlutoRadio('AD9364') is error "Reference to a field that does not exist 'SerialNum' " QQ图片20230401150848

and when install the support packet,It's Serial number does not exist QQ图片20230401150835 What is the reason for this? Is it caused by AD9361?Can you help me with this? Thank you.

Yours Best!

black-pigeon commented 1 year ago

Hello @MOUmeiqi, you can download the latest released sd card firmware form here. You don't have to configure the device using matlab, the default sd card firmware should work.

MOUmeiqi commented 1 year ago

Hello, @black-pigeon Thanks for the reply I now need to use this with MATLAB, so I need to solve a similar problem, I have seen cases online where Pluto has a serial number in MATLAB, but why we don't have it on this board, so I would like to ask for some advice. Can downloading the latest firmware solve this problem?thanks. image

Yours Best!

black-pigeon commented 1 year ago

DO NOT use matlab to upgrade the firmware, When you use MATLAB's Pluto boot loader to update the firmware, the firmware that is loaded onto the device is specific to Pluto and may not match the hardware, which could cause issues with the device. You do not need to use MATLAB to set up the device; you only need to install the corresponding hardware support package.

You can use following scripts to test the connection(I assume that you are using the firmware we provided and connected to your host via the Ethernet port.)

clear all;
%% Setup PlutoSDR
rx1 = sdrrx('Pluto','RadioID', 'ip:192.168.1.10');
tx1 = sdrtx('Pluto','RadioID', 'ip:192.168.1.10');
rx1.GainSource = 'AGC Fast Attack';
tx1.CenterFrequency = 2000e6;
%% Setup SDR buffers
ch_size = 1e6;
rx1.SamplesPerFrame = ch_size;
%% Generate complex transmit signal
Fs = 30.72e6;
Fc = 1e6;
t = 1/Fs:1/Fs:ch_size/Fs;
amplitude = 1024;
sigR = sin(2*pi*Fc*t+0).*amplitude;
sigC = sin(2*pi*Fc*t+pi/2).*amplitude;
sig = complex(sigR,sigC);

tx1.transmitRepeat(sig.');
frames = 10;
cap = zeros(ch_size*frames,1);
prev = 0;
for frame = 1:frames
    % Call radio
    o = rx1();
    % Save data
    indx = (frame-1)*ch_size+1 : frame*ch_size;
    cap(indx) = o;
    % Info
    s = sprintf('Frame %d of %d',frame,frames);
    fprintf(repmat('\b',1,prev));fprintf(s);prev = length(s);
end
fprintf('\n');
%% Plot
t = 1/Fs:1/Fs:frames*ch_size/Fs;
plot(t,real(cap),t,imag(cap));
xlabel('Sample');
ylabel('Amplitude');
xlim([t(end-300) t(end)])
MOUmeiqi commented 1 year ago

I didn't do that, I just tested with matlab,I'll go test the script now

MOUmeiqi commented 1 year ago

One more query,ANTSDR No serial number is normal?My board is AD9361,configurePlutoRadio('AD9364') is error

black-pigeon commented 1 year ago

The default firmware already has a frequency range of 70 MHz to 6 GHz, so you do not need to use MATLAB to modify it.

MOUmeiqi commented 1 year ago

image The results of the test script are as above,But this command line shows these warnings as fellow image Do I need to upgrade to 0.34?

black-pigeon commented 1 year ago

Hello @MOUmeiqi, you can download the latest released sd card firmware form here. You don't have to configure the device using matlab, the default sd card firmware should work.

You can Download the latest released sd card firmware if you want.

MOUmeiqi commented 1 year ago

thanks,I try it now

MOUmeiqi commented 1 year ago

I'm very sorry, I have another problem. When I tested the QPSK transceiver example with two boards.Every time I modify the message sent, the message on the receiving end is still the same as before the modification, but once I restart MATLAB, the message on the receiving end is the modified message.Is this a case of that program not being updated?