RuntimeError: soapy::source: Antenna RX at channel 0 is not supported. Available antennas are: [TX/RX]

Hello everyone,

Regarding the information on the gr-soapy module page librespacefoundation / gr-soapy · GitLab, I am asking for your help. Unfortunately I could not find a description of a similar case anywhere on the web, so I decided to make this post.

After compiling the program in GNU Radio Companion environment and trying to run the compiled python code on my SDR HackRf One, I get the following error in the terminal:

File “/usr/local/lib/python3/dist-packages/soapy/soapy_swig.py”, line 345, in set_antenna

return _soapy_swig.source_sptr_set_antenna(self, channel, name)

RuntimeError: soapy::source: Antenna RX at channel 0 is not supported. Available antennas are: [TX/RX]

I have tried various ways, however I am unable to handle this error. I installed the gr-soapy module according to the instructions in the link above. During the first attempt to run the error appeared: “ImportError: No module named ‘SoapySDR’” however I have dealt with it as per this thread:
https://stackoverflow.com/questions/55850748/how-to-properly-install-soapysdr-with-limesdr-usb

I should also add that the Soapy Sink block works fine. After typing the TX argument into the antenna field, compiling and running the compiled python code on my SDR HackRf One, everything works fine. The problem only occurs when trying to use the Soapy Source block.

Versions:
Python 3.9.7
Ubuntu 21.10
GNU Radio Companion 3.8.4.0
HackRF One FW: release 2021.03.1

I will be grateful for any hints :slight_smile:

2 Likes

Hi @andrew,

great to see interest in gr-soapy!

I had a quick look in the SoapyHackRF module and found the following implementation of getAntenna (pothosware/SoapyHackRF: HackRF_Settings.cpp#L228-L231):

std::string SoapyHackRF::getAntenna( const int direction, const size_t channel ) const
{
	return("TX/RX");
}

So you can probably fix the error by setting the antenna parameter in the Soapy Source Block to the expected value TX/RX.

Please let us know if this solved the problem!

Best wishes,
kerel

PS: After re-reading the error message you posted I realized the available antenna parameter value is already given there. :smiley:

4 Likes

Hello,
Thank you very much for your quick reply.

Of course your tip helped and everything started working smoothly!

You helped me a lot. I made such a simple mistake that it’s silly to admit… I hope someone will find this post useful in the future. Thank you very much again :slight_smile:

5 Likes