How do you recieve your transmission, Live-script

2 visualizzazioni (ultimi 30 giorni)
I have data that I want to send over from the TX antenna to the RX antenna. (using the Adalm-Pluto, and MATLAB live script)
This is what I have so far...
tx_symbols_QAM16 % This is where my data comes from
rx_symbols_QAM16 % This is where my recieved data should go to
% Create recieve and send objects.
recieve_object = sdrrx("Pluto", ...
"RadioID", "usb:0", ...
"CenterFrequency", Pluto_CenterFrequencyGHz *1e9, ...
"GainSource", "AGC Fast Attack", ... % Automatic gain, set for signals with rapidly changing power levels.
"BasebandSampleRate", Pluto_BaseBandSampleRateMHz *1e6, ...
"OutputDataType", "double", ...
"SamplesPerFrame", Pluto_SamplesPerFrame, ...
"EnableBurstMode", Pluto_EnableBurstMode, ...
"NumFramesInBurst", Pluto_NumFramesInBurst)
transmit_object = sdrtx("Pluto", ...
"RadioID", "usb:0", ...
"CenterFrequency", Pluto_CenterFrequencyGHz *1e9, ...
"Gain", -10, ... % [-87.75..0]dB D=-10, step=0.25dB
"BasebandSampleRate", Pluto_BaseBandSampleRateMHz *1e6)
rx_symbols_QAM16 = recieve_object(); % Start recieving
transmit_object(tx_symbols_QAM16); % Start sending
But when I run this then it first recieves and when it is done recieving it will start transmitting.
How to recieve your own transmission?

Risposta accettata

Koen
Koen il 10 Apr 2025
Modificato: Koen il 10 Apr 2025
You first make the radio objects, with the settings that you want, see sdrtx & sdrrx, for more options.
sdrtx_object = sdrtx("Pluto")
sdrrx_object = sdrrx("Pluto")
Then call transmitRepeat to continuously transmit the data given, and then call the recieving object.
transmitRepeat(sdrtx_object, tx_symbols_modulated);
rx_symbols_modulated = sdrrx_object();
Do not forget to call *.release to stop the transmission and clean things up. (otherwise I observed wierd behaviour)
sdrrx_object.release
sdrtx_object.release
Remember that you might drop in halfway into your message, so you'll have to record for twice the length of your message. You can after then search for your start symbols.

Più risposte (1)

Walter Roberson
Walter Roberson il 19 Feb 2025
sdrtx() supports BISTLoopbackMode
  11 Commenti
Walter Roberson
Walter Roberson il 22 Mar 2025
It will never be possible to get access to a workspace from a process started by !matlab or System.Diagnostics.Process, or parfor or parfeval with process pool. (parfeval() with a background pool in theory shares some of the address space, but there are restricted things you can do with the shared access.)
To transfer information to a process started with System.Diagnostics.Process, use input redirection. See for example https://www.mathworks.com/matlabcentral/answers/586706-how-to-redirect-standard-input-and-standard-output-using-net-system-diagnostics-process#answer_487475
Koen
Koen il 10 Apr 2025
Modificato: Koen il 10 Apr 2025
Unfortunately, I never got it to work.
When using pareval or parfor with process pool, together with the load() to get the variable data, there was always something not working or refusing to work properly.
I have found an other solution, Thank you for your help.

Accedi per commentare.

Prodotti


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by