I wonder if someone could provide guidance as to how to sucessfully stream a .wfm file from Lime Suite (version 16.6.6.818 running over USB 3.0 on win7 x64) to the LimeSDR platform. I’m able to use the Lime Suite waveform loader to download a .wfm file to the LimeSDR waveform player and obtain the expected RF output using “FPGA Controls”, “Play”. However, when an attempt is made to stream the same .wfm file from PC disk using “FPGA Controls”, “Select File”, “Start streaming” Lime Suite consistently crashes. The crash occurs when the Start streaming button is pressed.
I noticed that the “Stream Protocol.pdf” document provides register settings for streaming configuration. Are these background configured by Lime Suite, or should I be programming them explicitly?
Hello Everyone, how are you? Is there a guide to address this @Zack@andrewback?
I mean, how can I “construct” a signal, create the .wfm file and transmit it with the LimeSDR?
Thank you @andrewback for your quick response!
Yes. I’ve already tried that example and those in the LimeSDR workshop (Pothos & Octave).
My question is if it’s a way to load any waveform (previously created with Octave, Pothos, etc) to the waveform player in LimeSuiteGUI and transmit it. Just the same way the WCDMA example in self_test.ini works, but with an arbitrary waveform. For example:
[GNU Radio / Signal Source] —> File Sink.wfm
File Sink.wfm --> [Load in LimeSuiteGUI - FPGA Controls] --> Play
The main idea is not use GNU Radio or Pothos to trasmit.
Here is a Matlab code which explains everything I think. Should work in Octave as well, although not tested. Let me know if you have some questions.
% How to create WFM file
% Samples are signed (2's complement) 16 bit values
% Order of samples is I0, Q0, I1, Q1, I2, Q2, ...
samples = int16([32767, 0, 0, -32768, -32768, 0, 0, 32767, 1]);
% Create file
myfile = fopen('samples_matlab.wfm', 'w');
% Write samples to file in big endian format
written = fwrite(myfile, samples, 'int16', 'ieee-be');
fclose(myfile);
Thanks @Zack!
I have a question, the LimeSDR has a 12-bit DAC, the program into the FPGA will convert the 16 bit data of the .wfm file to a 12-bit stream?
Thank you for your help @Zack and @andrewback.
I’m sharing an example script for Matlab to transmit a Single Side Band Suppressed Carrier (SSBSC) signal:
% Waveform example: Single Side Band Suppressed Carrier (SSBSC) signal.
N = 1000; % Number of points in the waveform
T = 101;
phi = (2piT/N)[0:N-1]; %Instantaneous Phase. LimeSDR’s Sample_Rate(T/N) determines the frequency offset from the carrier.
I = cos(phi); Q = sin(phi);
% Construct a single array with Interleaved IQ data
waveform(1:2:2N) = I;
waveform(2:2:2N) = Q;
%Normalization of the signal (+/-1), scaling to full range of the DAC with 16 bit representation.
waveform = round(waveform * (32767 / max(abs(waveform))));
% Create file
myfile = fopen(‘samples_matlab.wfm’, ‘w’);
% Write samples to file in big endian format.
written = fwrite(myfile, waveform, ‘int16’, ‘ieee-be’);
fclose(myfile);
Once the file is loaded in FPGA Controls, there are times when the signal appears wrong in the FFT viewer. In that case:
Stop the transmission and send the a signal from the GUI (the OneTone signal in the FPGA Controls or the NCO-generated signal in TxTSP).
Stop the test signal transmission and play the custom signal again.
I’ve been looking for scrips or programs for Octave for it to be a frequency counter and waveform generator. But I’m having a hard time finding any. I’ve read Octave can do all o this and more.
I’m not sure if you’re still active on this topic, but I recently began working with the LimeSDR and creating .wfm files using your code. Thank you so much for this.
Do you have any advice for creating MIMO .wfm files using Matlab?
Currently LimeSuiteGUI uploads the same WFM file to both MIMO channels. We can implement separate file upload, but the sample number in both files must be the same.
I saw that, but was hoping to play two different signals. How would I go about implementing two separate files–since there is only one place to upload a file?