# Using APIs for LimeSDR Mini

**URL:** https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117
**Category:** LimeSDR
**Created:** [6 September 2019 12:40 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117 "2019-09-06T12:40:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [6 September 2019 12:40 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/1 "2019-09-06T12:40:12Z")

</div>

Hi all,

Somehow my LimeSDR Mini is behaving weird while receiving WiFi data from a packet-spammer. I have used Bastian’s gr-ieee802-11 for implementing WiFi Rx flowgraph. It receives data when frame size is 1500 Bytes however when I reduce the frame size, it stops receiving. So I was thinking that instead of working with GNURadio, I will start working with APIs so that nothing remains unknown (inside a black-box like in GNURadio).

Could anyone point me in right direction as to where to start from, how to access APIs for LimeSDR Mini and possibly if I can obtain API for WiFi Rx as well.

Thanks and Regards  
SG

---

<div class="post-metadata">

### Author: ![yindra](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/yindra/32/1901_2.png) [@yindra](https://discourse.myriadrf.org/u/yindra)
#### Post date: [6 September 2019 14:14 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/2 "2019-09-06T14:14:56Z")

</div>

I don’t recall seeing documentation for the API.  
There is one gotcha: start the LimeSDR’s receive channel first. And start the LimeSDR’s receive channel first when you want LimeSDR to transmit only.

---

<div class="post-metadata">

### Author: ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)
#### Post date: [6 September 2019 14:32 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/3 "2019-09-06T14:32:49Z")

</div>

Hi @IF3191,

LMS API documentation:  
[https://docs.myriadrf.org/LMS\_API/](https://docs.myriadrf.org/LMS_API/)  
Examples:  
[https://github.com/myriadrf/LimeSuite/tree/master/src/examples](https://github.com/myriadrf/LimeSuite/tree/master/src/examples)

---

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [11 September 2019 05:17 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/4 "2019-09-11T05:17:20Z")

</div>

Thank you for the reply. I’ll go through the links and get back if needed.

Regards  
SG

---

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [25 September 2019 08:04 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/5 "2019-09-25T08:04:15Z")

</div>

Hi,

I am trying to use WiFi OFDM API with LMS API. The data format received by LimeSDR mini is int\_16 type however the data type used by OFDM API is double type in the range [-1,1]. Is there a converter inherent to Limesuite that can convert the data format as well as scale the data ? Or if not then whether doing this in software will hamper the data received by the LimeSDR Mini?

Basically I would like to know how sample (or streaming) data from a format the device understands can be converted to a format the user can deal with.

Any help or suggestions are appreciated.

Thanks and Regards  
SG

---

<div class="post-metadata">

### Author: ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)
#### Post date: [25 September 2019 09:14 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/6 "2019-09-25T09:14:01Z")

</div>

You can change the format when setting up stream. Data formats: [https://github.com/myriadrf/LimeSuite/blob/64bb2b89963ac48706e7990d1f3b60bf65fd5d33/src/lime/LimeSuite.h#L1085](https://github.com/myriadrf/LimeSuite/blob/64bb2b89963ac48706e7990d1f3b60bf65fd5d33/src/lime/LimeSuite.h#L1085)  
LMS\_FMT\_F32 will output [-1;1] range

---

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [26 September 2019 13:42 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/7 "2019-09-26T13:42:14Z")

</div>

Thanks for a quick reply.

But I need in double format which has higher precision than float. And if I change from float to double, it affects the CRC received with transmit frame and one calculated at receiver resulting in rejection of frames.

Is there a way around?

Regards  
SG

---

<div class="post-metadata">

### Author: ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)
#### Post date: [26 September 2019 20:40 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/8 "2019-09-26T20:40:01Z")

</div>

I don’t see how changing from float to double could have any effect in this situation, considering we’re talking about raw data samples being sent and received from the device. As the device ADC/DAC hardware operates on 12bit integers, it doesn’t matter if the source or sink buffer is a float or double, in the end hardware still uses those values discretized into integers ranging [-2048:2047].  
So when you’re sending or receiving data from the device, samples recalculation from/into float/double should make no difference as both have enough precision to have 1/4096 resolution.

---

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [27 September 2019 08:12 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/9 "2019-09-27T08:12:35Z")

</div>

Thanks for a quick reply. I understand the point you are making here.

Regards  
Shruti

---

<div class="post-metadata">

### Author: ![IF3191](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@IF3191](https://discourse.myriadrf.org/u/IF3191)
#### Post date: [30 September 2019 09:12 UTC](https://discourse.myriadrf.org/t/using-apis-for-limesdr-mini/5117/10 "2019-09-30T09:12:35Z")

</div>

Hi,

Since I am using LimeSDR mini asr WiFi receiver, my sampling rate is set to 20MSamples/s. However, the sample rate achieved at the board using the APIs is only around ~ 10-12 MSamples/s. What could be possible reason behind this behaviour?  
Clearly USB-3 port supports higher data transfer rate so is it that LimeSDR mini is unable to receive signal at higher data rate or the samples are getting lost before reaching the PC for processing?

Any insights into this will be appreciated.

Thanks  
SG
