Post Go back to editing

pyadi-iio problem - ubuntu - TimeoutError: [Errno 110] Connection timed out

Category: Software
Product Number: rev C
Software Version: ubuntu 22.04.1

TimeoutError: [Errno 110] Connection timed out

Hi, I am having this situation with one specific computer. All similar computers work fine but not this one. All use ubuntu 22.04.1

After installing all libraries, in all cases with the same procedure, in the failing computer I have the following problem. I tried different buffers sizes however none worked. The failed computer is also using a different pluto unit, however it is also rev C as in the working computer.

rfuser@rfhost:~$ python3

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import adi

>>> sdr = adi.Pluto('ip:pluto.local')

>>> sdr.sample_rate = int(1e6)

>>> sdr.rx_lo = int(400e6)

>>> sdr.rx_buffer_size = int(1e6)

>>> iq = sdr.rx()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 322, in rx

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 287, in __rx_complex

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 264, in __rx_buffered_data

  File "/home/rfuser/.local/lib/python3.10/site-packages/iio.py", line 1037, in refill

_buffer_refill(self._buffer)

  File "/home/rfuser/.local/lib/python3.10/site-packages/iio.py", line 62, in _check_negative

raise OSError(-result, _strerror(-result))

TimeoutError: [Errno 110] Connection timed out

>>>

>>> sdr.rx_buffer_size = int(10)

>>> iq = sdr.rx()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 322, in rx

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 287, in __rx_complex

  File "/usr/local/lib/python3.10/dist-packages/pyadi_iio-0.0.14-py3.10.egg/adi/rx_tx.py", line 264, in __rx_buffered_data

  File "/home/rfuser/.local/lib/python3.10/site-packages/iio.py", line 1037, in refill

_buffer_refill(self._buffer)

  File "/home/rfuser/.local/lib/python3.10/site-packages/iio.py", line 62, in _check_negative

raise OSError(-result, _strerror(-result))

OSError: [Errno 9] Bad file descriptor

>>>




Procedure previously followed was:

sudo apt-get install build-essential git libxml2-dev bison flex libcdk5-dev cmake python3-pip libusb-1.0-0-dev libavahi-client-dev libavahi-common-dev libaio-dev
cd ~
git clone --branch v0.23 github.com/.../libiio.git
cd libiio
mkdir build
cd build
cmake -DPYTHON_BINDINGS=ON ..
make -j$(nproc)
sudo make install
sudo ldconfig

cd ~
git clone github.com/.../libad9361-iio.git
cd libad9361-iio
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install

cd ~
git clone --branch v0.0.14 github.com/.../pyadi-iio.git
cd pyadi-iio
pip3 install --upgrade pip
pip3 install -r requirements.txt
sudo python3 setup.py install


thank you for your help!!

Parents Reply
  • Hi Travis, thank you for the fast reply.

    These are 3 different physical machines, running each an ubuntu VM.  2 of them work, 1 doesnt in the VM. Sorry for missing that.

    THe only difference among the machines is the pluto unit. Howveer, it is rev C also, and it properly works when using GNUradio on the host computer (where the VM does not)

    I am testing now GNU radio on the VM computer that is failing

    please let me know

Children
  • The error messages are different - first one is timeout - indicating that the default timeout has been reached (by default it is 5 seconds) - it shouldn't be reached for a one second long buffer .. 

    For the second error message, the configured buffersize is 10. There is a not so well documented requirement that the buffersizes should be a multiple of 4 and at least 16 (as far as i can recall). Having a buffer size of 1024 just to test things I think is a good way of starting ... 

    Are you able to run iio_info reliably on the VM ?