Post Go back to editing

FMComms2/3/4 Source issue

Hi,

I'm working with Pluto using the FMComms2/3/4 source block on GNU Radio.

I found the following issue with the RX Gain settings behavior when Gain mode is set to Manual for both channels:

  • When the flowchart is started the desired values for each RX Gain channel seems to be set correctly,
  • If RX Gain for channel 1 is changed during runtime, it changes that for both channel 1 AND channel 2,
  • If RX Gain for channel 2 is changed during runtime, it seems to do nothing at all.

I have tested this under Ubuntu 22.04 jammy as well under Windows 11 running GNU Radio using Radio Conda. Both versions of GNU Radio are 3.10.4.0.

Please find attached zip file containing the flowgraph that can be used check this behavior.

Kind Regards,

Deon

fmcomms234_pluto_test.zip

  • I cannot repeat this behavior. What firmware version are you using?

    -Travis

  • ////

    The latest I can find, V0.35. Also tested with V0.34 and get the same.

    To confirm my setup, I have TX1 linked to RX1 via a 20dB attenuator and TX2 linked to RX2 via a 30dB attenuator.

    Please see screenshots below.

    I tested my setup with a python script (see attached) using pyadi-iio and this does not seem to have the described issue, ie both RXGains can be changed independently of one another.

    pluto_tx2rx2.zip

  • Can you read out the hardware gain settings:

    iio_attr -u ip:pluto.local -i -c ad9361-phy voltage0 hardwaregain

    iio_attr -u ip:pluto.local -i -c ad9361-phy voltage1 hardwaregain

    After the flowgraph as started.

    -Travis

  • After the flowgraph is started,
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage0 hardwaregain
        43.000000 dB
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage1 hardwaregain
        43.000000 dB

    Then after adjusting rx_gain1 to 45,
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage0 hardwaregain
        45.000000 dB
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage1 hardwaregain
        45.000000 dB

    Then after adjusting rx_gain2 to 40,
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage0 hardwaregain
        45.000000 dB
        iio_attr -u ip:pluto.local -i -c ad9361-phy voltage1 hardwaregain
        45.000000 dB

  • Can you provide the generate flowgraph python file and the output of: iio_info -u pluto.local

    -Travis

  • Can you provide the generate flowgraph python file

    It never occurred to me to look at the generated python file. Once I did, I could see where the problem is and was able to fix the behavior by creating a copy and editing the copy (see fmcomms234_pluto_test_fixed.py).

    diff -Naur fmcomms234_pluto_test.py fmcomms234_pluto_test_fixed.py

    --- fmcomms234_pluto_test.py    2022-11-03 00:28:31.228720243 +0200
    +++ fmcomms234_pluto_test_fixed.py      2022-11-03 01:55:56.005431324 +0200
    @@ -958,6 +958,7 @@
     
         def set_rx_gain2(self, rx_gain2):
             self.rx_gain2 = rx_gain2
    +        self.iio_fmcomms2_source_0.set_gain(1, self.rx_gain2)
     
         def get_rx_gain1(self):
             return self.rx_gain1
    @@ -965,7 +966,6 @@
         def set_rx_gain1(self, rx_gain1):
             self.rx_gain1 = rx_gain1
             self.iio_fmcomms2_source_0.set_gain(0, self.rx_gain1)
    -        self.iio_fmcomms2_source_0.set_gain(1, self.rx_gain1)
     
         def get_q2(self):
             return self.q2

    Please see zip file containing original flowgraph, generated python file, fixed python file and diff file.

    2313.fmcomms234_pluto_test.zip

    and the output of: iio_info -u pluto.local

    iio_info -u pluto.local
    Library version: 0.24 (git tag: v0.24)
    Compiled with backends: local xml ip usb
    Unable to create IIO context pluto.local: Function not implemented (38)

  • This looks like a gnuradio bug and not specific to gr-iio. I created a bug report here: https://github.com/gnuradio/gnuradio/issues/6333

    -Travis