LimeSDR Matlab support

@papatoux,

I reviewed the link, too, and it appears it was

Here is a link that you can download the FooBar2000 app and the DLL you need to make it work that I put (temporarily) on my Google Drive:

https://drive.google.com/drive/folders/0BwKr15rQ-sXid2F2NmRKelNOYUk?usp=sharing

Use that link to download both (the installer and the DLL) and then when it’s installed, make sure you put the DLL in the same subdirectory as where the FooBar2000 application resides.

Hope this helps - 73 de Marty, KN0CK

Hi Martin,
Thank you for your answer.
But it seems the FooBar2000 is dedicated for a FM transmitter.
I am looking for a receiving chain using LimeSDR and SDR#.
Or may be I don’t understand correctly?
73 JJ F1EHN

newest version sdrsharp plugin
I will update in this link
https://www.jiangwei.org/download/LimeSDR_SDRSharp_Plugin.zip

1 Like

@jocover,

What features does this plug-in provide for SDR#? Please let me know when you can. Also, when will FooBar2000 support other modulation modes (USB, LSB, CW in addition to AM/FM) and use microphone mode? Please let me know on that one, too - thanks,

73 de Marty, KN0CK

Hi Jiang Wei,

I have been trying your LimeSDR SDRSharp Radio Frontend Plugin. SDRSharp is the SDR App I have the most experience with, especially with an AirSpy SDR.

Your 3rd April version offers working reception that I could test with an SDRSharp 1.0.0.1500. Good job.

Would you like to be provided with feedback?

Have you perhaps in the meantime produced a newer version? One that would now work with a current version of SDRSharp?

Thanks,
Pierre

Any instructions for controlling and getting data from the LimeSDR in GNU Octave on Linux?

See the presentations and examples from the LimeSDR Workshop:

Realize its been a while since anyone has posted here, but after reading through all the above this seems to be the applicable thread for this issue:
First - thanks jocover for building support for matlab/simulink - the BladeRf eventually got robust MATLAB support and its cool to see the same for the LimeSDR.

I’ve been trying to get simulink running in full duplex but can’t get the project to compile. If using the current LimeSuite.dll simulink with throw an error saying module (being “LimeSuite.dll”) not found. But if I place an older LimeSuite.dll in the same directory it will detect it but will then error on “function ‘LMS_SetGaindB’ was not found”. Is there a specific LimeSuite.dll version that has to be used for this to work?
My board is HW4/FW3 so I’m not sure if I can use older DLLs, but if anyone has any insights on a workaround or alternative it would be greatly appreciated.

Hi All,

barkusrex what process did you use for getting the lime to work with MATLAB / Simulink? I have been working on it all afternoon and can’t seem to manage it. I have tried to compile the thunk and only get lots of errors. I am using R2017 on Windows 10 (ugh, I know, but I don’t have a choice with this)…

I installed the mingwx64 plugin for matlab so I have compilers set up. I couldn’t get a thunk built so I downloaded the one listed above (liblimesuite_thunk) for pcwin64.

I’m getting the feeling that my copy of limesuite and the matlab files from jocover aren’t being found properly by matlab or something?

When I try and run just the limeSDR,m file, this is the output that I get:


>> limeSDR
Warning: The thunk(int32voidPtr_Booluint64uint32Thunk) for function ‘LMS_SetGaindB’ was not found in the library
> In loadlibrary
In limeSDR/load_library (line 190)
In limeSDR (line 218)
Warning: The thunk(int32voidPtr_Booluint64int32_BoolThunk) for function ‘LMS_SetNCOIndex’ was not found in the library
> In loadlibrary
In limeSDR/load_library (line 190)
In limeSDR (line 218)
Warning: The thunk(int32voidPtruint32_BoolThunk) for function ‘LMS_EnableTxWFM’ was not found in the library
> In loadlibrary
In limeSDR/load_library (line 190)
In limeSDR (line 218)
Error using limeSDR/load_library (line 200)
Failed to find functions in libLimeSuite.

Error in limeSDR (line 218)
limeSDR.load_library();


So to me this looks like a path issue?

All of my LimeSDR tools are from the PothosSDR software, and compilers are mingw64 plugin to MATLAB. If anyone who has actually gotten the MATLAB/Simulink capabilities to work could chime in I sure would appreciate it. I’m a MATLAB novice and haven’t really used it for these types of things before. I could very well be making a rookie mistake.

I can interface with it over the other tools, such as the windows LimeSuite GUI and the Pothos GUI front end, so I’ve verified that the USB is working and I’ve also updated to the latest firmwares.

Thanks for your help all.
Cheers
Will

EDIT: I am unable to build a thunk file from the instructions given on the github site. I get hundreds of errors.

So I’ve finally had a chance to poke at this more and arrived at a similar conclusion. The included thunk file is not correct for the functions found in the current LimeSuite.dll/limesdr.m. I figured np, will just build a new updated thunk file, like you I got the mingwx64 plugin functional, but also receive compilation errors.
If those can be resolved and a new thunk file can be built we should be able to get this working, not sure where to begin with that as I’ve had experience with MATLAB but only for scripts/DSP, not with 3rd party tools/compilers. So I’m guessing I’m doing something wrong with mingwx64…

Anyone that managed to get this working on Linux (Ubuntu 17.10) and can provide some input on how to achieve that? Which libraries do I need to add?

I can run the LimeSDR with LimeSuiteGUI, SoapySDR and GNU radio so I should have most libraries installed properly. However, running the limeSDR.build_thunk from Matlab just gives error so I expect that I perhaps miss some library. I added Matlab paths /usr/include/lime/ where LimeSuite.h and so on are located. I also added /usr/lib/x86_64-linux-gnu/ (with libLimeSuite.so etc) and also /var/lib/dpkg/info/ which seems to contain a lot of lime stuff. Anything obvious that I have missed?

Another source of problem might be the compiler. I run GCC 7.2.0 but officially Matlab support GCC 4.9. Anyone that have tried with a newer GCC and got it working or do I have to install the old GCC?

Anything on this?
[https://github.com/jocover/sdrsharp-limesdr/issues/4]
Thanks!

hi Jocover,

I recently purchased one LimeSDR-Mini device. This device is working fine with GNUradio and LimeSuite. But when I wanted to make an interface with the Matlab. I used ur given .dll files and Matlab codes for the Matlab interface of the LimeSDR-Mini but I am getting some issues which I am attaching through a Snapshot.

do i have to modify the files uploaded by you to work with limesdr-mini. I am a beginner to this. so please do not mind if it is a silly one. waiting for ur reply.

Hello jocover,
can you give me detailed instructions as to how to interface MATLAB with LimeSDR??
Thanks a lot,
Vinayak Anant Karandikar

Hello freebil,
can you give me detailed instructions as to how to interface MATLAB with LimeSDR??
Thanks a lot,
Vinayak Anant Karandikar

Hello jocover,
I have downloaded the two files located at

https://github.com/jocover/Simulink-MATLAB-LimeSDR/releases/download/thunk/libLimeSuite_thunk_pcwin64.dll

and

MEGA

Now i get the error:

dev = limeSDR();
Warning: The function ‘LMS_SetGaindB’ was not found in the library

In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The function ‘LMS_GetGaindB’ was not found in the library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The function ‘LMS_GetNCOPhase’ was not found in the library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The thunk(int32voidPtr_Booluint64int32_BoolThunk) for function ‘LMS_SetNCOIndex’ was not
found in the library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The function ‘LMS_GPIODirRead’ was not found in the library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The function ‘LMS_GPIODirWrite’ was not found in the library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Warning: The thunk(int32voidPtruint32_BoolThunk) for function ‘LMS_EnableTxWFM’ was not found in the
library
In loadlibrary at 402
In limeSDR>limeSDR.load_library at 190
In limeSDR>limeSDR.limeSDR at 218
Error using limeSDR/load_library (line 200)
Failed to find functions in libLimeSuite.

Error in limeSDR (line 218)
limeSDR.load_library();

What do i do?

Also note:
I get the same errors using both “winusb version” and also “cyusb version”

What do i do?

Thanks a lot,
Vinayak Anant Karandikar

hello,
have you solved your problems? I want to use LimeSDR mini in matlab, but I meet the same problen LimeSDR error: no connection object
And I have already upgrade my device, but it’s still not wok. Can you please share your solution, and I’ll appreciate it very much:blush:

hello, jocover,
I’m trying to use LimeSDR mini in matlab, in addtion, I’m using win10, but I meet some problems, when I run the dev = limeSDR(); command for the first time,
error1
and I did nothing, just run the dev = limeSDR(); command for another time,
error2
the device is conneted successfully in the LimeSuite, and I’ve upgrade my hardware successfully, but it doesn’t work. Do you have some suggestions? I’ll appreciate it very much:blush:

A quick history lesson:
2017-01-16 LimeSDR-USB start to ship
2017-09-05 The very last update for jocover/Simulink-MATLAB-LimeSDR github repository.
2018-02-24 was the last time that jocover was logged into this forum
2018-03-04 LimeSDR-Mini start to ship

I think expecting jocover/Simulink-MATLAB-LimeSDR, that was created before the LimeSDR-Mini shipped, to work unmodified with a LimeSDR-Mini is low, extremely low as in Zero chance. I’d even go as far as saying that the unmodified code may not even work with a LimeSDR-USB either.
And I say that just by quickly comparing jocover/Simulink-MATLAB-LimeSDR/blob/master/LimeSuite_Build_Thunk.h to the equivalent file in the current LimeSuite myriadrf/LimeSuite/blob/master/src/lime/LimeSuite.h

There is no point in pointing out a problem without at least trying to point towards a solution, what you need is someone who has:

  • A LimeSDR-Mini (and a LimeSDR-USB as well)
  • A Microsoft Windows OS (If you compile the code on say Windows 10, by default the binary output from the Microsoft compiler will not work on any older Windows OS, you need to tweak a bunch of options to generate a backward compatible binaries!).
  • Matlab (“Communications Toolbox” for Matlab)
  • Simulink
  • Microsoft Visual C++ installed
  • And that the person who has all of the above also knows how to code.

Obviously each of the above requirements reduces the number of people who could potentially help you.

Another option might be to request mathworks to add official hardware support, since they would have most of the above. https://www.mathworks.com/hardware-support/request-hardware-support.html

Hello,

     read this: https://discourse.myriadrf.org/t/missing-library/5201

    It might help.

   Read everything in that link, completely.