Antenna choice under osmosdr/soapy

Hello

How to choose antenna under osmosdr and soapy or how to specify soapy options in osmosdr

eg : choose gain is -g or hardware is -a

hope explainations are enough

gr-osmosdr will go through soapy, which will in turn call limesuite lms7 API.

For TX on channel 0 and channel 1 there are 3 options :
“NONE”, “BAND1”, “BAND2”
For RX on channel 0 and channel 1 there are 6 options, two of which are the loopback
“NONE”, “LNAH”, “LNAL”, “LNAW”, “LB1”, “LB2”

The above is for the LimeSDR-USB/LimeSDR-PCI

For the LimeSDR-mini the antennas are slightly different.
For TX there are 3 options :
“NONE”, “BAND1”, “BAND2”
For RX there are 4 options (My guess would be that NC below stands for Not Connected):
“NONE”, “LNAH”, “LNAL_NC”, “LNAW”

So for example if you were using osmocom_fft which accepts command line arguments arguments -A ANTENNA (or --antenna=ANTENNA)

For the LimeSDR-mini you could use:
osmocom_fft --device=‘soapy=0,driver=lime’ -A “LNAH”

But on the LimeSDR-USB/LimeSDR-PCI to gain access to both channels it appears that you need to explicitly add “nchan=2” to the device arguments.
osmocom_fft --device=‘soapy=0,driver=lime,nchan=2’ -A “LNAH:0”
osmocom_fft --device=‘soapy=0,driver=lime,nchan=2’ -A “LNAH:1”

P.S. I’ve not tried the above, but I assume it would be the right syntax or something very very similar. If that does not work, maybe try try something like “LNAH,0”. I’ve not dug into the source code fully yet.

1 Like

I can’t make it work with the suggested syntax.

“NONE”, “LNAH”, “LNAL”, “LNAW”, “LB1”, “LB2” is valid, but selecting the channel does not work, whatever the syntax: “0:LNAH”, “0,LNAH”, “LNAH:0”, “LNAH,0” all fail, as the channel is not split out from the string, but given as is to the LMS7 backend.

BTW, there is a typo in SoapyLMS7::setAntenna, where “TX” is hardcoded in the error message (rather than using the direction argument), which makes the diagnosis even more difficult.

How to select the RX channel?