# Two RX channels in GNU Radio

**URL:** <https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234>\
**Category:** LimeSDR\
**Created:** [17 May 2017 02:43 UTC](https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234 "2017-05-17T02:43:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckoval7](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@ckoval7](https://discourse.myriadrf.org/u/ckoval7)\
**Post date:** [17 May 2017 02:43 UTC](https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234/1 "2017-05-17T02:43:20Z")

</div>

I am trying very unsuccessfully to use both receivers at the same time on my LimeSDR board using gr-osmosdr. I can receive fine off of any of the RX1 ports. I haven’t been able to activate any of the RX2 ports.  
When I choose two channels in the gr-osmosdr block, and set the parameters for the second channel, the flow graph fails to start. If I use two gr-osmosdr blocks and set the device args in one to something like “soapy=0,driver=lime” and the other to “soapy=1,driver=lime” I just get the same signal from both blocks.  
I can’t find any documentation on the subject, so any guidance would be appreciated.

---

<div class="post-metadata">

**Author:** ![mzs](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/mzs/32/2678_2.png) [@mzs](https://discourse.myriadrf.org/u/mzs)\
**Post date:** [17 May 2017 08:47 UTC](https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234/3 "2017-05-17T08:47:55Z")

</div>

This says that two channels on the one block should work.

> [@Limesdr gnuradio and fm](https://discourse.myriadrf.org/t/limesdr-gnuradio-and-fm/1081/5):
>
> The gr-osmosdr source can be configured for two channels, which should give you two streams. You cant actually have two separate gr-osmosdr sources for one single LimeSDR because the channel 0 and channel 1 streams are physically aligned as they flow from the lms7 to the fpga to the usb… Multiple gr-osmosdr sources can be used for multiple LimeSDRs. Use the serial from the LimeUtil --find or SoapySDRUtil --find to specify a particular device. driver=lime,soapy=0,serial=1234 So four receive ch…

What are the parameters that you are setting on the second channel. The two channels are linked and have restrictions, so there are probably very few parameters that can be changed.

> [@Transmitter side specs](https://discourse.myriadrf.org/t/transmitter-side-specs/688/6):
>
> Hello Andrew, I just read some facts that a bit different from your “alternative facts” regarding my questions #1 & #2. The answers on questions 1 and 2 should be YES WITHIN THE BANDWIDTH and not just yes. Digging deeper through the LMS7002M datasheet we can see just two separate PLL, one for the RX and the other for the TX part. This is a 2x2 MIMO device but within the bandwidth of 61.44 Mhz. That means that I can not use the LimeSDR, let say for the simultaneous transmission on 150 MHz and…

Reading through the source code for gr-osmosdr (gr-osmosdr/lib/soapy) it just hands everything back to Soapy, so it would be whatever the SoapySDR bindings for LimeSuite devices using the LMS7 API says that the device can handle (LimeSuite/SoapyLMS7), And speed-reading through Settings.cpp, SoapyLMS7.h and Streaming.cpp it looks to me if you specify bad parameters you will get no feedback on the B channel (with regard to frequency anyhow).

> <https://github.com/myriadrf/LimeSuite/blob/master/SoapyLMS7/Settings.cpp#L555>

EDIT: Sorry was speed reading a bit too fast, that is only when applying corrections. But the A and B channels are linked, you are probably going to have to dig through the datasheet, examining it in great detail and with great care, to find which parameters can be tweaked and by how much. Reading through the code everything is passed back to the LimeSDR API.

EDIT TWO: After reading through LimeSuite/SoapyLMS7/Settings.cpp and LimeSuite/src/lms7002/LMS7002M.cpp I am guessing that if you are trying to use two different frequencies then you need to set both to the exact same frequency and adjust the NCO Rx/Tx for channel A and NCO Rx/Tx for channel B to offset from that centre frequency. I would start by looking at the RXTSG\_NCO/TXTSG\_NCO parameter for each channel.

EDIT THREE: There does not appear to be any option in the osmocom source/sink block in gnuradio companion to pass the RXTSG\_NCO/TXTSG\_NCO parameters per channel. So if you want access you will need to be editing the python code by hand and ignore the gui.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [17 May 2017 13:35 UTC](https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234/4 "2017-05-17T13:35:34Z")

</div>

@ckoval7 You’re going to need to upconvert one channel and downconvert the other channel to an IF if they are more than 60 / 120 MHz apart. This is done with NCOs and, as far as I know, only in Limesuite, unless you write your own plugin for pothos/gnu radio. I managed to Rx on two channels ok in limesuite in this way. Pothos/GNU radio were both a PITA.

---

<div class="post-metadata">

**Author:** ![mzs](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/mzs/32/2678_2.png) [@mzs](https://discourse.myriadrf.org/u/mzs)\
**Post date:** [18 May 2017 14:34 UTC](https://discourse.myriadrf.org/t/two-rx-channels-in-gnu-radio/1234/5 "2017-05-18T14:34:28Z")

</div>

I just reread your original post, maybe I misread it the first time, anyhow I started to wonder if you are using Device Arguments of ‘soapy=0,driver=lime,nchan=2’ and set the Num channels to 2 in the osmocom Source/Sink blocks. Or are you doing something else.
