# LimeSuiteNG: Transmitting raw I/Q samples from a file with LimeSDR Mini 2.0

**URL:** <https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961>\
**Category:** Lime Suite\
**Created:** [19 November 2025 06:48 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961 "2025-11-19T06:48:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [19 November 2025 06:48 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/1 "2025-11-19T06:48:28Z")

</div>

I would like to transmit raw I/Q samples from a file using the LimeSDR Mini 2.0 with the LimeSuiteNG library. I modified LimeSuiteNG/src/example/basicTX.cpp to read a raw data file instead of generating samples internally. The code works reliably at a 5 MHz sampling rate, but at higher rates it occasionally drops samples.

Is there any working C++ example that demonstrates streaming I/Q samples from a file using LimeSuiteNG? For my experiment, I need a stable transmit rate of 12 MHz or higher.

Any guidance or sample code would be greatly appreciated.

---

<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:** [19 November 2025 10:19 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/2 "2025-11-19T10:19:04Z")

</div>

You can use `limeTRX` command line interface to transmit from file.  
`limeTRX --input TxSamplesFile.binary --txPacketsInBatch=8`  
File should be little endian 16bit integers.  
The txPacketsInBatch controls size of USB transfers, the default value might be too low depending on host PC, so increasing this value should improve performance and avoid sample drops.

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [21 November 2025 01:57 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/3 "2025-11-21T01:57:55Z")

</div>

Thank you for the helpful information. I assume the required file format is sc16, with interleaved signed 16-bit I/Q integers in little-endian order.  
First, I configured my LimeSDR Mini 2.0 using limeConfig:

`limeConfig --initialize --samplerate=2.6e6 --txen=1 --txlo=1575.42e6 --txlpf=5e6`

Then I started transmitting the sample file using limeTRX as suggested:

`limeTRX --input gpssim.bin --txPacketsInBatch=8 --log=verbose`  
USB ep:83 Rx0 Setup: usePoll:1 rxSamplesInPkt:1360 rxPacketsInBatch:1, DMA\_ReadSize:4096, link:I12, batchSizeInTime:113.333us FS:11999999.000000, FIFO=2205\*1360  
Tx0 Setup: samplesInTxPkt:1360 maxTxPktInBatch:8, batchSizeInTime:906.667us  
Tx file size : 20232704 bytes.  
Samples received: 16384  
Samples received: 6029312  
Samples received: 12042240  
Samples received: 18055168  
Samples received: 24068096  
Samples received: 30081024  
Samples received: 36093952

The actual TX file is larger than 4 GB, but limeTRX reports only about 20 MB, and the transmission finishes very quickly. I also see only a very brief flash of the red TX LED.  
Is there a file-size limitation in limeTRX?  
How can I properly transmit a large TX file for testing with the LimeSDR device?

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [21 November 2025 03:32 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/4 "2025-11-21T03:32:22Z")

</div>

I checked the limeTRX source code and found that the TX file size is stored in an `int`, so files larger than about 2 GB cannot be handled correctly. After generating a smaller TX file, limeTRX recognized the file size correctly and the red TX LED illuminated as expected.

However, I still cannot observe any transmitted signal around the specified center frequency on a spectrum analyzer. Is there any additional parameter that must be set in either **limeConfig** or **limeTRX** to enable proper RF transmission?

---

<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:** [21 November 2025 07:17 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/5 "2025-11-21T07:17:32Z")

</div>

> [@osqzss](#):
>
> I assume the required file format is sc16, with interleaved signed 16-bit I/Q integers in little-endian order.

Correct.

> [@osqzss](#):
>
> limeConfig --initialize --samplerate=2.6e6 --txen=1 --txlo=1575.42e6 --txlpf=5e6

also set tx antenna and gain `--txpath=Band1 --txgain=60`

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [21 November 2025 22:48 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/6 "2025-11-21T22:48:14Z")

</div>

Thank you very much for the helpful advice. After adding the options `--txpath=Band1` and `--txgain=60` to the **limeConfig** command, I was finally able to observe the expected RF signal on the spectrum analyzer. Everything is now working correctly.

I appreciate your support and guidance.

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [22 November 2025 00:03 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/7 "2025-11-22T00:03:39Z")

</div>

By increasing the txPacketsInBatch option in limeTRX to 8 or 16, the number of dropped samples at a 12 MHz sampling rate has been greatly reduced. However, I still occasionally encounter dropped samples when the following message appears:

> USB ep:83 Rx0: 35.485 MB/s | TS:888828000 pkt:653248 o:0(+0) l:2(+1) dma:40828/40829(+1) swFIFO:0

What possible reasons could cause the TX data to be dropped? Considering the USB 3.0 bandwidth, I would expect that 12 MHz IQ transmission should still have plenty of margin.

What can I do to achieve stable transmission at higher sampling rates with the LimeSDR Mini 2.0?

---

<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:** [22 November 2025 07:44 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/8 "2025-11-22T07:44:17Z")

</div>

> [@osqzss](#):
>
> USB ep:83 Rx0: 35.485 MB/s | TS:888828000 pkt:653248 o:0(+0) l:2(+1) dma:40828/40829(+1) swFIFO:0

This is on Rx side, you can also set --rxPacketsInBatch=16, even If you are only transmitting, Rx is still active to provide timestamps data.

> [@osqzss](#):
>
> What possible reasons could cause the TX data to be dropped? Considering the USB 3.0 bandwidth, I would expect that 12 MHz IQ transmission should still have plenty of margin.

USB 3.0 bandwidth yes, but there are nuances that affect it. Data batch sizes, large batches achieve better bandwidth and smaller CPU overhead, but at the cost of latency. Also there is gateware implementation details of how much data it can buffer, and the on board FT601 USB controller even though the data transfer is full-duplex, it’s processing within the controller is half-duplex, it has to switch between Rx/Tx processing reducing available bandwidth

> [@osqzss](#):
>
> What can I do to achieve stable transmission at higher sampling rates with the LimeSDR Mini 2.0?

Set both --rxPacketsInBatch and --txPacketsInBatch to same amount, 16 is possibly best, higher values won’t have noticable benefit.

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [23 November 2025 00:57 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/9 "2025-11-23T00:57:58Z")

</div>

I tried setting both `--txPacketsInBatch` and `--rxPacketsInBatch` to 16, but unfortunately the issue still persists. I continue to see the same RX message, and TX samples are still dropped each time that RX message appears. It seems that activity on the RX side may be interfering with the TX process. I will try removing all RX-related code from limeTRX to make it a TX-only implementation and see if that improves stability.

---

<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:** [23 November 2025 06:55 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/10 "2025-11-23T06:55:06Z")

</div>

You can force disable Rx streaming in these source locations:

> <https://github.com/myriadrf/LimeSuiteNG/blob/d24de155eecfd3380b1436b6e277654a378a7a0e/cli/limeTRX.cpp#L402>

> <https://github.com/myriadrf/LimeSuiteNG/blob/d24de155eecfd3380b1436b6e277654a378a7a0e/src/streaming/TRXLooper.cpp#L199>

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [23 November 2025 07:39 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/11 "2025-11-23T07:39:37Z")

</div>

Thank you for the advice. However, even after commenting out all RX-related functionality, I still see occasional TX data drops at a 12 MHz sampling rate.

I am currently running limeTRX on a Windows 11 system. In the following post, [oe1rsa](https://discourse.myriadrf.org/u/oe1rsa) reported stable TX at 40 Msps when running as root:

> [@LimeMini Maximum stable USB3 Rate?](https://discourse.myriadrf.org/t/limemini-maximum-stable-usb3-rate/12936/13):
>
> I finally found the root of the problems on my machine: LimeSuiteNG choose a very low batch size, amounting to mRx.packetsToBatch == 1 causing packet losses. As a “work around” I manually force the extra config to strcfg.extraConfig.rx.packetsInBatch = 8; This results in smooth operation with very low CPU utilisation and no data losses. (Tested with 4Msps over a period of 10 minutes, while doing email and internet surfing and no escalated privileges, i.e. as a normal user.) I also tried wi…

This makes me suspect that the issue may be related to the Windows environment. I will try running limeTRX on Ubuntu, using **nice** to increase its scheduling priority, and see if that improves the stability.

---

<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:** [23 November 2025 09:11 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/12 "2025-11-23T09:11:08Z")

</div>

For Windows you can try increasing this value to 4096\*16 [LimeSuiteNG/src/comms/USB/FT601/FT601.cpp at d24de155eecfd3380b1436b6e277654a378a7a0e · myriadrf/LimeSuiteNG · GitHub](https://github.com/myriadrf/LimeSuiteNG/blob/d24de155eecfd3380b1436b6e277654a378a7a0e/src/comms/USB/FT601/FT601.cpp#L273)

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [24 November 2025 02:14 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/13 "2025-11-24T02:14:50Z")

</div>

Thank you for the tip. I increased the `streamBufferSize` to 4096\*16, but unfortunately this did not resolve the issue on Windows.

---

<div class="post-metadata">

**Author:** ![osqzss](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/osqzss/32/4567_2.png) [@osqzss](https://discourse.myriadrf.org/u/osqzss)\
**Post date:** [24 November 2025 03:44 UTC](https://discourse.myriadrf.org/t/limesuiteng-transmitting-raw-i-q-samples-from-a-file-with-limesdr-mini-2-0/12961/14 "2025-11-24T03:44:17Z")

</div>

I built LimeSuiteNG from source on Ubuntu 24.04 and ran limeTRX with the same configuration as on Windows. It now operates smoothly at 12 Msps without any TX data drops. The issue on Windows is still unresolved, but at least the problem seems fully resolved when running on Ubuntu.
