Parameter needed to switch RX input in gnuradio for limesdr


#1

Hi All,

doing my fist steps with limesdr i was wonder how to switch rx or tx channel beween RX1, RX2 or TX1, TX2 in the gnuradio soapysdr sink.

thanks for helping in advance, br Robert


Running your LimeSDR on GNSS_SDR on Ubuntu 17.10
#2

Robert - I’m also doing first steps - what application are you using? Gqrx app has a combo box on the input controls pane for choosing antenna.

I’m testing in python and just found this run thru: https://github.com/pothosware/SoapySDR/wiki/PythonSupport

import SoapySDR
from SoapySDR import * #SOAPY_SDR_ constants
results = SoapySDR.Device.enumerate()
for result in results: print(result)

{addr=1d50:6108, driver=lime, label=LimeSDR-USB [USB 2.0] 9060B00471F23, media=USB 2.0, module=STREAM, name=LimeSDR-USB, serial=0009060B00471F23}

args = dict(driver=“lime”)
sdr = SoapySDR.Device(args)
[INFO] Make connection: ‘LimeSDR-USB [USB 2.0] 9060B00471F23’
Estimated reference clock 30.7194 MHz
Selected reference clock 30.720 MHz

print(sdr.listAntennas(SOAPY_SDR_RX, 0))
(‘NONE’, ‘LNAH’, ‘LNAL’, ‘LNAW’, ‘LB1’, ‘LB2’)

print(sdr.listAntennas(SOAPY_SDR_TX, 0))
(‘NONE’, ‘BAND1’, ‘BAND2’)

There’s a sdr.setAntenna() which seems to work for SOAPY_SDR_TX:

sdr.getAntenna(SOAPY_SDR_TX,0)
‘BAND1’

sdr.setAntenna(SOAPY_SDR_TX,0,“BAND2”)
[INFO] SoapyLMS7::setAntenna(Tx, 0, BAND2)

sdr.getAntenna(SOAPY_SDR_TX,0)
‘BAND2’

But RX seems stuck on LB1:

sdr.setAntenna(SOAPY_SDR_RX,0,“LNAW”)
[INFO] SoapyLMS7::setAntenna(Rx, 0, LNAW)

sdr.getAntenna(SOAPY_SDR_RX,0)
‘LB1’

sdr.setAntenna(SOAPY_SDR_RX,0,“LNAL”)
[INFO] SoapyLMS7::setAntenna(Rx, 0, LNAL)

sdr.getAntenna(SOAPY_SDR_RX,0)
‘LB1’


#3

i’ve been doing the first steps with gnuradio because since pothosware this frameworks runs also on windows for me.
I noted your described set sequence in the startup routine of the osmocom source in grc. i guess the antenna could be adressed by the device argument line as like as the “soapy=0,driver=lime” line.
My idea is to use both channels rx0 und rx1 simultaniously by two active osmocom sources targeting the same device but using a different antenna setting.
will give gqrx a try too.

br Robert


#4

Any update? Would like to choose the channels too in gqrx & gnuradio.


#5

For Gqrx and Gnuradio I type LNAH or LNAL or etc. What did you try?


#6

Those just select the antenna ports for channel RX1 by default. How can I use RX2 ports?


#7

For GQRX, its not coded in yet …
Might help to post a feature request on github gqrx … if its not already been requested for LimeSDR


#8

gqrx uses gr-osmosdr, so it shouldn’t be a problem of gqrx, it doesn’t work in gnuradio either. isn’t it possible with device args?


#9

I am not sure how you know from the software side how to specify or differentiate the antennas for rx channel 0 vs. rx channel 1

I guess that the channel selection is the essential question we are trying to answer. I’m a little slow here. :slight_smile:


#10

Exactly :wink: SoapySDRUtil --probe="driver=lime" lists RX1 as RX Channel 0, RX2 = RX Channel 1, TX1 = TX Channel 0, TX2 = TX Channel 1. The second parameter would be the antenna port, which we can anyway select already.


#11

I believe that if you set gr-osmosdr blocks to num channels == 2, you will get two streams and two sets of channel configuration parameters (gain, antenna, filter bw, freq). So the only way to access the second channel (channel 1) is to use the second stream and second set of parameters on this block.

Now it is a bit of a software limitation in gr-osmosdr, because I bet you would be looking to have a single stream and parameter set, just on channel 1 instead. gr-uhd blocks actually have a second channel list argument that performs mapping from the parameters to a physical channel. So this uhd source block for example would have 1 channel, with the channels list selected to be “[1]”.


Problem transmitting via second TX channel
Selecting RF port on LimeSDR
#12

lol… so obvious, that i overlooked this option. however, for now we now at least, that this is not implemented int gqrx. i thought, that it would be a device argument.
but, you’re right, in gr you can’t use channel 1 without using channel 0, at least with the osmocom blocks. maybe some day there will be a soapy-source & -sink
i already tried uhd blocks in gr with the lime, without any success. i get some version missmatch and i don’t want to recompile everything to break it in the end ;D at least it is working

edit: actually you could set the antenna of channel 0 to ‘NONE’, which is possible and just use channel 1 then. i believe, that this would consume usb bandwidth though…

TX Antennas: NONE, BAND1, BAND2```

i guess, you'd have to use a null sink then for the 0th output of the block then, but at least we have workaround for now

#13

Much like its uhd counterpart, I would like to see gr-osmosdr blocks gain an optional channels list. This list would be used to map from the block’s stream and parameter indexes to hardware indexes. There is a perfect place for this in the source/sink_impl.cpp, so you would not change the device implementations. I suppose gqrx would then just supply a channel drop down to select which channel.

I would rather improve gr-osmosdr in this way than hide some convoluted argument remapping option within SoapyLMS7. But I suppose if a lot of apps had some inflexibility with channel selection, we might have to go the other way.


#14

Hello m.r joshblum
how to set Antenna Argument in source block when use two channel? when i use one channel( RX-1) i set Antenna argument with(LNAL-LNAH-LNAW) and work correctly but when use two channel RX1-L and RX2-L i get below error

Traceback (most recent call last):
File “/home/user/Desktop/top_block.py”, line 143, in
main()
File “/home/user/Desktop/top_block.py”, line 137, in main
tb = top_block_cls()
File “/home/user/Desktop/top_block.py”, line 82, in init
self.osmosdr_source_0_0 = osmosdr.source( args=“numchan=” + str(2) + " " + ‘driver=lime,soapy=0,serial=000907060246301F’ )
File “/usr/local/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py”, line 954, in make
return _osmosdr_swig.source_make(args)
RuntimeError: Wrong device arguments specified. Missing nchan?


#15

If I remember right it was expecting adding ‘nchan=2’ to device arguments or something like that.

However, if you want to use LimeSDR in MIMO configuration in GNURadio Companion, I believe USRP Source/Sinks are the only way to go, since (afaik) you cannot provide different DSP frequency offsets for two channels with Osmocom Source/Sinks.

With USRP Source/Sinks on the other hand, you need to change number of channels to 2 and then everything may be easily set in RF options tab for each channel individually.


#16

can you help me to use LimeSDR in MIMO configuration in GNURadio Companion by USRP Source?


#17

Sure, what exactly do you need to know?


#18

i have two LimeSDR and i want to use two usrp source block(or one) in gnuradio to syncronization but i don’t know how to set and configure parameters in usrp source such as device argument , antenna , clock source, time source , number of channel and board.
Best Regard


#19

That may be a problem. I thought that you want to use MIMO configuration within a single device (i.e. 2xRX channel and 2xTX channel) - this may be done quite easily. As for synchronizing two devices together, frequency is not a problem (you just have to connect both boards with Ref input/output ports), but afaik noone has successfully implemented 1 PPS time synchronization for LimeSDR so far.


#20

i want use two limesdr then sync 4 receiver together.do you know how do it?