Lime SDR mini not working with octave!

#1

With my lime sdr mini, when I use the following code with the useLimeSdr=true on lone 29. , I get this error :
“fm = 0.10000
error: ‘LoadLimeSuite’ undefined near line 57 column 2
error: called from
ASK at line 57 column 2”
please help me out. Running this.

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  2. %

  3. % Copyright 2017 Lime Microsystems Ltd.

  4. %

  5. % Licensed under the Apache License, Version 2.0 (the ‘License’);

  6. % you may not use this file except in compliance with the License.

  7. % You may obtain a copy of the License at

  8. %

  9. % http://www.apache.org/licenses/LICENSE-2.0

  10. %

  11. % Unless required by applicable law or agreed to in writing, software

  12. % distributed under the License is distributed on an ‘AS IS’ BASIS,

  13. % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  14. % See the License for the specific language governing permissions and

  15. % limitations under the License.

  16. %

  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  18. %

  19. % Simple ASK data link

  20. %

  21. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  22. %

  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  24. %

  25. % S E T T I N G S

  26. %

  27. clear all;

  28. close all;

  29. useLimeSDR=true;

  30. leaveSDRrunningAfter=false;

  31. saveGraphs=false;

  32. minPktLength=8192; % Current LimeSDR requirement

  33. itt=3;

  34. fpltname=‘ASK’;

  35. fwfm=strcat(fpltname,’.wfm’);

  36. FSR=1; % Sample rate frequency

  37. fLMSsettings=‘DEMO_1Msps_866MHz_-50dBm.ini’;

  38. pkg load communications

  39. fftSize=32;

  40. frames=32;

  41. %

  42. % G E N E R A T E T R A N S M I T S I G N A L

  43. %

  44. t=0:1023;

  45. fc=0.5;

  46. fm=0.1

  47. k=2*pi;

  48. m=[1,1,0,1,0,0,1,0];

  49. rep=fftSize*frames/length(m);

  50. m=reshape(repmat(m,rep,1),1,[]);

  51. iqDataTx=0.3m.exp(i2pi*t/8); % amplitude modulate offset ssb carrier

  52. %iqDataTx=0.3*m; % amplitude modulate carrier - does not work due to RX DC cancellation!

  53. %

  54. % R A D I O S E T U P

  55. %

  56. **if useLimeSDR==true **

  57. ** LoadLimeSuite; % LimeSDR initialisation and use**

  58. ** LimeInitialize();**

  59. ** LimeLoadConfig(fLMSsettings); % use settings file from LimeSuite**

  60. ** iqDataTxo=reshape(repmat(iqDataTx,2,1),1,[]); % convert to MIMO format**

  61. ** LimeStartStreaming(length(iqDataTxo));**

  62. ** LimeLoopWFMStart(iqDataTxo); % play back data**

  63. end

  64. figure;

  65. %cm=[0:0.01:1;zeros(1,101);1:-0.01:0]’; % 101 pt RGB map

  66. cm=[0:0.01:1;(0:0.01:1).^2;1:-0.01:0]’; % 101 pt RGB map

  67. colormap(cm);

  68. **for cint=1:itt **

  69. ** %**

  70. ** % P R O C E S S R E C E I V E S I G N A L**

  71. ** %**

  72. ** if useLimeSDR==true **

  73. ** iqDataRx = LimeReceiveSamples(length(iqDataTx));**

  74. ** else % if not using LimeSDR, patch transmit stream direct to RX**

  75. ** iqDataRx=iqDataTx;**

  76. ** end**

  77. ** ask=abs(iqDataRx); % basic FM demodulator**

  78. ** subplot(2,2,1);**

  79. ** plot(real(iqDataRx),‘b-’,imag(iqDataRx),‘r-’);**

  80. ** grid on;**

  81. ** title(‘Raw Waveform’);**

  82. ** xlabel(‘Time Points’);**

  83. ** ylabel(‘Level’);**

  84. ** subplot(2,2,2);**

  85. ** plot(ask,‘b-’);**

  86. ** grid on;**

  87. ** title(‘Demodulated ASK Waveform’);**

  88. ** xlabel(‘Time Points’);**

  89. ** ylabel(‘Level’);**


  90. ** subplot(2,2,3); % basic windowed water fall type graph. **

  91. ** wtfl=fft(conj(reshape(iqDataRx,fftSize,[])’).hanning(fftSize)’,fftSize,2)/fftSize; % windowed horizontal multiple FFT*

  92. ** wtfl2=zeros((frames),fftSize);**

  93. ** wtfld=mag2db(abs(fftshift(wtfl,2))+1e-5);**

  94. ** img=imagesc(wtfld);**

  95. ** grid on;**

  96. ** title(‘Waterfall Graph’);**

  97. ** xlabel(‘Frequency’);**

  98. ** ylabel(‘Time’);**


  99. ** subplot(2,2,4); % windowed fft **

  100. ** len=length(iqDataRx);**

  101. ** fscale=(-(len/2):(len/2-1))/len*FSR; % MHz**

  102. ** spctrm=fftshift(fft(iqDataRx.hanning(len)’)/len); % note hamming is column vector, transpose*

  103. ** spctrm=20*log10(abs(spctrm)+1e-6);**

  104. ** plot(fscale,spctrm,‘bo-’);**

  105. ** grid on;**

  106. ** title(‘Windowed Received Data Spectrum’);**

  107. ** xlabel(‘Frequency MHz’);**

  108. ** ylabel(‘Magnitude dBFS’);**

  109. ** legend(‘level dB’);**

  110. ** if saveGraphs**

  111. ** print( fpltname, ‘-dpng’ );**

  112. ** end**

  113. end

  114. %

  115. % R A D I O S H U T D O W N

  116. %

  117. if (leaveSDRrunningAfter==false) && (useLimeSDR==true)

  118. ** printf(‘Purging LimeSDR resources\n’); **

  119. ** LimeLoopWFMStop(); % stop streaming**

  120. ** LimeStopStreaming(); % also resets Rx Tx buffers **

  121. ** LimeDestroy(); % deallocate resources**

  122. end

#2

Are you using the code from:

?

#3

[https://github.com/myriadrf/LimeSDR_Workshop/blob/master/octave/ASKDemo/ASK.m](http://This very code, ) yes!! The amplitude shift keying one.(ASK.m)

#4

OK, I need to check to see if this has been tested with LimeSDR Mini. May be that the Octave library needs updating.

1 Like
#5

Works when I set, the useLimeSdr to false, ofc, it will. will be waiting.

#6

@andrewback can I make any piece of octave code work with my lime sdr, if so please!

#7

@andrewback I am not really sure, if its a compatibility issue with the mini or am I simply doing something wrong… I have set up my lime SDR, tested it with gui…
But the ASK.m octave code still spits out this error… Why is the ‘LoadLimeSuite’ undefined ?
fm = 0.10000
error: ‘LoadLimeSuite’ undefined near line 57 column 2
error: called from
SSB at line 57 column 2